Zabbix监控oxidized备份状态
原理是利用oxidized的hooks功能调用zabbix_sender推送数据给zabbix_server
参考
https://cloud.tencent.com/developer/article/1657025
https://github.com/clontarfx/zabbix-template-oxidized
https://github.com/ytti/oxidized/blob/master/docs/Hooks.md
效果展示
邮件通知
hooks配置
post_store:type: execevents: [post_store]cmd: 'zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_EVENT -o $OX_EVENT;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_JOB_STATUS -o $OX_JOB_STATUS;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_JOB_TIME -o $OX_JOB_TIME;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_NODE_IP -o $OX_NODE_IP;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_NODE_MODEL -o $OX_NODE_MODEL;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k OX_NODE_NAME -o ${OX_NODE_NAME};zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k oxidized.datetime -o `date +%s`;zabbix_sender -z 192.168.118.186 -s oxidized-virtual-machine -k oxidized.status -o 3'async: truetimeout: 120