Welcome to mirror list, hosted at ThFree Co, Russian Federation.

template_app_activemq_jmx.yaml « activemq_jmx « app « templates - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1fce967f3c963ea5b917b5b56795193db3a9d3fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
zabbix_export:
  version: '5.4'
  date: '2021-05-09T00:00:00Z'
  groups:
    -
      name: Templates/Applications
  templates:
    -
      template: 'Apache ActiveMQ by JMX'
      name: 'Apache ActiveMQ by JMX'
      description: |
        The template to monitor Apache ActiveMQ by Zabbix that work without any external scripts.
        The metrics are collected by JMX.
        You can set macro values and add macros with context for specific brokers or destinations following macro description.
        
        
        You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/411049-discussion-thread-for-official-zabbix-template-amq
        
        Template tooling version used: 0.38
      groups:
        -
          name: Templates/Applications
      discovery_rules:
        -
          name: 'Brokers discovery'
          type: JMX
          key: 'jmx.discovery[beans,"org.apache.activemq:type=Broker,brokerName=*"]'
          delay: 1h
          username: '{$ACTIVEMQ.USER}'
          password: '{$ACTIVEMQ.PASSWORD}'
          filter:
            evaltype: FORMULA
            formula: 'A and B'
            conditions:
              -
                macro: '{#JMXBROKERNAME}'
                value: '{$ACTIVEMQ.LLD.FILTER.BROKER.MATCHES}'
                formulaid: A
              -
                macro: '{#JMXBROKERNAME}'
                value: '{$ACTIVEMQ.LLD.FILTER.BROKER.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery of brokers'
          item_prototypes:
            -
              name: 'Broker {#JMXBROKERNAME}: Version'
              type: JMX
              key: 'jmx[{#JMXOBJ},BrokerVersion]'
              history: 7d
              trends: '0'
              value_type: TEXT
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'The version of the broker.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: '(last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion],#1)<>last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion],#2))=1 and length(last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},BrokerVersion]))>0'
                  name: 'Broker {#JMXBROKERNAME}: Version has been changed'
                  priority: INFO
                  description: 'Broker {#JMXBROKERNAME} version has changed. Ack to close.'
                  manual_close: 'YES'
            -
              name: 'Broker {#JMXBROKERNAME}: Memory limit'
              type: JMX
              key: 'jmx[{#JMXOBJ},MemoryLimit]'
              history: 7d
              units: B
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Memory limit, in bytes, used for holding undelivered messages before paging to temporary storage.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: 'Broker {#JMXBROKERNAME}: Memory usage in percents'
              type: JMX
              key: 'jmx[{#JMXOBJ}, MemoryPercentUsage]'
              history: 7d
              units: '%'
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Percent of memory limit used.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
                  priority: HIGH
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.WARN:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.WARN:"{#JMXBROKERNAME}"}%)'
                  priority: AVERAGE
                  dependencies:
                    -
                      name: 'Broker {#JMXBROKERNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
                      expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ}, MemoryPercentUsage],{$ACTIVEMQ.MEM.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXBROKERNAME}"}'
            -
              name: 'Broker {#JMXBROKERNAME}: Storage limit'
              type: JMX
              key: 'jmx[{#JMXOBJ},StoreLimit]'
              history: 7d
              units: B
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Disk limit, in bytes, used for persistent messages before producers are blocked.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: 'Broker {#JMXBROKERNAME}: Storage usage in percents'
              type: JMX
              key: 'jmx[{#JMXOBJ},StorePercentUsage]'
              history: 7d
              units: '%'
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Percent of store limit used.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Storage usage is too high (over {$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
                  priority: HIGH
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.WARN:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Storage usage is too high (over {$ACTIVEMQ.STORE.MAX.WARN:"{#JMXBROKERNAME}"}%)'
                  priority: AVERAGE
                  dependencies:
                    -
                      name: 'Broker {#JMXBROKERNAME}: Storage usage is too high (over {$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}%)'
                      expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},StorePercentUsage],{$ACTIVEMQ.STORE.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.STORE.MAX.HIGH:"{#JMXBROKERNAME}"}'
            -
              name: 'Broker {#JMXBROKERNAME}: Temp limit'
              type: JMX
              key: 'jmx[{#JMXOBJ},TempLimit]'
              history: 7d
              units: B
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Disk limit, in bytes, used for non-persistent messages and temporary data before producers are blocked.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 1h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: 'Broker {#JMXBROKERNAME}: Temp usage in percents'
              type: JMX
              key: 'jmx[{#JMXOBJ},TempPercentUsage]'
              history: 7d
              units: '%'
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Percent of temp limit used.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.HIGH}'
                  name: 'Broker {#JMXBROKERNAME}: Temp usage is too high (over {$ACTIVEMQ.TEMP.MAX.WARN:"{#JMXBROKERNAME}"}%)'
                  priority: HIGH
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.WARN}'
                  name: 'Broker {#JMXBROKERNAME}: Temp usage is too high (over {$ACTIVEMQ.TEMP.MAX.WARN:"{#JMXBROKERNAME}"}%)'
                  priority: AVERAGE
                  dependencies:
                    -
                      name: 'Broker {#JMXBROKERNAME}: Temp usage is too high (over {$ACTIVEMQ.TEMP.MAX.WARN:"{#JMXBROKERNAME}"}%)'
                      expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TempPercentUsage],{$ACTIVEMQ.TEMP.TIME:"{#JMXBROKERNAME}"})>{$ACTIVEMQ.TEMP.MAX.HIGH}'
            -
              name: 'Broker {#JMXBROKERNAME}: Consumers count total'
              type: JMX
              key: 'jmx[{#JMXOBJ},TotalConsumerCount]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of consumers attached to this broker.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalConsumerCount],{$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME:"{#JMXBROKERNAME}"})<{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Consumers count is too low (below {$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"} for {$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME:"{#JMXBROKERNAME}"})'
                  priority: HIGH
            -
              name: 'Broker {#JMXBROKERNAME}: Messages dequeue rate'
              type: JMX
              key: 'jmx[{#JMXOBJ},TotalDequeueCount]'
              history: 7d
              units: messages/sec
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Rate of messages that have been delivered by the broker and acknowledged by consumers.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: 'Broker {#JMXBROKERNAME}: Messages enqueue rate'
              type: JMX
              key: 'jmx[{#JMXOBJ},TotalEnqueueCount]'
              history: 7d
              units: messages/sec
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Rate of messages that have been sent to the broker.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalEnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"})>avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalEnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"})'
                  name: 'Broker {#JMXBROKERNAME}: Message enqueue rate is higher than dequeue rate for {$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXBROKERNAME}"}'
                  priority: AVERAGE
                  description: 'Enqueue rate is higher than dequeue rate. It may indicate performance problems.'
            -
              name: 'Broker {#JMXBROKERNAME}: Producers count total'
              type: JMX
              key: 'jmx[{#JMXOBJ},TotalProducerCount]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of producers attached to this broker.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},TotalProducerCount],{$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME:"{#JMXBROKERNAME}"})<{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
                  name: 'Broker {#JMXBROKERNAME}: Producers count is too low (below {$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"} for {$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME:"{#JMXBROKERNAME}"})'
                  priority: HIGH
            -
              name: 'Broker {#JMXBROKERNAME}: Uptime'
              type: JMX
              key: 'jmx[{#JMXOBJ},UptimeMillis]'
              history: 7d
              units: s
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'The uptime of the broker.'
              preprocessing:
                -
                  type: MULTIPLIER
                  parameters:
                    - '0.001'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},UptimeMillis])<10m'
                  name: 'Broker {#JMXBROKERNAME}: Broker has been restarted (uptime < 10m)'
                  priority: INFO
                  description: 'Uptime is less than 10 minutes'
                  manual_close: 'YES'
          graph_prototypes:
            -
              name: 'Broker {#JMXBROKERNAME}: Messages rate'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},TotalEnqueueCount]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},TotalDequeueCount]'
            -
              name: 'Broker {#JMXBROKERNAME}: Producers and consumers'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},TotalProducerCount]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},TotalConsumerCount]'
            -
              name: 'Broker {#JMXBROKERNAME}: Resources usage'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ}, MemoryPercentUsage]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},StorePercentUsage]'
                -
                  sortorder: '2'
                  drawtype: GRADIENT_LINE
                  color: F63100
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},TempPercentUsage]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
        -
          name: 'Destinations discovery'
          type: JMX
          key: 'jmx.discovery[beans,"org.apache.activemq:type=Broker,brokerName=*,destinationType=*,destinationName=*"]'
          delay: 1h
          username: '{$ACTIVEMQ.USER}'
          password: '{$ACTIVEMQ.PASSWORD}'
          filter:
            evaltype: FORMULA
            formula: 'A and B'
            conditions:
              -
                macro: '{#JMXDESTINATIONNAME}'
                value: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.MATCHES}'
                formulaid: A
              -
                macro: '{#JMXDESTINATIONNAME}'
                value: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.NOT_MATCHES}'
                operator: NOT_MATCHES_REGEX
                formulaid: B
          description: 'Discovery of destinations'
          item_prototypes:
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count total on {#JMXBROKERNAME}'
              type: JMX
              key: 'jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT: "{#JMXDESTINATIONNAME}"}]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of consumers attached to the broker of this destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
              preprocessing:
                -
                  type: IN_RANGE
                  parameters:
                    - '0'
                    - '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count total on {#JMXBROKERNAME}'
              type: JMX
              key: 'jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT: "{#JMXDESTINATIONNAME}"}]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of producers attached to the broker of this destination. Used to suppress destination''s triggers when the count of producers on the broker is lower than threshold.'
              preprocessing:
                -
                  type: IN_RANGE
                  parameters:
                    - '0'
                    - '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
                  error_handler: CUSTOM_VALUE
                  error_handler_params: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count'
              type: JMX
              key: 'jmx[{#JMXOBJ},ConsumerCount]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of consumers attached to this destination.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages dequeue rate'
              type: JMX
              key: 'jmx[{#JMXOBJ},DequeueCount]'
              history: 7d
              units: messages/sec
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Rate of messages that has been acknowledged (and removed) from the destination.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages enqueue rate'
              type: JMX
              key: 'jmx[{#JMXOBJ},EnqueueCount]'
              history: 7d
              units: messages/sec
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Rate of messages that have been sent to the destination.'
              preprocessing:
                -
                  type: CHANGE_PER_SECOND
                  parameters:
                    - ''
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Expired messages count'
              type: JMX
              key: 'jmx[{#JMXOBJ},ExpiredCount]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of messages that have been expired.'
              preprocessing:
                -
                  type: DISCARD_UNCHANGED_HEARTBEAT
                  parameters:
                    - 3h
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ExpiredCount])>{$ACTIVEMQ.EXPIRIED.WARN:"{#JMXDESTINATIONNAME}"}'
                  name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Expired messages count higher than {$ACTIVEMQ.EXPIRIED.WARN:"{#JMXDESTINATIONNAME}"}'
                  priority: AVERAGE
                  description: 'This metric represents the number of messages that expired before they could be delivered. If you expect all messages to be delivered and acknowledged within a certain amount of time, you can set an expiration for each message, and investigate if your ExpiredCount metric rises above zero.'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage in percents'
              type: JMX
              key: 'jmx[{#JMXOBJ},MemoryPercentUsage]'
              history: 7d
              units: '%'
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'The percentage of the memory limit used.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},MemoryPercentUsage])>{$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXDESTINATIONNAME}"}'
                  name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.HIGH:"{#JMXDESTINATIONNAME}"}%)'
                  priority: HIGH
                -
                  expression: 'last(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},MemoryPercentUsage])>{$ACTIVEMQ.MEM.MAX.WARN:"{#JMXDESTINATIONNAME}"}'
                  name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage is too high (over {$ACTIVEMQ.MEM.MAX.WARN:"{#JMXDESTINATIONNAME}"}%)'
                  priority: AVERAGE
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count'
              type: JMX
              key: 'jmx[{#JMXOBJ},ProducerCount]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of producers attached to this destination.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Queue size'
              type: JMX
              key: 'jmx[{#JMXOBJ},QueueSize]'
              history: 7d
              username: '{$ACTIVEMQ.USER}'
              password: '{$ACTIVEMQ.PASSWORD}'
              description: 'Number of messages on this destination, including any that have been dispatched but not acknowledged.'
              jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
              tags:
                -
                  tag: Application
                  value: '{#JMXBROKERNAME}'
              trigger_prototypes:
                -
                  expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},QueueSize],{$ACTIVEMQ.QUEUE.TIME:"{#JMXDESTINATIONNAME}"})>{$ACTIVEMQ.QUEUE.WARN:"{#JMXDESTINATIONNAME}"} and {$ACTIVEMQ.QUEUE.ENABLED:"{#JMXDESTINATIONNAME}"}=1'
                  name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Queue size higher than {$ACTIVEMQ.QUEUE.WARN:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.QUEUE.TIME:"{#JMXDESTINATIONNAME}"}'
                  priority: AVERAGE
                  description: 'Queue size is higher than threshold. It may indicate performance problems.'
          trigger_prototypes:
            -
              expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ConsumerCount],{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})<{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} and last(/Apache ActiveMQ by JMX/jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT: "{#JMXDESTINATIONNAME}"}])>{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ConsumerCount],{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})>={$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"}'
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Consumers count is too low (below {$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})'
              priority: AVERAGE
              manual_close: 'YES'
            -
              expression: 'avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},EnqueueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"})>avg(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},DequeueCount],{$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"})'
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Message enqueue rate is higher than dequeue rate for {$ACTIVEMQ.MSG.RATE.WARN.TIME:"{#JMXDESTINATIONNAME}"}'
              priority: AVERAGE
              description: 'Enqueue rate is higher than dequeue rate. It may indicate performance problems.'
            -
              expression: 'max(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ProducerCount],{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})<{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} and last(/Apache ActiveMQ by JMX/jmx["org.apache.activemq:type=Broker,brokerName={#JMXBROKERNAME}",{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT: "{#JMXDESTINATIONNAME}"}])>{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH:"{#JMXBROKERNAME}"}'
              recovery_mode: RECOVERY_EXPRESSION
              recovery_expression: 'min(/Apache ActiveMQ by JMX/jmx[{#JMXOBJ},ProducerCount],{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})>={$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"}'
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers count is too low (below {$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH:"{#JMXDESTINATIONNAME}"} for {$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME:"{#JMXDESTINATIONNAME}"})'
              priority: AVERAGE
              manual_close: 'YES'
          graph_prototypes:
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Memory usage'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},MemoryPercentUsage]'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Messages rate'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},EnqueueCount]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},DequeueCount]'
            -
              name: '{#JMXBROKERNAME}: {#JMXDESTINATIONTYPE} {#JMXDESTINATIONNAME}: Producers and consumers'
              graph_items:
                -
                  drawtype: GRADIENT_LINE
                  color: 1A7C11
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},ProducerCount]'
                -
                  sortorder: '1'
                  drawtype: GRADIENT_LINE
                  color: 2774A4
                  item:
                    host: 'Apache ActiveMQ by JMX'
                    key: 'jmx[{#JMXOBJ},ConsumerCount]'
          jmx_endpoint: 'service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi'
      macros:
        -
          macro: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.HIGH}'
          value: '1'
          description: 'Minimum amount of consumers for broker. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.BROKER.CONSUMERS.MIN.TIME}'
          value: 5m
          description: 'Time during which there may be no consumers on destination. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.HIGH}'
          value: '1'
          description: 'Minimum amount of producers for broker. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.BROKER.PRODUCERS.MIN.TIME}'
          value: 5m
          description: 'Time during which there may be no producers on broker. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.HIGH}'
          value: '1'
          description: 'Minimum amount of consumers for destination. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.DESTINATION.CONSUMERS.MIN.TIME}'
          value: 10m
          description: 'Time during which there may be no consumers in destination. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.HIGH}'
          value: '1'
          description: 'Minimum amount of producers for destination. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.DESTINATION.PRODUCERS.MIN.TIME}'
          value: 10m
          description: 'Time during which there may be no producers on destination. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.EXPIRIED.WARN}'
          value: '0'
          description: 'Threshold for expiried messages count. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.LLD.FILTER.BROKER.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable discovered brokers'
        -
          macro: '{$ACTIVEMQ.LLD.FILTER.BROKER.NOT_MATCHES}'
          value: 'CHANGE IF NEEDED'
          description: 'Filter to exclude discovered brokers'
        -
          macro: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.MATCHES}'
          value: '.*'
          description: 'Filter of discoverable discovered destinations'
        -
          macro: '{$ACTIVEMQ.LLD.FILTER.DESTINATION.NOT_MATCHES}'
          value: 'CHANGE IF NEEDED'
          description: 'Filter to exclude discovered destinations'
        -
          macro: '{$ACTIVEMQ.MEM.MAX.HIGH}'
          value: '90'
          description: 'Memory threshold for HIGH trigger. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.MEM.MAX.WARN}'
          value: '75'
          description: 'Memory threshold for AVERAGE trigger. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.MEM.TIME}'
          value: 5m
          description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.MSG.RATE.WARN.TIME}'
          value: 15m
          description: 'The time for message enqueue/dequeue rate. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.PASSWORD}'
          value: activemq
          description: 'Password for JMX'
        -
          macro: '{$ACTIVEMQ.PORT}'
          value: '1099'
          description: 'Port for JMX'
        -
          macro: '{$ACTIVEMQ.QUEUE.ENABLED}'
          value: '1'
          description: 'Use this to disable alerting for specific destination. 1 = enabled, 0 = disabled. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.QUEUE.TIME}'
          value: 10m
          description: 'Time during which the QueueSize can be higher than threshold. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.QUEUE.WARN}'
          value: '100'
          description: 'Threshold for QueueSize. Can be used with destination name as context.'
        -
          macro: '{$ACTIVEMQ.STORE.MAX.HIGH}'
          value: '90'
          description: 'Storage threshold for HIGH trigger. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.STORE.MAX.WARN}'
          value: '75'
          description: 'Storage threshold for AVERAGE trigger. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.STORE.TIME}'
          value: 5m
          description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.TEMP.MAX.HIGH}'
          value: '90'
          description: 'Temp threshold for HIGH trigger. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.TEMP.MAX.WARN}'
          value: '75'
          description: 'Temp threshold for AVERAGE trigger. Can be used with broker name as context.'
        -
          macro: '{$ACTIVEMQ.TEMP.TIME}'
          value: 5m
          description: 'Time during which the metric can be above the threshold. Can be used with destination or broker name as context.'
        -
          macro: '{$ACTIVEMQ.TOTAL.CONSUMERS.COUNT}'
          value: TotalConsumerCount
          description: 'Attribute for TotalConsumerCount per destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
        -
          macro: '{$ACTIVEMQ.TOTAL.PRODUCERS.COUNT}'
          value: TotalProducerCount
          description: 'Attribute for TotalProducerCount per destination. Used to suppress destination''s triggers when the count of consumers on the broker is lower than threshold.'
        -
          macro: '{$ACTIVEMQ.USER}'
          value: admin
          description: 'User for JMX'