v-zhuravlev / zbx-smartctl

Templates and scripts for monitoring disks health with Zabbix and smartmontools
https://share.zabbix.com/storage-devices/smartmontools/smart-monitoring-with-smartmontools-lld
GNU General Public License v3.0
245 stars 127 forks source link

Braking uHDD parameter if using comma in #DISKNAME or #DISKCMD #62

Closed SimplyKot closed 6 years ago

SimplyKot commented 6 years ago

Don't working with this configuration:

{ "data":[ { "{#DISKSN}":"9QM7W1LD", "{#DISKMODEL}":"ST3500320AS", "{#DISKNAME}":"/dev/csmi0,1", "{#DISKCMD}":"/dev/csmi0,1 -data", "{#SMART_ENABLED}":"1", "{#DISKTYPE}":"0" } ] }

Example:

uHDD["/dev/csmi0,1 -data",Temperature_Celsius]

executes following command on host:

for /F "tokens=10 usebackq" %a in ('""C:\Program Files\smartmontools\bin\smartctl.exe" -A /dev/csmi0 | find "1""') do @echo %a

v-zhuravlev commented 6 years ago

No idea how to fix it now... how about uHDD.A[*] ?

SimplyKot commented 6 years ago

how about uHDD.A[*] ?

It's working. Thank you.