Answer the question
In order to leave comments, you need to log in
Is it possible to pass an argument from the node to the zabbix template?
Hello!
Zabbix 2.4
Let's say I have a template for getting SMART information: smart.get[sda,param].
There are servers that have two disks sda, sdb, who has 4 - sda - sdc.
Now in the template I prescribe all the disk options, but is it possible to somehow transfer the names of the disks from the node to the template for verification?
The same applies to triggers, for some servers some values are critical, for others - others, can these values be transferred from nodes?
Thank you!
Answer the question
In order to leave comments, you need to log in
Use auto discovery https://www.zabbix.com/documentation/2.4/manual/di...
For smart, you can do this:
JSON="{ \"data\":["
SEP="";
for DEV in `smartctl --scan | awk '{print $1}'`; do
JSON=$JSON"$SEP{\"{#HDNAME}\":\"$DEV\"}"
SEP=", "
done
JSON=$JSON"]}"
echo $JSON
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question