Hi,
Let me describe the scenario:
I have a situation where I have one "master" server, which has a value in a file. Lets call this value the "version number". The "master" server is connected via a LAN to several (up to about 30) hosts. These hosts also receive this version number and it appears in their application logs, but they receive it shortly after the "master" does.
The version number changes every few hours on the master. A cronjob outputs a mysql command to a file every hour, and this file will then contain the version number.
I then set up a UserParameter in the Zabbix agent config file as follows:
UserParameter=list.version,cat /home/zabbixuser/zabbix_values/current_list_version
And enabled this item on the template that is assigned to this class of server (The "master" server). If I open this "master" server's Latest Data, I can now see the "version number (list.version)" as expected.
On the hosts connected via LAN to the "master" server, I can confirm which version they have by tailing the application logs. I can easily get this value into Zabbix per connected host with another UserParameter on the connected hosts.
So, now I have two values in Zabbix. One is the list version on the master, and one is the list version on the connected host.
How can I compare these two values, and alert if they are not the same for a period of time?
Advice or suggestions appreciated.
I will document the solution properly once I find it. Others have asked this kind of question before but usually end up giving up.
Thanks in advance.
Let me describe the scenario:
I have a situation where I have one "master" server, which has a value in a file. Lets call this value the "version number". The "master" server is connected via a LAN to several (up to about 30) hosts. These hosts also receive this version number and it appears in their application logs, but they receive it shortly after the "master" does.
The version number changes every few hours on the master. A cronjob outputs a mysql command to a file every hour, and this file will then contain the version number.
I then set up a UserParameter in the Zabbix agent config file as follows:
UserParameter=list.version,cat /home/zabbixuser/zabbix_values/current_list_version
And enabled this item on the template that is assigned to this class of server (The "master" server). If I open this "master" server's Latest Data, I can now see the "version number (list.version)" as expected.
On the hosts connected via LAN to the "master" server, I can confirm which version they have by tailing the application logs. I can easily get this value into Zabbix per connected host with another UserParameter on the connected hosts.
So, now I have two values in Zabbix. One is the list version on the master, and one is the list version on the connected host.
How can I compare these two values, and alert if they are not the same for a period of time?
Advice or suggestions appreciated.
I will document the solution properly once I find it. Others have asked this kind of question before but usually end up giving up.
Thanks in advance.
Comment