Hi,
got some troubles with creating a trigger to monitor duplicated processes.
This is the scenario:
I've got two clusters, lets call them cluster1 and cluster2. On both I got my own monitors - root's crontab job runs 'clustat' and write the statuses into a file located in /tmp; in the clients config I have set UserParameter=clustat.status and UserParameter=clustat.owner. These two are simple one-liners checking for the status of a service (valid values are "disabled", "started" and "stopped") and the "owner" - on which node in a cluster the service is running.
In Zabbix server I got two triggers for each service on both clusters (I'm checking services status on one node in each cluster):
[1] to check if a service is running:
clustat.status[cluster_service_X].str(started)}=0
[2] to check if a service switched from one cluster node to another:
clustat.owner[cluster_service_X].diff(0)}#0
These two work perfectly - if a service goes down (status different than "started") i got an alarm. If a service cluster_service_x is switching from one cluster node to another - i got an alarm too.
And now my question - the service should run on *one* cluster only.
For example - if cluster_service_X is running on cluster1 (clustat.status[cluster_service_X].str(started)=0), it should be down on cluster2. If it's up on cluster2 - it should be down on cluster1.
How can I create an action generating an alarm if a service is up on both clusters?
Tried a few things, but no one seems to work. For example - i had created action with the following conditions:
Type of calculation: AND (A) and ((B) and (C))
Conditions:
(A) Trigger value = "OK" ### cluster service is up
(B) Trigger = "a_node_from_cluster1:cluster_service_X is down"
(C) Trigger = "a_node_from_cluster2:cluster_service_X is down"
I thought it should generate an alarm if the same service (cluster_service_X) is running on both nodes (a_node_from_cluster1 and a_node_from_cluster2). But it doesn't. Appreciate any help and/or suggestions...
Regards,
--
goly
got some troubles with creating a trigger to monitor duplicated processes.
This is the scenario:
I've got two clusters, lets call them cluster1 and cluster2. On both I got my own monitors - root's crontab job runs 'clustat' and write the statuses into a file located in /tmp; in the clients config I have set UserParameter=clustat.status and UserParameter=clustat.owner. These two are simple one-liners checking for the status of a service (valid values are "disabled", "started" and "stopped") and the "owner" - on which node in a cluster the service is running.
In Zabbix server I got two triggers for each service on both clusters (I'm checking services status on one node in each cluster):
[1] to check if a service is running:
clustat.status[cluster_service_X].str(started)}=0
[2] to check if a service switched from one cluster node to another:
clustat.owner[cluster_service_X].diff(0)}#0
These two work perfectly - if a service goes down (status different than "started") i got an alarm. If a service cluster_service_x is switching from one cluster node to another - i got an alarm too.
And now my question - the service should run on *one* cluster only.
For example - if cluster_service_X is running on cluster1 (clustat.status[cluster_service_X].str(started)=0), it should be down on cluster2. If it's up on cluster2 - it should be down on cluster1.
How can I create an action generating an alarm if a service is up on both clusters?
Tried a few things, but no one seems to work. For example - i had created action with the following conditions:
Type of calculation: AND (A) and ((B) and (C))
Conditions:
(A) Trigger value = "OK" ### cluster service is up
(B) Trigger = "a_node_from_cluster1:cluster_service_X is down"
(C) Trigger = "a_node_from_cluster2:cluster_service_X is down"
I thought it should generate an alarm if the same service (cluster_service_X) is running on both nodes (a_node_from_cluster1 and a_node_from_cluster2). But it doesn't. Appreciate any help and/or suggestions...
Regards,
--
goly
Comment