|
28 | 28 | 'name' => 'global_fatal',
|
29 | 29 | 'mbean' => 'puppetlabs.puppetdb.mq:name=global.fatal'
|
30 | 30 | },
|
31 |
| - #{ |
32 |
| - # 'type' => 'read', |
33 |
| - # 'name' => 'global_generate-retry-message-time', |
34 |
| - # 'mbean' => 'puppetlabs.puppetdb.mq:name=global.generate-retry-message-time' |
35 |
| - #}, |
| 31 | + { # This counter doesn't exist until a failure occurs. |
| 32 | + 'type' => 'read', |
| 33 | + 'name' => 'global_generate-retry-message-time', |
| 34 | + 'mbean' => 'puppetlabs.puppetdb.mq:name=global.generate-retry-message-time' |
| 35 | + }, |
36 | 36 | {
|
37 | 37 | 'type' => 'read',
|
38 | 38 | 'name' => 'global_message-persistence-time',
|
|
48 | 48 | 'name' => 'global_retry-counts',
|
49 | 49 | 'mbean' => 'puppetlabs.puppetdb.mq:name=global.retry-counts'
|
50 | 50 | },
|
51 |
| - #{ |
52 |
| - # 'type' => 'read', |
53 |
| - # 'name' => 'global_retry-persistence-time', |
54 |
| - # 'mbean' => 'puppetlabs.puppetdb.mq:name=global.retry-persistence-time' |
55 |
| - #}, |
| 51 | + { # This counter doesn't exist until a failure occurs. |
| 52 | + 'type' => 'read', |
| 53 | + 'name' => 'global_retry-persistence-time', |
| 54 | + 'mbean' => 'puppetlabs.puppetdb.mq:name=global.retry-persistence-time' |
| 55 | + }, |
56 | 56 | {
|
57 | 57 | 'type' => 'read',
|
58 | 58 | 'name' => 'global_seen',
|
|
178 | 178 | }
|
179 | 179 | ]
|
180 | 180 |
|
181 |
| - # Retaining for future reference. |
182 |
| - $numbers = $::pe_server_version ? { |
183 |
| - /^2016\.[45]\./ => {'catalogs' => 9, 'facts' => 5, 'reports' => 8}, |
184 |
| - default => {'catalogs' => 9, 'facts' => 5, 'reports' => 8}, |
185 |
| - } |
| 181 | + $version = {'catalogs' => 9, 'facts' => 5, 'reports' => 8}, |
186 | 182 |
|
187 | 183 | $version_specific_metrics = [
|
188 | 184 | {
|
189 | 185 | 'type' => 'read',
|
190 | 186 | 'name' => 'mq_replace_catalog_retried',
|
191 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=replace catalog.${numbers['catalogs']}.retried" |
| 187 | + 'mbean' => "puppetlabs.puppetdb.mq:name=replace catalog.${version['catalogs']}.retried" |
192 | 188 | },
|
193 | 189 | {
|
194 | 190 | 'type' => 'read',
|
195 | 191 | 'name' => 'mq_replace_catalog_retry-counts',
|
196 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=replace catalog.${numbers['catalogs']}.retry-counts" |
| 192 | + 'mbean' => "puppetlabs.puppetdb.mq:name=replace catalog.${version['catalogs']}.retry-counts" |
197 | 193 | },
|
198 | 194 | {
|
199 | 195 | 'type' => 'read',
|
200 | 196 | 'name' => 'mq_replace_facts_retried',
|
201 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=replace facts.${numbers['facts']}.retried" |
| 197 | + 'mbean' => "puppetlabs.puppetdb.mq:name=replace facts.${version['facts']}.retried" |
202 | 198 | },
|
203 | 199 | {
|
204 | 200 | 'type' => 'read',
|
205 | 201 | 'name' => 'mq_replace_facts_retry-counts',
|
206 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=replace facts.${numbers['facts']}.retry-counts" |
| 202 | + 'mbean' => "puppetlabs.puppetdb.mq:name=replace facts.${version['facts']}.retry-counts" |
207 | 203 | },
|
208 | 204 | {
|
209 | 205 | 'type' => 'read',
|
210 | 206 | 'name' => 'mq_store_report_retried',
|
211 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=store report.${numbers['reports']}.retried" |
| 207 | + 'mbean' => "puppetlabs.puppetdb.mq:name=store report.${version['reports']}.retried" |
212 | 208 | },
|
213 | 209 | {
|
214 | 210 | 'type' => 'read',
|
215 | 211 | 'name' => 'mq_store_reports_retry-counts',
|
216 |
| - 'mbean' => "puppetlabs.puppetdb.mq:name=store report.${numbers['reports']}.retry-counts" |
| 212 | + 'mbean' => "puppetlabs.puppetdb.mq:name=store report.${version['reports']}.retry-counts" |
217 | 213 | }
|
218 | 214 | ]
|
219 | 215 |
|
|
291 | 287 | 'name' => 'ha_seconds-since-last-successful-sync',
|
292 | 288 | 'mbean' => 'puppetlabs.puppetdb.ha:name=seconds-since-last-successful-sync'
|
293 | 289 | },
|
294 |
| - #{ |
295 |
| - # 'type' => 'read', |
296 |
| - # 'name' => 'ha_failed-request-counter', |
297 |
| - # 'mbean' => 'puppetlabs.puppetdb.ha:name=failed-request-counter' |
298 |
| - #}, |
| 290 | + { # This counter doesn't exist until a failure occurs. |
| 291 | + 'type' => 'read', |
| 292 | + 'name' => 'ha_failed-request-counter', |
| 293 | + 'mbean' => 'puppetlabs.puppetdb.ha:name=failed-request-counter' |
| 294 | + }, |
299 | 295 | {
|
300 | 296 | 'type' => 'read',
|
301 | 297 | 'name' => 'ha_sync-duration',
|
|
0 commit comments