Graph on Number of Switches and Models

Hi all, first time posting on Checkmk Forum, we’ve been using Checkmk for a couple of years now.

Is it possible to create a graph on a particular model of switch. I can create a view using the inventory, but can’t see anywhere i can create a graph.

We’re rolling out new switches and I want to graph how many of the new switches are deployed.

Thanks in advance.
Mandeep.

Host statistics element has some search filter settings for inventory.

I searched for hostname regex to quickly make this screenshot though.
image

Other than those predefined statistics elements, graphing is only possible on items that produce metrics.

Otherwise you need to make the graphs outside of Checkmk, by exporting data or maybe connect to a graphing system like Grafana.

That makes sense. Thank you.

Unfortunately I can’t use Host data, as we use stacked switches with upto 5 switches stacked, but will only be 1 host. it looks like the only way i can gather this number of switches is via the inventory. Do you know if its possible to create an element similar to your screenshot but using inventory data?

Not directly, that I know of.

If you can make a view that lists those switches from inventory, you can add that view to a dashboard. But that won’t look very graphical.

Maybe this section will help you make such a view possible.

How do you want to count the configured switches?

I think I know which information you are looking for. Let’s see what Checkmk has to offer.

Stacks of switches can be found unter “Hardware->Physical->Components” in HW-/SW-Inventory:
image

But this information is not directly accessible through the UI (the path is “hardware”->“components”->“chassis” under the hood). When I tried to build a view with this information I could not find the right field to search or filter for. But this table is coming from somewhere inside Checkmk…
Edit: Sometimes distance and thinking about a problem again helps a lot. The inventory data can be found with “Search chassis”. But you still have to analyze and graph this data somewhere else.

It is possible to query the livestatus for the mk_inventory and read the table. I’m building our own dashboards with (not only from Checkmk) aggregated information. Then I have a representation of the stacked switches like this:
image
The current master is marked.

The cisco switches even have more usefull information inside Checkmk:


This information will be located in the check output and thus be usable for us to achieve a count of “configured” and “not yet provisioned” switches vs. the total number of switches (of a stack).
image

Finally this can be wrapped up in a service with performance data which you can graph inside Checkmk. We plot the graphs externally with plotly.

I have not seen the stack state implemented for non-Cisco switches. In that case your solution is further away. When the information in the HW-/SW-Inventory table is helpful, just ask for my python snippet and I will send it to you (runs inside the instance).

2 Likes