Problen with 'Network interface and switch port discovery'

Hi,
I am having problems configuring ‘Network interface and switch port discovery’ for my switches, it just doesn’t do what I expect it to do.

I have read the blog Network Monitoring with Checkmk: 3 rules to rule them all as a start.

I also have read many posts here on the forum, but I am still puzzled.

What I want is to monitor ONLY the interfaces/ports that I am interested in based on a predefined description, besides cpu, temperature, etc.

I have configured the follow rule where I want to get only the ports that have ‘Uplink’ or ‘AP’ in the beginning of the description:

This results in the following service list:

This is partially correct, I am interested in the interfaces with the following names ‘interface GigabitEthernet xx’ and ‘interface TenGigabitEthernet xx’, but NOT the ones called ‘interface 010, interface 011’ etc. I have checked on the switch and the services called ‘interface 010/etc’ are the other interfaces that have the state ‘connected’.

This is Cisco switch, which uses ‘Description’ (OID 1.3.6.1.2.1.2.2.1.2) for the interface names and Alias (OID 1.3.6.1.2.1.31.1.1.1.18) for the description entered on the port in the switch.

Based on what I read in the inline-help, etc this should work, but obviously it doesn’t.

There are no other rules that apply this host/service (checked with Effective parameters).

Am I missing something?

Kind regards,
Albert

The 3 rules to rule them all is about renaming the interfaces based on description or alias, not about disabling the interface services. What you currently do with those conditions in your rule is to only rename the interfaces that match your conditions.

Maybe it can also be done differently, but personally I renamed all interfaces using the 3 rules. Then disabled the interfaces that I’m not interested in by defining rule(s) in Setup > Services > Service discovery rules > Disabled services based on the renamed interfaces.

Edit:
So something like

Or reversed

But the rule is called ‘Network interface and switch port discovery’, so I would expect that the rule is not only for renaming/visualize the service(s) correctly, but also ‘filter’ for the ones that I am interested in.

Yes, you would assume so with such a name.

I wasn’t able to get it done with this discovery rule, when I configured my 2.1.0p5.cre a few years ago and completely new with Checkmk. I went for disabled services rule instead, which did seem to work.

Perhaps it is something simple as the discovery results were cached before, and for the discovery rules to take effect it has to be, either new services, or a rescan of services is needed?

Currently guessing … it has been a long day …

What you need is a second rule to drop the remaining interfaces which do not match your rule. Without this rule the default behavior is to discover everything which is not covered by the existing rules with default conditions.

So add one rule at the bottom of the list with following conditions:

Best regards

I wasn’t aware that this was the default behavior. But that fixed it!
Thanks!

Perfect, can you please mark my post as a solution