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
diff --git a/files/grok-patterns.yaml b/files/grok-patterns.yaml
index 55267ca..b71a616 100644
--- a/files/grok-patterns.yaml
+++ b/files/grok-patterns.yaml
@@ -2,3 +2,4 @@ grok_patterns:
2 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})?'2 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})?'
3 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}\"?'3 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}\"?'
4 NOVA_COMPUTE: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}?%{LOGLEVEL:loglevel}%{SPACE}((\[)?(%{NOTSPACE:module})?(\])?%{SPACE})?\[%{GREEDYDATA:request}\]%{SPACE}\[%{GREEDYDATA:resource}\]%{SPACE}%{GREEDYDATA:logmessage}'4 NOVA_COMPUTE: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}?%{LOGLEVEL:loglevel}%{SPACE}((\[)?(%{NOTSPACE:module})?(\])?%{SPACE})?\[%{GREEDYDATA:request}\]%{SPACE}\[%{GREEDYDATA:resource}\]%{SPACE}%{GREEDYDATA:logmessage}'
5 OPENSTACK_ERROR: '%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{NUMBER:pid}?%{SPACE}ERROR%{GREEDYDATA:message}'
diff --git a/files/metrics-mapping.yaml b/files/metrics-mapping.yaml
index 6cac548..cfd87a0 100644
--- a/files/metrics-mapping.yaml
+++ b/files/metrics-mapping.yaml
@@ -115,3 +115,118 @@ metrics:
115 labels:115 labels:
116 retries: '{{.retries}}'116 retries: '{{.retries}}'
117 server_name: '{{.server_name}}'117 server_name: '{{.server_name}}'
118 nova_api_os_compute_errors:
119 type: counter
120 path: /var/log/nova/nova-api-os-compute.log
121 help: Total number of nova api os compute errors
122 match: '%{OPENSTACK_ERROR}'
123 nova_placement_api_errors:
124 type: counter
125 path: /var/log/nova/nova-placement-api.log
126 help: Total number of nova placement errors
127 match: '%{OPENSTACK_ERROR}'
128 nova_placement_api_access_errors:
129 type: counter
130 help: Total number of nova placement api access errors
131 path: /var/log/apache2/nova-placement-api_access.log
132 match: '%{OPENSTACK_ERROR}'
133 nova_access_errors:
134 type: counter
135 path: /var/log/apache2/nova_access.log
136 help: Total number of nova access errors
137 match: '%{OPENSTACK_ERROR}'
138 nova_conductor_errors:
139 type: counter
140 path: /var/log/nova/nova-conductor.log
141 help: Total number of nova conductor errors
142 match: '%{OPENSTACK_ERROR}'
143 nova_manage_errors:
144 type: counter
145 path: /var/log/nova/nova-manage.log
146 help: Total number of nova manage errors
147 match: '%{OPENSTACK_ERROR}'
148 nova_scheduler_errors:
149 type: counter
150 path: /var/log/nova/nova-scheduler.log
151 help: Total number of nova scheduler errors
152 match: '%{OPENSTACK_ERROR}'
153 keystone_errors:
154 type: counter
155 path: /var/log/nova/keystone.log
156 help: Total number of keystone errors
157 match: '%{OPENSTACK_ERROR}'
158 keystone_manage_errors:
159 type: counter
160 path: /var/log/nova/keystone-manage.log
161 help: Total number of keystone manage errors
162 match: '%{OPENSTACK_ERROR}'
163 neutron_server_errors:
164 type: counter
165 path: /var/log/neutron/neutron-server.log
166 help: Total number of neutron server errors
167 match: '%{OPENSTACK_ERROR}'
168 heat_api_cfn_errors:
169 type: counter
170 path: /var/log/heat/heat-api-cfn.log
171 help: Total number of heat api cfn errors
172 match: '%{OPENSTACK_ERROR}'
173 heat_api_errors:
174 type: counter
175 path: /var/log/heat/heat-api.log
176 help: Total number of heat api errors
177 match: '%{OPENSTACK_ERROR}'
178 heat_engine_errors:
179 type: counter
180 path: /var/log/heat/heat-engine.log
181 help: Total number of heat engine errors
182 match: '%{OPENSTACK_ERROR}'
183 cinder_scheduler_errors:
184 type: counter
185 path: /var/log/cinder/cinder-scheduler.log
186 help: Total number of cinder scheduler errors
187 match: '%{OPENSTACK_ERROR}'
188 cinder_volume_errors:
189 type: counter
190 path: /var/log/cinder/cinder-volume.log
191 help: Total number of cinder volume errors
192 match: '%{OPENSTACK_ERROR}'
193 designate_api_errors:
194 type: counter
195 path: /var/log/designate/designate-api.log
196 help: Total number of designate api errors
197 match: '%{OPENSTACK_ERROR}'
198 designate_central_errors:
199 type: counter
200 path: /var/log/designate/designate-central.log
201 help: Total number of designate central errors
202 match: '%{OPENSTACK_ERROR}'
203 designate_mdns_errors:
204 type: counter
205 path: /var/log/designate/designate-mdns.log
206 help: Total number of designate mdns errors
207 match: '%{OPENSTACK_ERROR}'
208 designate_pool_manager_errors:
209 type: counter
210 path: /var/log/designate/designate-pool-manager.log
211 help: Total number of designate mdns errors
212 match: '%{OPENSTACK_ERROR}'
213 designate_sink_errors:
214 type: counter
215 path: /var/log/designate/designate-sink.log
216 help: Total number of designate sink errors
217 match: '%{OPENSTACK_ERROR}'
218 designate_zone_manager_errors:
219 type: counter
220 path: /var/log/designate/designate-zone-manager.log
221 help: Total number of designate zone manager errors
222 match: '%{OPENSTACK_ERROR}'
223 glance_api_errors:
224 type: counter
225 path: /var/log/glance/glance-api.log
226 match: '%{OPENSTACK_ERROR}'
227 help: Total number of glance api errors
228 glance_registry_errors:
229 type: counter
230 path: /var/log/glance/glance-registry.log
231 match: '%{OPENSTACK_ERROR}'
232 help: Total number of glance registry errors
118\ No newline at end of file233\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: