Merge ~peppepetra/charm-prometheus-grok-exporter:openstack-errors into charm-prometheus-grok-exporter:master

Proposed by Giuseppe Petralia
Status: Merged
Approved by: Jeremy Lounder
Approved revision: 8ade7ec0f3187081fb9c6d78a00af9ab3da455f2
Merged at revision: 8ade7ec0f3187081fb9c6d78a00af9ab3da455f2
Proposed branch: ~peppepetra/charm-prometheus-grok-exporter:openstack-errors
Merge into: charm-prometheus-grok-exporter:master
Prerequisite: ~peppepetra/charm-prometheus-grok-exporter:haproxy-metrics
Diff against target: 133 lines (+116/-0)
2 files modified
files/grok-patterns.yaml (+1/-0)
files/metrics-mapping.yaml (+115/-0)
Reviewer Review Type Date Requested Status
Jeremy Lounder (community) Approve
Review via email: mp+381841@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeremy Lounder (jldev) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/grok-patterns.yaml b/files/grok-patterns.yaml
2index 55267ca..b71a616 100644
3--- a/files/grok-patterns.yaml
4+++ b/files/grok-patterns.yaml
5@@ -2,3 +2,4 @@ grok_patterns:
6 OPENSTACK_API: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}?%{LOGLEVEL:loglevel} (\[)?(%{NOTSPACE:module})?(\])?%{SPACE}\[%{GREEDYDATA:request}\]%{SPACE}%{NOTSPACE:requesterip}%{SPACE}(%{GREEDYDATA:httpdate})?\"%{NOTSPACE:http_verb}%{SPACE}%{NOTSPACE:url}%{SPACE}(%{NOTSPACE:http_version})?\"%{SPACE}(status:%{SPACE})?%{NUMBER:response}%{SPACE}(len:%{SPACE})?%{NUMBER:response_len}%{SPACE}(time:%{SPACE})?%{NUMBER:response_time}?(%{SPACE}microversion:%{SPACE}%{NUMBER:microversion})?'
7 API_ACCESS: '(%{NOTSPACE:service}%{SPACE})?%{NOTSPACE:requesterip}%{SPACE}-%{SPACE}-%{SPACE}\[%{HTTPDATE:logdate}\]%{SPACE}\"%{NOTSPACE:http_verb}%{SPACE}%{NOTSPACE:url}%{SPACE}%{NOTSPACE:http_version}\"%{SPACE}%{NUMBER:response}%{SPACE}%{NUMBER:response_len}%{GREEDYDATA:client}\"?'
8 NOVA_COMPUTE: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}?%{LOGLEVEL:loglevel}%{SPACE}((\[)?(%{NOTSPACE:module})?(\])?%{SPACE})?\[%{GREEDYDATA:request}\]%{SPACE}\[%{GREEDYDATA:resource}\]%{SPACE}%{GREEDYDATA:logmessage}'
9+ OPENSTACK_ERROR: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}ERROR%{GREEDYDATA:message}'
10diff --git a/files/metrics-mapping.yaml b/files/metrics-mapping.yaml
11index 6cac548..cfd87a0 100644
12--- a/files/metrics-mapping.yaml
13+++ b/files/metrics-mapping.yaml
14@@ -115,3 +115,118 @@ metrics:
15 labels:
16 retries: '{{.retries}}'
17 server_name: '{{.server_name}}'
18+ nova_api_os_compute_errors:
19+ type: counter
20+ path: /var/log/nova/nova-api-os-compute.log
21+ help: Total number of nova api os compute errors
22+ match: '%{OPENSTACK_ERROR}'
23+ nova_placement_api_errors:
24+ type: counter
25+ path: /var/log/nova/nova-placement-api.log
26+ help: Total number of nova placement errors
27+ match: '%{OPENSTACK_ERROR}'
28+ nova_placement_api_access_errors:
29+ type: counter
30+ help: Total number of nova placement api access errors
31+ path: /var/log/apache2/nova-placement-api_access.log
32+ match: '%{OPENSTACK_ERROR}'
33+ nova_access_errors:
34+ type: counter
35+ path: /var/log/apache2/nova_access.log
36+ help: Total number of nova access errors
37+ match: '%{OPENSTACK_ERROR}'
38+ nova_conductor_errors:
39+ type: counter
40+ path: /var/log/nova/nova-conductor.log
41+ help: Total number of nova conductor errors
42+ match: '%{OPENSTACK_ERROR}'
43+ nova_manage_errors:
44+ type: counter
45+ path: /var/log/nova/nova-manage.log
46+ help: Total number of nova manage errors
47+ match: '%{OPENSTACK_ERROR}'
48+ nova_scheduler_errors:
49+ type: counter
50+ path: /var/log/nova/nova-scheduler.log
51+ help: Total number of nova scheduler errors
52+ match: '%{OPENSTACK_ERROR}'
53+ keystone_errors:
54+ type: counter
55+ path: /var/log/nova/keystone.log
56+ help: Total number of keystone errors
57+ match: '%{OPENSTACK_ERROR}'
58+ keystone_manage_errors:
59+ type: counter
60+ path: /var/log/nova/keystone-manage.log
61+ help: Total number of keystone manage errors
62+ match: '%{OPENSTACK_ERROR}'
63+ neutron_server_errors:
64+ type: counter
65+ path: /var/log/neutron/neutron-server.log
66+ help: Total number of neutron server errors
67+ match: '%{OPENSTACK_ERROR}'
68+ heat_api_cfn_errors:
69+ type: counter
70+ path: /var/log/heat/heat-api-cfn.log
71+ help: Total number of heat api cfn errors
72+ match: '%{OPENSTACK_ERROR}'
73+ heat_api_errors:
74+ type: counter
75+ path: /var/log/heat/heat-api.log
76+ help: Total number of heat api errors
77+ match: '%{OPENSTACK_ERROR}'
78+ heat_engine_errors:
79+ type: counter
80+ path: /var/log/heat/heat-engine.log
81+ help: Total number of heat engine errors
82+ match: '%{OPENSTACK_ERROR}'
83+ cinder_scheduler_errors:
84+ type: counter
85+ path: /var/log/cinder/cinder-scheduler.log
86+ help: Total number of cinder scheduler errors
87+ match: '%{OPENSTACK_ERROR}'
88+ cinder_volume_errors:
89+ type: counter
90+ path: /var/log/cinder/cinder-volume.log
91+ help: Total number of cinder volume errors
92+ match: '%{OPENSTACK_ERROR}'
93+ designate_api_errors:
94+ type: counter
95+ path: /var/log/designate/designate-api.log
96+ help: Total number of designate api errors
97+ match: '%{OPENSTACK_ERROR}'
98+ designate_central_errors:
99+ type: counter
100+ path: /var/log/designate/designate-central.log
101+ help: Total number of designate central errors
102+ match: '%{OPENSTACK_ERROR}'
103+ designate_mdns_errors:
104+ type: counter
105+ path: /var/log/designate/designate-mdns.log
106+ help: Total number of designate mdns errors
107+ match: '%{OPENSTACK_ERROR}'
108+ designate_pool_manager_errors:
109+ type: counter
110+ path: /var/log/designate/designate-pool-manager.log
111+ help: Total number of designate mdns errors
112+ match: '%{OPENSTACK_ERROR}'
113+ designate_sink_errors:
114+ type: counter
115+ path: /var/log/designate/designate-sink.log
116+ help: Total number of designate sink errors
117+ match: '%{OPENSTACK_ERROR}'
118+ designate_zone_manager_errors:
119+ type: counter
120+ path: /var/log/designate/designate-zone-manager.log
121+ help: Total number of designate zone manager errors
122+ match: '%{OPENSTACK_ERROR}'
123+ glance_api_errors:
124+ type: counter
125+ path: /var/log/glance/glance-api.log
126+ match: '%{OPENSTACK_ERROR}'
127+ help: Total number of glance api errors
128+ glance_registry_errors:
129+ type: counter
130+ path: /var/log/glance/glance-registry.log
131+ match: '%{OPENSTACK_ERROR}'
132+ help: Total number of glance registry errors
133\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: