[[email protected] zabbix_agentd.d]# cat coreservice.conf
UserParameter=coreservice.status,bash ../shell/coreservice.sh
上面是错误的
[[email protected] zabbix_agentd.d]# cat coreservice.conf
UserParameter=coreservice.status,bash /etc/zabbix/shell/coreservice.sh
[[email protected] zabbix_agentd.d]#
正解
[[email protected] ~]# zabbix_get -s vt52 -p 10050 -k "coreservice.status" bash: ../shell/coreservice.sh: No such file or directory [[email protected] ~]# zabbix_get -s vt52 -p 10050 -k "coreservice.status" 1 [[email protected] ~]#
反思:conf文件必须绝对路径
时间: 2024-11-06 18:17:11