How to show two value in the same graph ( like default windows interface check up/down bandwidth )

Hi,
I’m building custom local check for checkmkv2 to make aspeedtest on top of iperf.
The script from the agents works fine, but I’m wondering how to create on checkmk a single graph to report both value. In most of the “built-in” check like interface bandwidth you can see the same. I would like to create the same with my custom local check.

My current local check output:
0 "SpeedTest iperf3" upload=18.6|download=65.1 Speed: UP: 18.6 DOWN: 65.1 Mbits/sec

I would like to make it in a single graph like:

You need a graph definition what looks like this.

    graph_info["up_down_data"] = {
        "title": _("Upload Download"),
        "metrics": [
            ("upload", "-area"),
            ("download", "area"),
        ],
    }

It would also be good to define your metrics what it is.
As you have Mbits in your output you should also define factors for the correct values in the graph. Normally all traffic values are in bits or bytes per second.

All the definition files should be inside “~/local/share/check_mk/web/plugins/metrics/”.

4 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.

Hi Andreas,

do you think it is possible to do this in a local check? Or is it mendatory to register an active check for this and write a check plug-in and include your code?

Regards

It is not relevant if local check, active check or CMK check.
Here in this thread is also a little bit more info to this problem.

1 Like

Thank you very much Andreas, I will take a look at it.