[root@vt52 zabbix_agentd.d]# cat coreservice.conf
UserParameter=coreservice.status,bash ../shell/coreservice.sh
上面是错误的
[root@vt52 zabbix_agentd.d]# cat coreservice.conf
UserParameter=coreservice.status,bash /etc/zabbix/shell/coreservice.sh
[root@vt52 zabbix_agentd.d]#
正解
[root@vt41 ~]# zabbix_get -s vt52 -p 10050 -k "coreservice.status" bash: ../shell/coreservice.sh: No such file or directory [root@vt41 ~]# zabbix_get -s vt52 -p 10050 -k "coreservice.status" 1 [root@vt41 ~]#
反思:conf文件必须绝对路径
转载于:https://blog.51cto.com/wsxxsl/1919066