Ep. 24: 3 Regeln für eine effizientes Netzwerk-Monitoring

To load this YouTube video you are required to accept advertising cookies.

[0:00:00] Welcome back to the channel. Today, I'm going to show you three rules which you can use for network interface monitoring.
[0:00:18] Today, I am going to show you how you can make Checkmk automatically adjust to your switch configuration by renaming the ports.
[0:00:27] And finally, I'm gonna to show you how you can get even out more information of your switch by using the Checkmk inventory.
[0:00:35] Let's look into it. What I have here is an example switch and if we scroll down to the interfaces, the first thing I notice that they have just the numbers name.
[0:00:48] But in the details, we have some information more like here, we have two Uplink Ports.
[0:00:56] So, it would be nice to have this information as part of the service name in order that we can apply rules on it.
[0:01:04] And to do that, there is a discovery rule which you can use to set if you want the interface description or the interface alias for that.
[0:01:16] The problem here is that depending on the manufacturer the switch can act different. So, in some cases you want to use the description, in other cases you want to use the alias.
[0:01:29] And the easiest way to handle that is to create two host tags in order to bind the corresponding rule on it. So, at first let's create two host tags. So, we go to Setup, Tags.
[0:01:45] We add a new tag group. The ID is gonna be, for example, if_interface_mode. I name it as alias Interface Mode. I add two choices. One is if_alias, the second one is if_description.
[0:02:29] And if I would save that that, would make the if_alias as default. In some cases you don't want to have that. So, you can add a third rule, move it to the first position, leave the Tag ID empty, and set a custom name like Default, which would mean by default no tag would be selected.
[0:02:56] You save that and now we gonna create the two rules. So, we go back to Setup. I'm gonna search Network and as a result of that, we get Service discovery rules, Network interface and switch port discovery.
[0:03:16] This is a rule which affects the discovery of services. This is a special type of rules. Normally, we use service monitoring rules so to set thresholds.
[0:03:26] But in this case you want to change the behavior of the discovery so it's a service discovery rule. I click into it. It's currently empty. I create a rule in this folder. And the first setting would be Use description.
[0:03:48] And I just gonna bind that to the whole stack Interface Mode, if_description and I can save it. The second, I create a rule. This time I'm gonna use the alias and also gonna bind it to Interface Mode but this time, Interface Alias and I'm going to save it.
[0:04:23] Now we can use this board host tags with our switch. So, we go back to Setup, Hosts. There I have already my switch. I'm going to edit.
[0:04:38] And as first, I'm going to try out how the switch looks with description. So, I choose Interface Mode, Interface Description.
[0:04:50] I'm gonna go to save and go to service configuration. So, we can see now that we have a new list of interfaces because they don't longer use the index here but the name.
[0:05:10] And I scroll through the list and let's see if I can find my Uplink Ports here or if there are in the alias. And for this case it looks like we have them in alias. So, we go back Host Properties.
[0:05:34] Now I change it to alias. Again, to the service configuration and now we have by default the numbers. But as we can see here, there are two Uplink Ports. So, in this case we want to use the alias.
[0:06:01] I fix all now and then just a moment, we are ready for the next step. As next, we gonna set a rule that we're not gonna get any notifications about access ports so we don't want to know if the port goes up or down. So back to Setup.
[0:06:26] Again, I'm going to search for network but this time I don't want to use the discovery rule but the normal threshold rule for Network interfaces and switch ports.
[0:06:39] Also currently empty. I'm going to create my first one. So, what I want to do is to ignore the speed.
[0:06:51] Since it can't happen there's a the notebook, for example, goes in standby and then the speed changes to 10 megabits.
[0:06:59] Then I want to ignore the state because I don't want to know if some user is unblocking his notebook. And what's left is to bind it only to the not Uplink Ports.
[0:07:16] There are several ways to do that since we can use regular expressions here.
[0:07:22] One way would like a negative looker head to cover only the parts who are not Uplink Ports. But this would mean that we need to name all the ports accordingly.
[0:07:36] Or we can go a simpler way and just try to cover every interface who uses the index as a name. The index is basically just a number so we can go with \d+.
[0:07:53] What's left is to save and of course, we want to check if it's working. So, we can go to Setup again, to the Hosts, inside the discovery view for this swtich. I directly use the third icon.
[0:08:11] And in the Display option, we can show the check parents. Since I have a small screen here, I'm gonna disable the plugin names.
[0:08:24] Now let's take a look to the interfaces. I see here interface with the number, ignore speed, ignore state. And if I scroll down to my Uplink Ports, I'm going to see. At some moment, sorry. It's really a lot of them.
[0:08:49] So, there are my uplink parts and I'm going to see that my ignorable is not applying. So, only thing left now is to activate the configuration.
[0:09:08] And finally, I'm going to show you how you enable the Checkmk inventory function to get even more information out of your switchboards.
[0:09:16] So, we go to Setup, search for Inventory. And on the right side in this case, I do have Do hardware/software inventory.
[0:09:30] Currently, all the rules we have have some kind of condition. And I just gonna create a simple rule without any condition, which just enables the status data inventory.
[0:09:43] So, I save it, I activate it. So, let's take a look to our switch.
[0:10:05] First, what we see here is a new service, it's the Checkmk hard software inventory. And with Host, Network interfaces, you get a detailed overview for all of your switchboards.
[0:10:25] The heart software inventory has even more information for you. It's in Host, Inventory of host, where you can see even more information about your device.
[0:10:48] I hope this video was helpful for you. If you have any questions just let us know in the comments. Please subscribe and see you next time.

Wollen Sie mehr über Checkmk erfahren? Dann nehmen Sie an unserem Webinar "Einführung in Checkmk" teil!

Jetzt anmelden

Mehr Checkmk-Videos