thecamels-zabbix/zabbix_agentd.conf.d/rabbit.conf

54 lines
4.9 KiB
Plaintext
Raw Normal View History

2014-08-11 14:22:34 +02:00
# Add to sudo: zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
# Versions
UserParameter=rabbitmq_management,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Management Console",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=rabbitmq_web_dispatch,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Web Dispatcher",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=webmachine,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"webmachine",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=mochiweb,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"MochiMedia Web Server",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=web-stomp,/etc/zabbix/bin/rabbitmqctl.sh | grep -A1 '"Rabbit WEB-STOMP - WebSockets to Stomp adapter"' | tail -1 | cut -d'"' -f2
UserParameter=stomp,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"Embedded Rabbit Stomp Adapter",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=rabbitmq_management_agent,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Management Agent",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=rabbit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=amqp_client,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ AMQP Client",".*"' | cut -d',' -f2 | tr -d \"
UserParameter=erlang-ssl,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"Erlang/OTP SSL application",".*"' | cut -d',' -f2 | tr -d \"
# Memory
UserParameter=memory.total,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total,[0-9]*' | cut -d',' -f2 | tr -d \"
2014-12-08 15:48:26 +01:00
UserParameter=memory.connection_other,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_other,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.connection_readers,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_readers,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.connection_writers,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_writers,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.connection_channels,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_channels,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.queue_slave_procs,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'queue_slave_procs,[0-9]*' | cut -d',' -f2 | tr -d \"
2014-08-11 14:22:34 +02:00
UserParameter=memory.queue_procs,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'queue_procs,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.plugins,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'plugins,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.other_proc,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_proc,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.mnesia,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'mnesia,[0-9]*}' | cut -d',' -f2 | tr -d \"}
UserParameter=memory.mgmt_db,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'mgmt_db,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.msg_index,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'msg_index,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.other_ets,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_ets,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.binary,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'binary,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.code,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'code,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.atom,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'atom,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=memory.other_system,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_system,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=vm_memory_high_watermark,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'vm_memory_high_watermark,.*' | cut -d',' -f2 | tr -d \"}
UserParameter=vm_memory_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'vm_memory_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=disk_free_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'disk_free_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=disk_free,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'disk_free,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=file_descriptors.total_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=file_descriptors.total_used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total_used,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=sockets_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'sockets_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=sockets_used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'sockets_used,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=processes.limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '{limit,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=processes.used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '{used,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=run_queue,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'run_queue,[0-9]*' | cut -d',' -f2 | tr -d \"
UserParameter=uptime,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'uptime,[0-9]*' | cut -d',' -f2 | tr -d \"
#Queues
UserParameter=rabbitmq[*], /etc/zabbix/bin/rabbitmq.sh | grep $1 | cut -d ':' -f2
#RabbitMQ Status
2014-12-08 15:48:26 +01:00
UserParameter=rabbitmq_status, sudo /usr/sbin/rabbitmqctl status >/dev/null 2>&1; echo $?