Understanding rules for marking access switch ports as crit / warn / okay

Checkmk Cloud Edition 2.2.0p7
Ubuntu 23.4

Understanding Port status rules. I have two identical switch ports with the same config. One gets marked as Warning when the port goes down and the other port gets marked as crit. Im not sure why there is a difference between the two

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Hi @rubber_ducky,
can you show a screenshot of both switch ports?

Karl

Yeh no worries.
2023-08-17 19_09_16-

I have also set up a rule to ignore speed and state for any port that matches “EDGE-PORTS”

Essentially i want any port that is named “EDGE-PORTS” to be considered access ports or end user devices so state and speed changes are ignored.

Then any port that does not match “EDGE-PORTS” to be fully monitored

Hi @rubber_ducky,
I meant a screenshot of both ports showing the state within the Checkmk GUI.

Karl

Oh right.

Hi @rubber_ducky,
a very good starting point for understanding the rules is this blog article:

Karl

Flip on a stick…

yeh i used the video version of this guide from the CheckMK team.

The CRIT one changed its port status, both changed their speed.

Im so confused. Both are physically unplugged at the switch so wouldn’t they have the same state?

I have also shutdown vlan 252 as a test. I have confirmed that the rules to ignore state and speed has not been applied. Yet the status is green OKAY how does that work? If the vlan is down why isnt it set to CRIT

No. The port status is saved when Checkmk does a first service discovery of the host.
Only when the port status changes (from up to down or from down to up) the check will show a CRIT.

Interesting… So whats the best way to set this up for me next switch?

Make sure all ports are in their correct state and all named correctly, then add the switch to CMK?

Yes, but you can always do a rediscovery of the port when its operational state changes (and is intended).
Go to the service discovery page of the host and set the interface’s service to “undecided” (blue question mark), do a rescan (necessary for SNMP devices) and set the service back to “monitored” (green plus sign).