I have an agent which is set to run as a passive most because the server is unable to reach the agent, but the other way works fine. Normal Zabbix metrics like CPU and memory are working. However any of my custom checks are failing. I have confirmed with the command below that the command locally works. My config for the agent is below.
zabbix_agentd -t "gpu.temp[0]" -c /etc/zabbix/zabbix_agentd.conf
gpu.temp[0] [t|31]
In the server the host is configured using the Linux by Zabbix agent Template which as stated above, is working.
PidFile=/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
##### Passive checks related
Server=REDACTED
Hostname=NVIDIA02
DebugLevel=3
############ ADVANCED PARAMETERS #################
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UserParameter=gpu.temp[*],nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits -i $1
UserParameter=gpu.memtotal[*],nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits -i $1
UserParameter=gpu.used[*],nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -i $1
UserParameter=gpu.free[*],nvidia-smi --query-gpu=memory.free --format=csv,noheader,nounits -i $1
UserParameter=gpu.fanspeed[*],nvidia-smi --query-gpu=fan.speed --format=csv,noheader,nounits -i $1
UserParameter=gpu.utilisation[*],nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits -i $1
UserParameter=gpu.power[*],nvidia-smi --query-gpu=power.draw --format=csv,noheader,nounits -i $1
zabbix_agentd -t "gpu.temp[0]" -c /etc/zabbix/zabbix_agentd.conf
gpu.temp[0] [t|31]
In the server the host is configured using the Linux by Zabbix agent Template which as stated above, is working.
PidFile=/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
##### Passive checks related
Server=REDACTED
Hostname=NVIDIA02
DebugLevel=3
############ ADVANCED PARAMETERS #################
Include=/etc/zabbix/zabbix_agentd.d/*.conf
UserParameter=gpu.temp[*],nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits -i $1
UserParameter=gpu.memtotal[*],nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits -i $1
UserParameter=gpu.used[*],nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -i $1
UserParameter=gpu.free[*],nvidia-smi --query-gpu=memory.free --format=csv,noheader,nounits -i $1
UserParameter=gpu.fanspeed[*],nvidia-smi --query-gpu=fan.speed --format=csv,noheader,nounits -i $1
UserParameter=gpu.utilisation[*],nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits -i $1
UserParameter=gpu.power[*],nvidia-smi --query-gpu=power.draw --format=csv,noheader,nounits -i $1
Comment