plambe / zabbix-nvidia-smi-multi-gpu

A zabbix template using nvidia-smi. Works with multiple GPUs on Windows and Linux.
Other
94 stars 53 forks source link

Number of GPUs unsupported item key. #8

Closed metabsd closed 5 years ago

metabsd commented 5 years ago

Hi, I need help to understand and fix.

I follow and install the script in /etc/zabbix/scripts/ and add /etc/zabbix/zabbix_agentd.d/userparameter_nvidia-smi.conf

I also import the template and assign that template to the server. I try to run the command manually to make sure I don't miss something.

The problem is about the lack of information in zabbix and I see a problem in calculating the number of GPUs.

image

This is the result when I run the command localy.

root@hostname:/etc/zabbix# sudo -u zabbix zabbix_agentd -t gpu.number
gpu.number                                    [t|9]
root@hostname:/etc/zabbix# sudo -u zabbix zabbix_agentd -t gpu.discovery
gpu.discovery                                 [t|{
"data":[
{"{#GPUINDEX}":"0", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"1", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"2", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"3", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"4", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"5", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"6", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"7", "{#GPUUUID}":"GPU-UUID"},
{"{#GPUINDEX}":"8", "{#GPUUUID}":"GPU-UUID"}
]
}]
metabsd commented 5 years ago

I activate debug on the agent.

30971:20181005:161257.045 Requested [gpu.number]
 30971:20181005:161257.045 In zbx_popen() command:'/usr/bin/nvidia-smi -L | /usr/bin/wc -l'
 30971:20181005:161257.046 End of zbx_popen():8
 31578:20181005:161257.047 zbx_popen(): executing script
 30971:20181005:161257.165 In zbx_waitpid()
 30971:20181005:161257.165 zbx_waitpid() exited, status:0
 30971:20181005:161257.165 End of zbx_waitpid():31578
 30971:20181005:161257.165 EXECUTE_STR() command:'/usr/bin/nvidia-smi -L | /usr/bin/wc -l' len:1 cmd_result:'9'
 30971:20181005:161257.165 Sending back [9]
metabsd commented 5 years ago

I don't understand... Now it's working find.

metabsd commented 5 years ago

Thx!!!