Hi
I am running zabbix 3.4
I have two servers with a floating IP address. I have two custom monitors (one one each server) with key server1_floating_ip and server2_floating_ip. server 1 should normally have the IP address, and I consider my cluster failed over if server 2 has the address.
The custom monitors return 0 if the server has the floating IP and non zero if not. (I used regex as sometime my monitor scripts return a text error)
I defined a trigger against server1
{server1:_server1_public_floating_ip.regexp(^0$,#1 )}=0 which sets OK if server 1 has IP and problem if it does not. (works as expected)
I then defined a trigger against server2
{server1:server1_floating_ip.regexp(^0$,#1)}=1 and {server2:server2_floating_ip.regexp(^0$,#1)}=0 which sets OK if server 1 has IP and sever 2 does not have server IP. This is working as expected.
I then tried to modify the trigger for server2 so that if server 1 has IP and server 2 does not OR server 1 has not go the IP address but sever 2 has the IP address then to set OK. This means server 2 should show OK if server 1 or server 2 have the ip address So my final trigger expression is
(
{server1:server1_floating_ip.regexp(^0$,#1)}=1 and {server2:server2_floating_ip.regexp(^0$,#1)}=0
)
or
(
{server1:server1_floating_ip.regexp(^0$,#1)}=0 and {server2:server2_floating_ip.regexp(^0$,#1)}=1
)
So if the address is on server 2 I want the server 1 trigger to show problem and the server 2 trigger to show OK. But when I add the the or to the expression the trigger returns problem when server 2 has the IP Address.
I have noticed that once I mentioned server 1 in the server 2 trigger it shows as a trigger on both server 1 and server 2. It seems like zabbix is eval the trigger I hoped was defined against server 2 against sever 1 and server 2 at the same time.
Regards
David
I am running zabbix 3.4
I have two servers with a floating IP address. I have two custom monitors (one one each server) with key server1_floating_ip and server2_floating_ip. server 1 should normally have the IP address, and I consider my cluster failed over if server 2 has the address.
The custom monitors return 0 if the server has the floating IP and non zero if not. (I used regex as sometime my monitor scripts return a text error)
I defined a trigger against server1
{server1:_server1_public_floating_ip.regexp(^0$,#1 )}=0 which sets OK if server 1 has IP and problem if it does not. (works as expected)
I then defined a trigger against server2
{server1:server1_floating_ip.regexp(^0$,#1)}=1 and {server2:server2_floating_ip.regexp(^0$,#1)}=0 which sets OK if server 1 has IP and sever 2 does not have server IP. This is working as expected.
I then tried to modify the trigger for server2 so that if server 1 has IP and server 2 does not OR server 1 has not go the IP address but sever 2 has the IP address then to set OK. This means server 2 should show OK if server 1 or server 2 have the ip address So my final trigger expression is
(
{server1:server1_floating_ip.regexp(^0$,#1)}=1 and {server2:server2_floating_ip.regexp(^0$,#1)}=0
)
or
(
{server1:server1_floating_ip.regexp(^0$,#1)}=0 and {server2:server2_floating_ip.regexp(^0$,#1)}=1
)
So if the address is on server 2 I want the server 1 trigger to show problem and the server 2 trigger to show OK. But when I add the the or to the expression the trigger returns problem when server 2 has the IP Address.
I have noticed that once I mentioned server 1 in the server 2 trigger it shows as a trigger on both server 1 and server 2. It seems like zabbix is eval the trigger I hoped was defined against server 2 against sever 1 and server 2 at the same time.
Regards
David
Comment