"Network Visualization" now in version 2.3

Hi all,
this feature has finally landed in version 2.3. I already talked about it in the last thread, but since there have been many data/UX/feature changes, I will write a short overview here.
We are planning to publish a blog article in the next few weeks in which we explain the configuration in more detail.

What is it about
Visualization of dependencies between objects

The figure above shows the CDP relationship between hosts and their interfaces.
It also shows the current status of the hosts/services and provides links to the appropriate views.
The data for this relationships is currently not computed by Checkmk, but there are MKPs in the works which generate data for LLDP/CDP and netstat.

Different visualization styles
display_styles


With the layout designer you can make it as beautiful/ugly as you want (I’m not good at it…)

Service visibility
Services can be generally set to hidden. This only shows the connections between hosts and reduces visual overload.
You can set that only services with problems are displayed or that only services for certain hosts are displayed, as shown in the figure below.

Check differences between different timestamps

Automatic growth depending on configured mesh depth
growth

Assign custom node and link styles
This example shows a custom emblem(warning sign) and icon (check mark) for the node C2960-FOR and a connection line with a customized color and thickness

Data format
There is always one data file for each data type for a given timestamp.
The data is divided into two main components

  • The objects, which represent the nodes in the visualization
  • The connections, which describe the connection between objects
{
    "version": 1,       # data format version
    "name": "CDP data", # some name to display somewhere
    "objects": {        # A dictionary containing the object ID key and the object as value
        # A generic node with the ID NodeA and the display name 'NodeA'
        # It is a simple node with no relationship to the monitoring core
        'NodeA': {'metadata': {}, 'name': 'NodeA'},

        # A node with the ID HostA_ID, which is linked to a host 'HostA' in the core.
        # In the visualization the node is named 'HostA Name'
        'HostA_ID': {'link': {'core': 'HostA'}, 'metadata': {}, 'name': 'HostA Name'},

        # A node with the ID HostA_ServiceX, which is linked to a service
        # 'HostA'/'ServiceX' in the core. In the visualization the node is named 'Service X'
        'HostA_ServiceX': {'link': {'core': ['HostA', 'ServiceX']}, 'metadata': {}, 'name': 'Service X'},

        # The metadata field is used to add additional information.
        # A generic node with the ID NodeWithImages and the display name 'ImageNode'
        # This generates a node which is shown in the screenshot above
        'NodeWithImages': {'metadata': {
                             'images': {"icon": "icon_checkmark", "emblem": "emblem_warning"}
                           },
                           'name': 'ImageNode'},
    },
    # The objects are always identified by their ID
    # A connection always connects two objects and has tree values [SOURCE_ID, TARGET_ID, metadata]
    "connections": [
        # A simple connection between NodeA and HostA_ID
        [["NodeA"], ["HostA_ID"], {}],
        # Another simple connection between NodeA and HostA_ServiceX
        [["NodeA"], ["HostA_ServiceX"], {}],
        # A connection between HostA_ServiceX and NodeWithImages.
        # The line_config field specifies the custom styling
        [["HostA_ServiceX"], ["NodeWithImages"], {"line_config": {"thickness": 5, "color": "green"}}],
    ]
}

Currently, the metadata for a host allows the “images” dictionary with the keys

  • “icon”: An icon display at the top left of the node, overruling any icon configured in the core
  • “emblem”: An image which replaces the blue question mark on nodes, which are not linked to the core.

The metadata for the connections allows the “line_config” dictionary with the keys

  • “thickness”: The thickness of the connection
  • “color”: The color of the connection. You can use color names, but HEX should also work.

(I’ll probably add some other keys in the next days and will update this accordingly)

Where to put this file?
The base directory of all data is in site directory ~/var/check_mk/topology/data
For each timestamp, create a subfolder in which you store the data file.
The name of the data file must be of a certain format data_{name}.json.
You also need to create a softlink called default that points to the last timestamp so that the visualization knows where to start.
For example, on my site it looks like this

OMD[heute]:~/var/check_mk/topology/data$ ll
total 20
drwxr-xr-x 2 heute heute 4096 Feb 25 15:16 1_Thursday
drwxr-xr-x 2 heute heute 4096 Feb 25 14:17 2_Wednesday
drwxr-xr-x 2 heute heute 4096 Nov  8 10:54 3_Tuesday
drwxr-xr-x 2 heute heute 4096 Nov  8 10:54 4_Monday
drwxr-xr-x 2 heute heute 4096 Nov  8 10:54 5_Sunday
lrwxrwxrwx 1 heute heute   10 Feb 22  2023 default -> 1_Thursday

OMD[heute]:~/var/check_mk/topology/data$ cd default
OMD[heute]:~/var/check_mk/topology/data/default$ ll
total 208
-rw------- 1 heute heute 38893 Feb 25 11:16 data_cdp.json    # this is the file with the data
-rw-rw---- 1 heute heute 69986 Feb 25 11:16 parsed_cdp       # this file is automatically created out of the file above

In the GUI it will look like this

Who can help me to generate this data?
Unfortunately nobody at Checkmk at the moment. We do not offer consulting on how to setup all of this. The blog article for this post will be published in a few weeks. Until then, things may still change.
I will check the forum occasionally, but I still have tons of other things to do.

In the meantime you can check out the thread from thl-cmk. He was a great help to me in the development of the feature.
He also has a MKP project that generates LLDP/CDP data files seemingly out of thin air (I’m not a networking guy and don’t understand most of these things)

Furthermore, one of our partners is currently developing a netstat data generator.
I’ll reach out to them next week and ask about the current status.

14 Likes

I’d like to offer some feedback on this, I hope it will be useful.

1.) Checkmk should offer a way to collect data in the application, for at least LLDP like discovery.
2.) As this conflicts with “parent/child” way of aggregating those should be combined, this is quite confusing that there is another way, totally independent.
3.) It would be useful to show network bandwidth in the relations to show traffic.

The parent/child relationship is so useful, but overlooked and today not implemented in the best way. One reason is the discovery is painful with incorrect traceroute implementation.
It can also not be used in a distributed monitoring setup as all hosts needs to be on the same SITE…

This is also interesting from a NagVis point…

Otherwise I like the idea…

1 Like

not out of the box, but … LLDP Inventory and CDP Inventory

I think these are two completely different things: one is the topology from the perspective of the CMK servers, the other is the Layer 2 network topology. How would you combine these?

The network bandwidth (interface speed) can be visualized with a different line thickness (work in progress). Since this is not a real-time tool, I don’t see a way to show the actual bandwidth used.

Just my 2¢