new templates and scripts

This commit is contained in:
Gerard Stańczak
2014-08-11 14:22:34 +02:00
parent d57113ae10
commit b1ea93db6e
28 changed files with 16118 additions and 13647 deletions

View File

@@ -0,0 +1 @@
UserParameter=apc[*],php /etc/zabbix/bin/apc-check.php $1

View File

@@ -0,0 +1 @@
UserParameter=facter[*], HOME=/etc/zabbix facter $1

View File

@@ -0,0 +1,14 @@
UserParameter=omreport-system,sudo /opt/dell/srvadmin/bin/omreport system -fmt ssv | grep "Main System Chassis" | cut -d ";" -f 1 | grep -c "Ok"
UserParameter=omreport-storage[*],sudo /opt/dell/srvadmin/bin/omreport storage $1 | grep Status | cut -d ":" -f 2 | grep -c Ok
UserParameter=omreport-storage-controller,sudo /opt/dell/srvadmin/bin/omreport storage controller | grep Status | cut -d ":" -f 2 | grep -c -e Ok -e "Non-Critical"
UserParameter=omreport-storage-battery,sudo /opt/dell/srvadmin/bin/omreport storage battery | grep -e Status -e State | cut -d ":" -f 2 | grep -c -e Ok -e Charging
UserParameter=omreport-chassis[*],sudo /opt/dell/srvadmin/bin/omreport chassis -fmt ssv | grep "$1" | cut -d ";" -f 1 | grep -c "Ok"
UserParameter=omreport-chassis-pwrmonitoring,sudo /opt/dell/srvadmin/bin/omreport chassis pwrmonitoring | grep "Status" | cut -d ":" -f 2 | grep -c "Ok"
UserParameter=omreport-chassis-pwrusage,sudo /opt/dell/srvadmin/bin/omreport chassis pwrmonitoring | grep Reading | head -1 | cut -d ":" -f 2 | tr -d " A-Z"
UserParameter=omreport-chassis-hwperformance,sudo /opt/dell/srvadmin/bin/omreport chassis hwperformance | grep "Status" | cut -d ":" -f 2 | grep -c "Normal"
UserParameter=omreport-chassis-firmware,sudo /opt/dell/srvadmin/bin/omreport chassis firmware -fmt ssv | grep DRAC | cut -d ";" -f 2
UserParameter=omreport-chassis-bios,sudo /opt/dell/srvadmin/bin/omreport chassis bios -fmt ssv | grep Version | cut -d ";" -f 2
UserParameter=omreport-storage-pdisk-status, sudo /opt/dell/srvadmin/bin/omreport storage pdisk controller=0 | grep "^Status" | grep -v ": Ok" | wc -l
UserParameter=omreport-storage-pdisk-state, sudo /opt/dell/srvadmin/bin/omreport storage pdisk controller=0 | grep "^State" | grep -v -e ": Online" -e ": Ready" | wc -l
UserParameter=omreport-tag, sudo /opt/dell/srvadmin/bin/omreport system summary | grep 'Chassis Service Tag' | awk -F ': ' '{ print $2}'
UserParameter=omreport-hardware, sudo /opt/dell/srvadmin/bin/omreport system summary | grep 'Chassis Model' | awk -F ': ' '{ print $2}'

View File

@@ -0,0 +1 @@
UserParameter=opcache[*], curl --silent http://127.0.0.1/zabbix/opcache.php?item=$1

View File

@@ -0,0 +1,50 @@
# 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 \"
UserParameter=memory.connection_procs,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_procs,[0-9]*' | cut -d',' -f2 | tr -d \"
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
UserParameter=rabbitmq_status, sudo /usr/sbin/rabbitmqctl status >/dev/null 2>&1; echo $?

View File

@@ -0,0 +1,3 @@
UserParameter=selinux-enabled, [ "$(getenforce)" = "Enforcing" ] && echo 1 || echo 0
UserParameter=firewall-enabled, sudo /sbin/iptables -L INPUT -n | grep -ci 'tcp dpts:10050'
UserParameter=firewall-md5, sudo /sbin/iptables -L INPUT -n | cksum | cut -d " " -f 1