Skip to content

Instantly share code, notes, and snippets.

@Cromeshnic
Created August 23, 2013 07:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Cromeshnic/6316503 to your computer and use it in GitHub Desktop.
Save Cromeshnic/6316503 to your computer and use it in GitHub Desktop.
Zabbix 2.0 template for ActiveMQ with JMX LLD for brokers and destinations. Feel free to contribute.
<?xml version="1.0" encoding="UTF-8"?>
<!--
by Semyon Koshechkin (c) 2013
https://github.com/Cromeshnic
Zabbix ActiveMQ monitoring template with LLD support for:
- Brokers
- Topics
- Queues
JMX LLD now works only with patch for zabbix_java: https://gist.github.com/Cromeshnic/6303320
Zabbix feature request for JMX LLD: https://support.zabbix.com/browse/ZBXNEXT-1223
Macros:
{$JMX_USERNAME}
{$JMX_PASSWORD}
{$AMQ_BROKER_MEM_USAGE_THRESHOLD} = 85% - upper threshold for trigger
{$AMQ_BROKER_STORE_USAGE_THRESHOLD} = 85% - upper threshold for trigger
{$AMQ_BROKER_TMP_USAGE_THRESHOLD} = 85% - upper threshold for trigger
{$AMQ_DESTINATION_CONSUMER_COUNT_THRESHOLD_MIN} = 0 - lower threshold for trigger
{$AMQ_DESTINATION_PRODUCER_COUNT_THRESHOLD_MIN} = 0 - lower threshold for trigger
{$AMQ_DESTINATION_QUEUE_SIZE_THRESHOLD} = 10 - upper threshold for trigger
Regular expression:
@ActiveMQ destination object: - object name filter for destinations
Example - all topics and queues except ActiveMQ.Advisory.* :
- not include: "Destination=ActiveMQ.Advisory"
- TRUE: "^org.apache.activemq:BrokerName=.*,Type=(Topic|Queue),Destination=.*$"
(negative lookahead (!?ActiveMQ.Advisory) doesn't work somehow :-[ )
-->
<zabbix_export>
<version>2.0</version>
<date>2013-08-23T07:01:11Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template JMX ActiveMQ</template>
<name>Template JMX ActiveMQ</name>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>Brokers</name>
</application>
<application>
<name>Destinations</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>ActiveMQ brokers</name>
<type>16</type>
<snmp_community/>
<snmp_oid/>
<key>jmx.discovery[&quot;org.apache.activemq:BrokerName=*,Type=Broker&quot;,BrokerName]</key>
<delay>3600</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<filter>:</filter>
<lifetime>30</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>MemoryLimit for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,MemoryLimit]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>byte</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>MemoryPercentUsage for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,MemoryPercentUsage]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>StoreLimit for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,StoreLimit]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>byte</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>StorePercentUsage for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,StorePercentUsage]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TempLimit for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TempLimit]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>byte</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TempPercentUsage for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TempPercentUsage]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>%</units>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TotalConsumerCount for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalConsumerCount]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TotalDequeueCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalDequeueCount]</key>
<delay>30</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TotalEnqueueCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalEnqueueCount]</key>
<delay>30</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>TotalMessageCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalMessageCount]</key>
<delay>30</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of unacknowledged messages on the broker per minute</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Brokers</name>
</application>
</applications>
<valuemap/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,MemoryPercentUsage].last(0)}&gt;{$AMQ_BROKER_MEM_USAGE_THRESHOLD}</expression>
<name>MemoryPercentUsage &gt;{$AMQ_BROKER_MEM_USAGE_THRESHOLD}% for broker {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,StorePercentUsage].last(0)}&gt;{$AMQ_BROKER_STORE_USAGE_THRESHOLD}</expression>
<name>StorePercentUsage &gt;{$AMQ_BROKER_STORE_USAGE_THRESHOLD}% for broker {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,TempPercentUsage].last(0)}&gt;{$AMQ_BROKER_TMP_USAGE_THRESHOLD}</expression>
<name>TempPercentUsage &gt;{$AMQ_BROKER_TMP_USAGE_THRESHOLD}% for broker {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Memory limits for broker {#JMXVALUE}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>0</show_work_period>
<show_triggers>0</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>0</ymin_type_1>
<ymax_type_1>0</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>0</drawtype>
<color>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,MemoryLimit]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>00C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,StoreLimit]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>0</drawtype>
<color>0000C8</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,TempLimit]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>Memory percent usages for broker {#JMXVALUE}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>1</ymin_type_1>
<ymax_type_1>1</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>0</drawtype>
<color>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,MemoryPercentUsage]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>00C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,StorePercentUsage]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>0</drawtype>
<color>0000C8</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,TempPercentUsage]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>Total message counters for broker {#JMXVALUE}</name>
<width>900</width>
<height>200</height>
<yaxismin>0.0000</yaxismin>
<yaxismax>100.0000</yaxismax>
<show_work_period>1</show_work_period>
<show_triggers>1</show_triggers>
<type>0</type>
<show_legend>1</show_legend>
<show_3d>0</show_3d>
<percent_left>0.0000</percent_left>
<percent_right>0.0000</percent_right>
<ymin_type_1>0</ymin_type_1>
<ymax_type_1>0</ymax_type_1>
<ymin_item_1>0</ymin_item_1>
<ymax_item_1>0</ymax_item_1>
<graph_items>
<graph_item>
<sortorder>0</sortorder>
<drawtype>0</drawtype>
<color>C80000</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalDequeueCount]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>0</drawtype>
<color>00C800</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalEnqueueCount]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>0</drawtype>
<color>0000C8</color>
<yaxisside>0</yaxisside>
<calc_fnc>2</calc_fnc>
<type>0</type>
<item>
<host>Template JMX ActiveMQ</host>
<key>jmx[&quot;{#JMXOBJ}&quot;,TotalMessageCount]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
<discovery_rule>
<name>ActiveMQ destinations</name>
<type>16</type>
<snmp_community/>
<snmp_oid/>
<key>jmx.discovery[&quot;org.apache.activemq:BrokerName=*,Type=*,Destination=*&quot;,Name]</key>
<delay>3600</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<filter>{#JMXOBJ}:@ActiveMQ destination object</filter>
<lifetime>30</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>AverageEnqueueTime for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,AverageEnqueueTime]</key>
<delay>300</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Average time a message has been held this destination</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>ConsumerCount for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,ConsumerCount]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of consumers subscribed to this destination.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>DequeueCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,DequeueCount]</key>
<delay>30</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of messages per minute that have been acknowledged (and removed from) from the destination.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>EnqueueCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,EnqueueCount]</key>
<delay>30</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of messages per minute that have been sent to the destination.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>ExpiredCount per minute for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>1</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,ExpiredCount]</key>
<delay>30</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units/>
<delta>1</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>60</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of messages per minute that have been expired.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>ProducerCount for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,ProducerCount]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of producers publishing to this destination</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
<item_prototype>
<name>QueueSize for {#JMXVALUE}</name>
<type>16</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>jmx[&quot;{#JMXOBJ}&quot;,QueueSize]</key>
<delay>60</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase/>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username>{$JMX_USERNAME}</username>
<password>{$JMX_PASSWORD}</password>
<publickey/>
<privatekey/>
<port/>
<description>Number of messages in the destination which are yet to be consumed. Potentially dispatched but unacknowledged.</description>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Destinations</name>
</application>
</applications>
<valuemap/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,ExpiredCount].last(0)}&gt;0</expression>
<name>Expired messages in {#JMXVALUE}!</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,QueueSize].last(0)}&gt;{$AMQ_DESTINATION_QUEUE_SIZE_THRESHOLD}</expression>
<name>QueueSize &gt;{$AMQ_DESTINATION_QUEUE_SIZE_THRESHOLD} for {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description>Queue {#JMXVALUE} size threshold exceeded!</description>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,ConsumerCount].last(0)}&lt;{$AMQ_DESTINATION_CONSUMER_COUNT_THRESHOLD_MIN}</expression>
<name>Too few (&lt;{$AMQ_DESTINATION_CONSUMER_COUNT_THRESHOLD_MIN}) consumers for {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{Template JMX ActiveMQ:jmx[&quot;{#JMXOBJ}&quot;,ProducerCount].last(0)}&lt;{$AMQ_DESTINATION_PRODUCER_COUNT_THRESHOLD_MIN}</expression>
<name>Too few (&lt;{$AMQ_DESTINATION_PRODUCER_COUNT_THRESHOLD_MIN}) producers for {#JMXVALUE}</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes/>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$AMQ_BROKER_MEM_USAGE_THRESHOLD}</macro>
<value>85</value>
</macro>
<macro>
<macro>{$AMQ_BROKER_STORE_USAGE_THRESHOLD}</macro>
<value>85</value>
</macro>
<macro>
<macro>{$AMQ_BROKER_TMP_USAGE_THRESHOLD}</macro>
<value>85</value>
</macro>
<macro>
<macro>{$AMQ_DESTINATION_CONSUMER_COUNT_THRESHOLD_MIN}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$AMQ_DESTINATION_PRODUCER_COUNT_THRESHOLD_MIN}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$AMQ_DESTINATION_QUEUE_SIZE_THRESHOLD}</macro>
<value>10</value>
</macro>
</macros>
<templates/>
<screens/>
</template>
</templates>
</zabbix_export>
@chiragpujara
Copy link

I am new to zabbix. Do I have to add anything onagent config file to use your template. If yes can you share that.

thanks in advance.

@richlv
Copy link

richlv commented Mar 10, 2015

regarding negative lookahead, zabbix daemons only support posix extended: https://www.zabbix.com/documentation/2.4/manual/regular_expressions

@NezumiRyu
Copy link

ERROR: Cannot update template

Created: Application "Destinations" on "amq-queues".
Created: Application "Brokers" on "amq-queues".
Cannot find host interface on "amq-queues" for item key "jmx.discovery["org.apache.activemq:BrokerName=*,Type=Broker",BrokerName]".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment