Was running in some nice "problem" today, someone called for a XOR port monitoring.
He has some sort of Cluster running, two apps on both side, and would like that we monitor the ports of the application, and in Case both ports are answering or not answering he would like to get an alarm, if only one of both answers all is fine.
So a simple XOR, True if only one of them is true, but false if both are true or both are false.
Normally I would try that to handle that by preprocessing, to fetch the alarm if it is not in the nas, but is there any other solution, perhaps in the net_connect-Probe?
Triggers, ah forget, right triggers :-)
That should work, I'll try that
Heheh, seems not to work, as I nearly expected.
I build 2 triggers, set up an AO with on trigger, and impleneted the XOR, or to be absolutely correct the XNOR
A B Q
0 0 1
0 1 0
1 0 0
1 1 1
So I implemented a
( state("top-nmstools") and state("top-st1") ) or ( ( not state("top-nmstools") ) and ( not state("top-st1") ) )
First of all, the individual alarms naturally comes true and are shown in the Alarmbox, so typically I had to set them invisible via Preprocessing or so.
If both triggers are "False" the AO doesnt hit, eventhough out of good old Bool's Algebra it had to.
( False and False) or (( not False) and (not False)) =
False or (True and True) =
False or True = True
AO should hit :-), but doesnt do.
Well only trigger-combination where at least one thing is true seems to be evaluated.
And if I would build the alarm in that way that it hits even if the process is up or down, I would have alarms all the time,there will be wrong alarms.
To end this problem, we will build this function simply in our brains, and do two alarms, Server A, if the process is down, and Server B if the process wents up, so if I get a Alarm from Server B and no from Server A I know that there are both proceesses up, and if I get an alarm of Server A and no from Server B, both are down.
cheers + thanks for your time