zabbix 监控 ubuntu 20.04 LTS
wget zabbix-agent zabbix_sender
代码语言:javascript复制sudo wget http://repo.zabbix.com/zabbix/4.4/ubuntu/pool/main/z/zabbix/zabbix-get_4.4.9-1 focal_amd64.deb
sudo wget http://repo.zabbix.com/zabbix/4.4/ubuntu/pool/main/z/zabbix/zabbix-sender_4.4.9-1 focal_amd64.deb
install zabbix-agent zabbix_sender
代码语言:javascript复制sudo dpkg -i zabbix-agent_4.4.9-1 focal_amd64.deb
sudo dpkg -i zabbix-sender_4.4.9-1 focal_amd64.deb
zabbix-agent edit
start enable zabbix-agent
代码语言:javascript复制sudo systemctl start zabbix-agent
sudo systemctl enable zabbix-agent
firewalld
代码语言:javascript复制sudo firewall-cmd --add-port=10050/tcp --permanent
sudo firewall-cmd --reload
监控主机
最新数据
zabbix 监控 oxidized 网络配置文件在发生变更和备份失败时发送告警信息
Oxidized 监控模板
zabbix_sender 发送数据测试
代码语言:javascript复制ubuntu@ecv-node1:/$ zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k oxidized.datetime -o `date %s`;
参数介绍
-s:指定agent
-z:指定zabbix server
-k:指定键值
-o: 指定数据
最新数据
Oxidized 配置文件
代码语言:javascript复制hooks:
post_store:
type: exec
events: [post_store]
cmd: '
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_EVENT -o $OX_EVENT;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_JOB_STATUS -o $OX_JOB_STATUS;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_JOB_TIME -o $OX_JOB_TIME;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_NODE_IP -o $OX_NODE_IP;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_NODE_MODEL -o $OX_NODE_MODEL;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k OX_NODE_NAME -o ${OX_NODE_NAME};
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k oxidized.datetime -o `date %s`;
zabbix_sender -z 192.168.99.200 -s 192.168.99.54 -k oxidized.status -o 3'
async: true
timeout: 120
最新数据
触发器
事件通知
参考链接 https://github.com/clontarfx/zabbix-template-oxidized