Hi All,
I currently am monitoring temperature and humidity loggers through a script. What I do there is solved thanks to the community in this post: https://www.zabbix.com/forum/zabbix-...telnet-session
The script is called from userparameters in Zabbix agent. Works perfectly. The thing is, these logger give status of temperature and humidity in one call. The BASH-script opens a socket to the logger, sends a command, receives a reply. The reply contains both temperature AND humidity information, and when i run the script, i filter the information sent to zabbix by commandline parameters: -t returns temp, -h returns humidity.
So i run the script twice to get temperature and humidity, script filters the data and returns HUM or TEMP.
In the Zabbix template I have created 2 items: temperature and humidity, each an other userparameter defined in the zabbix_agentd.conf file
Is it possible in Zabbix to let the script run only once and get the data into two different items? I can let the script return eg CSV for the two metrics. (item preprocessing???)
So one userparameter that calls the script, and and two Items returned? Now i have to run it twice while the needed data is returned in one response, doubling the network overhead to derive this data since i have to open the socket twice. And in my measurements i sometimes have 'NaN' results because Zabbix calls the script twice, but can't derive the data because the socket is still open from the previous call..
I currently am monitoring temperature and humidity loggers through a script. What I do there is solved thanks to the community in this post: https://www.zabbix.com/forum/zabbix-...telnet-session
The script is called from userparameters in Zabbix agent. Works perfectly. The thing is, these logger give status of temperature and humidity in one call. The BASH-script opens a socket to the logger, sends a command, receives a reply. The reply contains both temperature AND humidity information, and when i run the script, i filter the information sent to zabbix by commandline parameters: -t returns temp, -h returns humidity.
So i run the script twice to get temperature and humidity, script filters the data and returns HUM or TEMP.
In the Zabbix template I have created 2 items: temperature and humidity, each an other userparameter defined in the zabbix_agentd.conf file
Is it possible in Zabbix to let the script run only once and get the data into two different items? I can let the script return eg CSV for the two metrics. (item preprocessing???)
So one userparameter that calls the script, and and two Items returned? Now i have to run it twice while the needed data is returned in one response, doubling the network overhead to derive this data since i have to open the socket twice. And in my measurements i sometimes have 'NaN' results because Zabbix calls the script twice, but can't derive the data because the socket is still open from the previous call..
I will look into it and see how it goes - will keep you posted.
Comment