rabbitmq3.6.10版本node
具體監控什麼東西,主要是rabbitmq-web監控頁面的overview內容
還有就是隊列堆積數,若是超過某個數值,好比5000個就立馬報警python
[root@test-mq02 ~]# ll -al /etc/zabbix/script/rabbitmq/ total 44 drwxr-xr-x 2 root root 4096 Feb 6 11:22 . drwxr-xr-x 3 root root 4096 Feb 1 15:48 .. -rwxr-xr-x 1 root root 13155 Feb 1 16:29 api.py -rwxr-xr-x 1 root root 424 Jul 21 2017 list_rabbit_nodes.sh -rwxr-xr-x 1 root root 426 Jul 21 2017 list_rabbit_queues.sh -rwxr-xr-x 1 root root 430 Jul 21 2017 list_rabbit_shovels.sh -rw-r--r-- 1 root root 138 Feb 6 11:22 .rab.auth -rwxr-xr-x 1 root root 782 Jul 21 2017 rabbitmq-status.sh
api.pygit
#!/usr/bin/env /usr/bin/python '''Python module to query the RabbitMQ Management Plugin REST API and get results that can then be used by Zabbix. https://github.com/jasonmcintosh/rabbitmq-zabbix ''' import json import optparse import socket import urllib2 import subprocess import tempfile import os import logging class RabbitMQAPI(object): '''Class for RabbitMQ Management API''' def __init__(self, user_name='guest', password='guest', host_name='', port=15672, conf='/etc/zabbix/zabbix_agentd.conf', senderhostname=None, protocol='http'): self.user_name = user_name self.password = password self.host_name = host_name or socket.gethostname() self.port = port self.conf = conf or '/etc/zabbix/zabbix_agentd.conf' self.senderhostname = senderhostname self.protocol = protocol or 'http' def call_api(self, path): '''Call the REST API and convert the results into JSON.''' url = '{0}://{1}:{2}/api/{3}'.format(self.protocol, self.host_name, self.port, path) password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() password_mgr.add_password(None, url, self.user_name, self.password) handler = urllib2.HTTPBasicAuthHandler(password_mgr) logging.debug('Issue a rabbit API call to get data on ' + path + " against " + self.host_name) logging.debug('Full URL:' + url) return json.loads(urllib2.build_opener(handler).open(url).read()) def list_queues(self, filters=None): ''' List all of the RabbitMQ queues, filtered against the filters provided in .rab.auth. See README.md for more information. ''' queues = [] if not filters: filters = [{}] for queue in self.call_api('queues'): logging.debug("Discovered queue " + queue['name'] + ", checking to see if it's filtered...") for _filter in filters: check = [(x, y) for x, y in queue.items() if x in _filter] shared_items = set(_filter.items()).intersection(check) if len(shared_items) == len(_filter): element = {'{#NODENAME}': queue['node'], '{#VHOSTNAME}': queue['vhost'], '{#QUEUENAME}': queue['name']} queues.append(element) logging.debug('Discovered queue '+queue['vhost']+'/'+queue['name']) break return queues def list_shovels(self, filters=None): ''' List all of the RabbitMQ shovels, filtered against the filters provided in .rab.auth. See README.md for more information. ''' shovels = [] if not filters: filters = [{}] try: for shovel in self.call_api('shovels'): logging.debug("Discovered shovel " + shovel['name'] + ", checking to see if it's filtered...") for _filter in filters: check = [(x, y) for x, y in shovel.items() if x in _filter] shared_items = set(_filter.items()).intersection(check) if len(shared_items) == len(_filter): element = {'{#VHOSTNAME}': shovel['vhost'], '{#SHOVELNAME}': shovel['name']} shovels.append(element) logging.debug('Discovered shovel '+shovel['vhost']+'/'+shovel['name']) break return shovels except urllib2.HTTPError as err: if err.code == 404: return shovels else: raise err def list_nodes(self): '''Lists all rabbitMQ nodes in the cluster''' nodes = [] for node in self.call_api('nodes'): # We need to return the node name, because Zabbix # does not support @ as an item parameter name = node['name'].split('@')[1] element = {'{#NODENAME}': name, '{#NODETYPE}': node['type']} nodes.append(element) logging.debug('Discovered nodes '+name+'/'+node['type']) return nodes def check_queue(self, filters=None): '''Return the value for a specific item in a queue's details.''' return_code = 0 if not filters: filters = [{}] rdatafile = tempfile.NamedTemporaryFile(delete=False) for queue in self.call_api('queues'): success = False logging.debug("Filtering out by " + str(filters)) for _filter in filters: check = [(x, y) for x, y in queue.items() if x in _filter] shared_items = set(_filter.items()).intersection(check) if len(shared_items) == len(_filter): success = True break if success: self._prepare_data(queue, rdatafile) rdatafile.close() return_code = self._send_data(rdatafile) os.unlink(rdatafile.name) return return_code def check_shovel(self, filters=None): '''Return the value for a specific item in a shovel's details.''' return_code = 0 if not filters: filters = [{}] rdatafile = tempfile.NamedTemporaryFile(delete=False) for shovel in self.call_api('shovels'): success = False logging.debug("Filtering out by " + str(filters)) for _filter in filters: check = [(x, y) for x, y in shovel.items() if x in _filter] shared_items = set(_filter.items()).intersection(check) if len(shared_items) == len(_filter): success = True break if success: key = '"rabbitmq.shovels[{0},shovel_{1},{2}]"' key = key.format(shovel['vhost'], 'state', shovel['name']) value = shovel.get('state', 0) logging.debug("SENDER_DATA: - %s %s" % (key,value)) rdatafile.write("- %s %s\n" % (key, value)) rdatafile.close() return_code = self._send_data(rdatafile) os.unlink(rdatafile.name) return return_code def _prepare_data(self, queue, tmpfile): '''Prepare the queue data for sending''' for item in ['memory', 'messages', 'messages_unacknowledged', 'consumers']: key = '"rabbitmq.queues[{0},queue_{1},{2}]"' key = key.format(queue['vhost'], item, queue['name']) value = queue.get(item, 0) logging.debug("SENDER_DATA: - %s %s" % (key,value)) tmpfile.write("- %s %s\n" % (key, value)) ## This is a non standard bit of information added after the standard items for item in ['deliver_get', 'publish', 'ack']: key = '"rabbitmq.queues[{0},queue_message_stats_{1},{2}]"' key = key.format(queue['vhost'], item, queue['name']) value = queue.get('message_stats', {}).get(item, 0) logging.debug("SENDER_DATA: - %s %s" % (key,value)) tmpfile.write("- %s %s\n" % (key, value)) def _send_data(self, tmpfile): '''Send the queue data to Zabbix.''' args = 'zabbix_sender -vv -c {0} -i {1}' if self.senderhostname: args = args + " -s " + self.senderhostname return_code = 0 process = subprocess.Popen(args.format(self.conf, tmpfile.name), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = process.communicate() logging.debug("Finished sending data") return_code = process.wait() logging.info("Found return code of " + str(return_code)) if return_code == 1: logging.error(out) logging.error(err) else: logging.debug(err) logging.debug(out) return return_code def check_aliveness(self): '''Check the aliveness status of a given vhost.''' return self.call_api('aliveness-test/%2f')['status'] def check_server(self, item, node_name): '''First, check the overview specific items''' if item == 'message_stats_deliver_get': return self.call_api('overview').get('message_stats', {}).get('deliver_get_details', {}).get('rate',0) elif item == 'message_stats_publish': return self.call_api('overview').get('message_stats', {}).get('publish_details', {}).get('rate',0) elif item == 'message_stats_ack': return self.call_api('overview').get('message_stats', {}).get('ack_details', {}).get('rate',0) elif item == 'message_count_total': return self.call_api('overview').get('queue_totals', {}).get('messages',0) elif item == 'message_count_ready': return self.call_api('overview').get('queue_totals', {}).get('messages_ready',0) elif item == 'message_count_unacknowledged': return self.call_api('overview').get('queue_totals', {}).get('messages_unacknowledged',0) elif item == 'rabbitmq_version': return self.call_api('overview').get('rabbitmq_version', 'None') '''Return the value for a specific item in a node's details.''' node_name = node_name.split('.')[0] nodeInfo = self.call_api('nodes') for nodeData in nodeInfo: logging.debug("Checking to see if node name {0} is in {1} for item {2} found {3} nodes".format(node_name, nodeData['name'], item, len(nodeInfo))) if node_name in nodeData['name'] or len(nodeInfo) == 1: logging.debug("Got data from node {0} of {1} ".format(node_name, nodeData.get(item))) return nodeData.get(item) return 'Not Found' def main(): '''Command-line parameters and decoding for Zabbix use/consumption.''' choices = ['list_queues', 'list_shovels', 'list_nodes', 'queues', 'shovels', 'check_aliveness', 'server'] parser = optparse.OptionParser() parser.add_option('--username', help='RabbitMQ API username', default='guest') parser.add_option('--password', help='RabbitMQ API password', default='guest') parser.add_option('--hostname', help='RabbitMQ API host', default=socket.gethostname()) parser.add_option('--protocol', help='Use http or https', default='http') parser.add_option('--port', help='RabbitMQ API port', type='int', default=15672) parser.add_option('--check', type='choice', choices=choices, help='Type of check') parser.add_option('--metric', help='Which metric to evaluate', default='') parser.add_option('--filters', help='Filter used queues (see README)') parser.add_option('--node', help='Which node to check (valid for --check=server)') parser.add_option('--conf', default='/etc/zabbix/zabbix_agentd.conf') parser.add_option('--senderhostname', default='', help='Allows including a sender parameter on calls to zabbix_sender') parser.add_option('--logfile', help='File to log errors (defaults to /var/log/zabbix/rabbitmq_zabbix.log)', default='/var/log/zabbix/rabbitmq_zabbix.log') parser.add_option('--loglevel', help='Defaults to INFO', default='INFO') (options, args) = parser.parse_args() if not options.check: parser.error('At least one check should be specified') logging.basicConfig(filename=options.logfile or "/var/log/zabbix/rabbitmq_zabbix.log", level=logging.getLevelName(options.loglevel or "INFO"), format='%(asctime)s %(levelname)s: %(message)s') logging.debug("Started trying to process data") api = RabbitMQAPI(user_name=options.username, password=options.password, host_name=options.hostname, port=options.port, conf=options.conf, senderhostname=options.senderhostname, protocol=options.protocol) if options.filters: try: filters = json.loads(options.filters) except KeyError: parser.error('Invalid filters object.') else: filters = [{}] if not isinstance(filters, (list, tuple)): filters = [filters] if options.check == 'list_queues': print json.dumps({'data': api.list_queues(filters)}) elif options.check == 'list_nodes': print json.dumps({'data': api.list_nodes()}) elif options.check == 'list_shovels': print json.dumps({'data': api.list_shovels()}) elif options.check == 'queues': print api.check_queue(filters) elif options.check == 'shovels': print api.check_shovel(filters) elif options.check == 'check_aliveness': print api.check_aliveness() elif options.check == 'server': if not options.metric: parser.error('Missing required parameter: "metric"') else: if options.node: print api.check_server(options.metric, options.node) else: print api.check_server(options.metric, api.host_name) if __name__ == '__main__': main()
list_rabbit_nodes.shgithub
#!/bin/bash # # https://github.com/jasonmcintosh/rabbitmq-zabbix # cd "$(dirname "$0")" . .rab.auth if [[ -z "$HOSTNAME" ]]; then HOSTNAME=`hostname` fi if [[ -z "$NODE" ]]; then NODE=`hostname` fi ./api.py --username=$USERNAME --password=$PASSWORD --check=list_nodes --filter="$FILTER" --conf=$CONF --hostname=$HOSTNAME --node="$NODE" --loglevel=${LOGLEVEL} --logfile=${LOGFILE} --port=$PORT --protocol=$PROTOCOL
list_rabbit_queues.shweb
#!/bin/bash # # https://github.com/jasonmcintosh/rabbitmq-zabbix # cd "$(dirname "$0")" . .rab.auth if [[ -z "$HOSTNAME" ]]; then HOSTNAME=`hostname` fi if [[ -z "$NODE" ]]; then NODE=`hostname` fi ./api.py --username=$USERNAME --password=$PASSWORD --check=list_queues --filter="$FILTER" --conf=$CONF --hostname=$HOSTNAME --node="$NODE" --loglevel=${LOGLEVEL} --logfile=${LOGFILE} --port=$PORT --protocol=$PROTOCOL
list_rabbit_shovels.shshell
#!/bin/bash # # https://github.com/jasonmcintosh/rabbitmq-zabbix # cd "$(dirname "$0")" . .rab.auth if [[ -z "$HOSTNAME" ]]; then HOSTNAME=`hostname` fi if [[ -z "$NODE" ]]; then NODE=`hostname` fi ./api.py --username=$USERNAME --password=$PASSWORD --check=list_shovels --filter="$FILTER" --hostname=$HOSTNAME --node="$NODE" --conf=$CONF --loglevel=${LOGLEVEL} --logfile=${LOGFILE} --port=$PORT --protocol=$PROTOCOL
rabbitmq-status.shexpress
#!/bin/bash # # https://github.com/jasonmcintosh/rabbitmq-zabbix # #UserParameter=rabbitmq[*],<%= zabbix_script_dir %>/rabbitmq-status.sh cd "$(dirname "$0")" . .rab.auth TYPE_OF_CHECK=$1 METRIC=$2 NODE=$3 if [[ -z "$HOSTNAME" ]]; then HOSTNAME=`hostname` fi if [[ -z "$NODE" ]]; then NODE=`hostname` fi #rabbitmq[queues] #rabbitmq[server,disk_free] #rabbitmq[check_aliveness] # This assumes that the server is going to then use zabbix_sender to feed the data BACK to the server. Right now, I'm doing that # in the python script ./api.py --hostname=$HOSTNAME --username=$USERNAME --password=$PASSWORD --check=$TYPE_OF_CHECK --metric=$METRIC --node="$NODE" --filters="$FILTER" --conf=$CONF --loglevel=${LOGLEVEL} --logfile=${LOGFILE} --port=$PORT --protocol=$PROTOCOL
.rab.authjson
USERNAME=xxxxx PASSWORD=xxxxx CONF=/etc/zabbix/zabbix_agentd.conf LOGLEVEL=INFO LOGFILE=/var/log/zabbix/rabbitmq_zabbix.log PORT=15672
/etc/zabbix/zabbix_agentd.d/rabbitmq_status.confapi
UserParameter=rabbitmq.discovery_queues,/etc/zabbix/script/rabbitmq/list_rabbit_queues.sh UserParameter=rabbitmq.discovery_shovels,/etc/zabbix/script/rabbitmq/list_rabbit_shovels.sh UserParameter=rabbitmq.discovery_nodes,/etc/zabbix/script/rabbitmq/list_rabbit_nodes.sh UserParameter=rabbitmq[*],/etc/zabbix/script/rabbitmq/rabbitmq-status.sh $1 $2 $3
rabbitmq.template.xmlbash
<?xml version="1.0" encoding="UTF-8"?> <zabbix_export> <version>2.0</version> <date>2016-09-14T11:33:16Z</date> <groups> <group> <name>Rabbit Servers</name> </group> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>Template App RabbitMQ v3</template> <name>Template App RabbitMQ v3</name> <description/> <groups> <group> <name>Rabbit Servers</name> </group> <group> <name>Templates</name> </group> </groups> <applications> <application> <name>rabbitmq data</name> </application> <application> <name>rabbitmq server</name> </application> </applications> <items> <item> <name>RabbitMQ Check Aliveness</name> <type>0</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[check_aliveness]</key> <delay>60</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>4</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Message Deliver Rates</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,message_stats_deliver_get]</key> <delay>60</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>msgs/s</units> <delta>1</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Message Receive Rates</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,message_stats_publish]</key> <delay>60</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>msgs/s</units> <delta>1</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>This is the number of messages published TO the rabbit server</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Messages Total Count</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,message_count_total]</key> <delay>30</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>msgs</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>This is the total number of messages</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Messages Total Ready</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,message_count_ready]</key> <delay>30</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>msgs</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>This is the total number of ready messages</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Messages Total Unacknowledged</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,message_count_unacknowledged]</key> <delay>30</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>msgs</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>This is the total number of unacknowledged messages</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Refresh Rabbit Queue Status</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[queues]</key> <delay>30</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Refresh Rabbit Shovel Status</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[shovels]</key> <delay>30</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>4</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Disk Free</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,disk_free]</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>bytes</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server File Desc Limit</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,fd_total]</key> <delay>1800</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server File Desc Percent Used</name> <type>15</type> <snmp_community/> <multiplier>1</multiplier> <snmp_oid/> <key>rabbitmq.server.filedesc.percentused</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>%</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>100</formula> <delay_flex/> <params>last("rabbitmq[server,fd_used]")/last("rabbitmq[server,fd_total]")</params> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server File Desc Used</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,fd_used]</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Memory Limit</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,mem_limit]</key> <delay>1800</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>bytes</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Memory Percent Used</name> <type>15</type> <snmp_community/> <multiplier>1</multiplier> <snmp_oid/> <key>rabbitmq.server.mem.percentused</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>%</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>100</formula> <delay_flex/> <params>last("rabbitmq[server,mem_used]")/last("rabbitmq[server,mem_limit]")</params> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Memory Used</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,mem_used]</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>bytes</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Partitions</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,partitions]</key> <delay>30</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>1</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>Server partitions - SHOULD be [] which is none, so if something shows up here, partition has occurred.</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Sockets Limit</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,sockets_total]</key> <delay>1800</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Sockets Percent Used</name> <type>15</type> <snmp_community/> <multiplier>1</multiplier> <snmp_oid/> <key>rabbitmq.server.sockets.percentused</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>%</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>100</formula> <delay_flex/> <params>last("rabbitmq[server,sockets_used]")/last("rabbitmq[server,sockets_total]")</params> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Sockets Used</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,sockets_used]</key> <delay>300</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> <item> <name>RabbitMQ Server Version</name> <type>7</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq[server,rabbitmq_version]</key> <delay>3600</delay> <history>90</history> <trends>365</trends> <status>0</status> <value_type>4</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>RabbitMQ Server Version</description> <inventory_link>18</inventory_link> <applications> <application> <name>rabbitmq server</name> </application> </applications> <valuemap/> <logtimefmt/> </item> </items> <discovery_rules> <discovery_rule> <name>rabbitmq queues</name> <type>7</type> <snmp_community/> <snmp_oid/> <key>rabbitmq.discovery_queues</key> <delay>360</delay> <status>0</status> <allowed_hosts/> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <delay_flex/> <params/> <ipmi_sensor/> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <filter> <evaltype>1</evaltype> <formula/> <conditions> <condition> <macro>{#VHOSTNAME}</macro> <value></value> <operator>8</operator> <formulaid>A</formulaid> </condition> </conditions> </filter> <lifetime>1</lifetime> <description/> <item_prototypes> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_messages_unacknowledged,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>90</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_deliver_get,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>msgs/s</units> <delta>1</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>Rate of message delivery to a consumer per queue</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_consumers,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>90</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_memory,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>90</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units>B</units> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_ack,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>msgs/s</units> <delta>1</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>Rate of message acknowledgement per queue</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_publish,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>0</value_type> <allowed_hosts/> <units>msgs/s</units> <delta>1</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>Rate of message delivery to a consumer per queue</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> <item_prototype> <name>RabbitMQ $2 on vhost $1, queue $3</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}]</key> <delay>0</delay> <history>7</history> <trends>90</trends> <status>0</status> <value_type>3</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description/> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> </item_prototypes> <trigger_prototypes> <trigger_prototype> <expression>{Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}].nodata(10m)}=1</expression> <name>No data received on queue {#VHOSTNAME}/{#QUEUENAME} in 10 minutes.</name> <url/> <status>0</status> <priority>4</priority> <description>No data received on queue {#VHOSTNAME}/{#QUEUENAME}</description> <type>0</type> </trigger_prototype> <trigger_prototype> <expression>{Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_consumers,{#QUEUENAME}].max(120)}=0 and {Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}].max(120)}<>0</expression> <name>No queue consumer found and messages present on: {#VHOSTNAME}/{#QUEUENAME}</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> </trigger_prototype> <trigger_prototype> <expression>{Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}].last(0)}>{$RABBIT_QUEUE_MESSAGES_CRIT}</expression> <name>{#NODENAME}/{#VHOSTNAME}/{#QUEUENAME} - CRITICAL</name> <url>http://{#FQDN}:15672/#/queues/</url> <status>0</status> <priority>4</priority> <description/> <type>0</type> </trigger_prototype> <trigger_prototype> <expression>{Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}].last(0)}>{$RABBIT_QUEUE_MESSAGES_WARN} and {Template App RabbitMQ v3:rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}].last(0)}<{$RABBIT_QUEUE_MESSAGES_CRIT}</expression> <name>{#NODENAME}/{#VHOSTNAME}/{#QUEUENAME} - Warning</name> <url>http://{#FQDN}:15672/#/queues/</url> <status>0</status> <priority>2</priority> <description/> <type>0</type> </trigger_prototype> </trigger_prototypes> <graph_prototypes> <graph_prototype> <name>Message count on {#VHOSTNAME}/{#QUEUENAME}</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>2</drawtype> <color>00C800</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>Template App RabbitMQ v3</host> <key>rabbitmq.queues[{#VHOSTNAME},queue_messages,{#QUEUENAME}]</key> </item> </graph_item> <graph_item> <sortorder>1</sortorder> <drawtype>2</drawtype> <color>C80000</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>Template App RabbitMQ v3</host> <key>rabbitmq.queues[{#VHOSTNAME},queue_messages_unacknowledged,{#QUEUENAME}]</key> </item> </graph_item> </graph_items> </graph_prototype> <graph_prototype> <name>Message rates on {#VHOSTNAME}/{#QUEUENAME}</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 App RabbitMQ v3</host> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_deliver_get,{#QUEUENAME}]</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 App RabbitMQ v3</host> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_publish,{#QUEUENAME}]</key> </item> </graph_item> <graph_item> <sortorder>3</sortorder> <drawtype>0</drawtype> <color>0000C8</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>Template App RabbitMQ v3</host> <key>rabbitmq.queues[{#VHOSTNAME},queue_message_stats_ack,{#QUEUENAME}]</key> </item> </graph_item> </graph_items> </graph_prototype> </graph_prototypes> <host_prototypes/> </discovery_rule> <discovery_rule> <name>rabbitmq shovels</name> <type>7</type> <snmp_community/> <snmp_oid/> <key>rabbitmq.discovery_shovels</key> <delay>360</delay> <status>0</status> <allowed_hosts/> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <delay_flex/> <params/> <ipmi_sensor/> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <filter> <evaltype>1</evaltype> <formula/> <conditions> <condition> <macro>{#VHOSTNAME}</macro> <value></value> <operator>8</operator> <formulaid>A</formulaid> </condition> </conditions> </filter> <lifetime>1</lifetime> <description/> <item_prototypes> <item_prototype> <name>RabbitMQ $2 on vhost $1, shovel $3 status</name> <type>2</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>rabbitmq.shovels[{#VHOSTNAME},shovel_state,{#SHOVELNAME}]</key> <delay>0</delay> <history>7</history> <trends>365</trends> <status>0</status> <value_type>4</value_type> <allowed_hosts/> <units/> <delta>0</delta> <snmpv3_contextname/> <snmpv3_securityname/> <snmpv3_securitylevel>0</snmpv3_securitylevel> <snmpv3_authprotocol>0</snmpv3_authprotocol> <snmpv3_authpassphrase/> <snmpv3_privprotocol>0</snmpv3_privprotocol> <snmpv3_privpassphrase/> <formula>1</formula> <delay_flex/> <params/> <ipmi_sensor/> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <privatekey/> <port/> <description>Shovel Status</description> <inventory_link>0</inventory_link> <applications> <application> <name>rabbitmq data</name> </application> </applications> <valuemap/> <logtimefmt/> </item_prototype> </item_prototypes> <trigger_prototypes> <trigger_prototype> <expression>{Template App RabbitMQ v3:rabbitmq.shovels[{#VHOSTNAME},shovel_state,{#SHOVELNAME}].str(running,1)}=0</expression> <name>Shovel {#SHOVELNAME} on Vhost {#VHOSTNAME} is not running</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> </trigger_prototype> </trigger_prototypes> <graph_prototypes/> <host_prototypes/> </discovery_rule> </discovery_rules> <macros> <macro> <macro>{$RABBIT_QUEUE_MESSAGES_CRIT}</macro> <value>200000</value> </macro> <macro> <macro>{$RABBIT_QUEUE_MESSAGES_WARN}</macro> <value>100000</value> </macro> </macros> <templates/> <screens/> </template> </templates> <triggers> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq[check_aliveness].str(ok)}=0</expression> <name>Dead Rabbit</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.filedesc.percentused.last(0)}>50</expression> <name>Percent file descriptors greater than 50%</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies> <dependency> <name>Percent file descriptors greater than 75%</name> <expression>{Template App RabbitMQ v3:rabbitmq.server.filedesc.percentused.last(0)}>75</expression> </dependency> </dependencies> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.filedesc.percentused.last(0)}>75</expression> <name>Percent file descriptors greater than 75%</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.mem.percentused.last(0)}>50</expression> <name>Percent memory use greater than 50%</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies> <dependency> <name>Percent memory use greater than 75%</name> <expression>{Template App RabbitMQ v3:rabbitmq.server.mem.percentused.last(0)}>75</expression> </dependency> </dependencies> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.mem.percentused.last(0)}>75</expression> <name>Percent memory use greater than 75%</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.sockets.percentused.last(0)}>50</expression> <name>Percent sockets in use greater than 50%</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies> <dependency> <name>Percent sockets in use greater than 75%</name> <expression>{Template App RabbitMQ v3:rabbitmq.server.sockets.percentused.last(0)}>75</expression> </dependency> </dependencies> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq.server.sockets.percentused.last(0)}>75</expression> <name>Percent sockets in use greater than 75%</name> <url/> <status>0</status> <priority>4</priority> <description/> <type>0</type> <dependencies/> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq[queues].last(0)}=1 or {Template App RabbitMQ v3:rabbitmq[queues].nodata(5m)}=1</expression> <name>Queue data status issue</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies> <dependency> <name>Dead Rabbit</name> <expression>{Template App RabbitMQ v3:rabbitmq[check_aliveness].str(ok)}=0</expression> </dependency> </dependencies> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq[server,partitions].regexp(\[\]|^\s*$)}=0</expression> <name>RabbitMQ Cluster partition detected</name> <url/> <status>0</status> <priority>3</priority> <description>RabbitMQ Cluster is in a BAD state!</description> <type>0</type> <dependencies/> </trigger> <trigger> <expression>{Template App RabbitMQ v3:rabbitmq[server,rabbitmq_version].diff(0)}>0</expression> <name>RabbitMQ server version has changed</name> <url/> <status>0</status> <priority>2</priority> <description/> <type>0</type> <dependencies/> </trigger> </triggers> <graphs> <graph> <name>Rabbit Server Overall Message Count</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>00C800</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>Template App RabbitMQ v3</host> <key>rabbitmq[server,message_count_ready]</key> </item> </graph_item> <graph_item> <sortorder>1</sortorder> <drawtype>0</drawtype> <color>C80000</color> <yaxisside>0</yaxisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>Template App RabbitMQ v3</host> <key>rabbitmq[server,message_count_unacknowledged]</key> </item> </graph_item> </graph_items> </graph> <graph> <name>Rabbit Server Overall Message Rates</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 App RabbitMQ v3</host> <key>rabbitmq[server,message_stats_deliver_get]</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 App RabbitMQ v3</host> <key>rabbitmq[server,message_stats_publish]</key> </item> </graph_item> </graph_items> </graph> </graphs> </zabbix_export>
service zabbix-agent restart