Hi,
I would like to know if it's possible to return multiple values from a custom zabbix check.
Let's say I want to monitor fields A, B and C.
At the moment, I achieve my goals as follows:.
- I create a script for each field "zabbix.get_A.php", "zabbix.get_B.php" and "zabbix.get_C.php". Each script connects to the database and returns 1 zabbix_value.
- For each value, I add a line to zabbix_agentd.conf:
UserParameter=get_A,/usr/local/bin/php /checks/zabbix.get_A.php
UserParameter=get_B,/usr/local/bin/php /checks/zabbix.get_B.php
UserParameter=get_C,/usr/local/bin/php /checks/zabbix.get_C.php
Result: 3 values A, B, C are monitored and I can see actual and historical values in Zabbix. After that I can do anything else I want with the items.
But isn't there a more easy way?
My goal is to be able to view multiple items for different hosts in one overview screen, but I'd like to just configure once: get values from query from host and then the result should be displayed. I don't know if this is possible in Zabbix though ...
Thanks in advance for advice.
I would like to know if it's possible to return multiple values from a custom zabbix check.
Let's say I want to monitor fields A, B and C.
At the moment, I achieve my goals as follows:.
- I create a script for each field "zabbix.get_A.php", "zabbix.get_B.php" and "zabbix.get_C.php". Each script connects to the database and returns 1 zabbix_value.
- For each value, I add a line to zabbix_agentd.conf:
UserParameter=get_A,/usr/local/bin/php /checks/zabbix.get_A.php
UserParameter=get_B,/usr/local/bin/php /checks/zabbix.get_B.php
UserParameter=get_C,/usr/local/bin/php /checks/zabbix.get_C.php
Result: 3 values A, B, C are monitored and I can see actual and historical values in Zabbix. After that I can do anything else I want with the items.
But isn't there a more easy way?
My goal is to be able to view multiple items for different hosts in one overview screen, but I'd like to just configure once: get values from query from host and then the result should be displayed. I don't know if this is possible in Zabbix though ...
Thanks in advance for advice.
Comment