Hi All.
On my switch I have two ports that represent active / failover links to another site. For my configuration I need exactly one of these two ports to be up. I have been trying to configure a rule for this but am not sure it is possible with librenms.
eg. I need an alert if the following statement is true:
(( PORT_A is down && PORT_B is down ) OR ( PORT_A is up && PORT_B is up ))
valid states (no alert please) are either of:
(( PORT_A is up && PORT_B is down ) OR ( PORT_A is down && PORT_B is up ))
Hoping that someone has an idea as to how this can be achieved natively within LibreNMS
Did you try entering that logic into the alert builder?
Without an OR operator I am not sure how to.
The alert is due only if they are:
((both up) OR (both down))
I don’t think this will work as you can’t match that a port is PORT_A AND
PORT_B, it can only be one or the other.
Is your install up-to-date? There is definitely an or operator.
But you still can’t alert that something is two ports, it would have to be PORT_A OR PORT_B.
I thought alerting worked like this 0 items found “ok”, 1 or more items found “alert”.
It does but one entry in the DB can’t be both at the same time which is what the original query was doing.
SELECT * FROM ports WHERE ifName='Gi0/1' AND ifName='Gi0/2';
would not work.
yes but if you group them with the api builder, it could work.
It would take 5 groups
But that’s basically the OR part which is what I’ve said all along 