BUG?: Units and combination of graphs, by using 'interface' check

Hi there,

I’m currently working on a plugin to monitor my accesspoints.

To evaluate the values which fetch via SNMP, I use the “interface” check.

Momently I have a (similar?) problem as in the following thread,
whereby this is actually fixed/closed.

Also in my case, I see the correct units in overviews and summarys,
but the graphs haven´t units and they are not combined.

To show you this phenomenon, I´m attaching 3 pictures.

I´ve this problem with version 2.0.0p9.cfe and 2.0.0p9.cre .

Best regards,
c3po
2021-09-01_cmk_units_1

2021-09-01_cmk_units_2

sorry, but new users can add only one elemet as attachment.

Best regards,
c3po

The easiest way: Name you Performance Counters like the original.
As example in=68572.531985;;;0;1250000000 inucast=112.580824;;;; innucast=0.009921;;;; indisc=0;;;; inerr=0;0.01;0.1;; out=78067.2681;;;0;1250000000 outucast=82.266278;;;; outnucast=0;;;; outdisc=0;;;; outerr=0;0.01;0.1;; outqlen=0;;;;

Other Way: Create a metrics File and define the Graph.

Regards,
Peter

Hi ruppo,

thank you for your fast reply!

My Performance Counters are the original,
as example:
outqlen=0;;;; in=788.218505;;;0;27083250 out=2496.082816;;;0;27083250 […]

What you see is the result of the new interface check.

Best regards,
c3po

Hi ruppo,

as supplement, with ‘interface’ check I mean the ‘check_single_interface’ from
lib/python3/cmk/base/plugins/agent_based/utils/interfaces.py

Best regards,
c3po

Sorry, we haven’t yet upgraded to 2.0.
But perhaps a look in lib/python3/cmk/base/plugins/agent_based/huawei_osn_if.py will help
Regards,
Peter

Hi c3po,

the metric definitions do not apply in your case. Other interface plugins use a metric translation like:

check_metrics["check_mk-aws_ec2_network_io"] = if_translation

If you add one for your check plugin as well the metrics should apply.

Best,
Tom

2 Likes

Hi Tom,

I agree with that! :wink:

But this should be done by line

check_metrics["check_mk-interfaces"] = if_translation

(914) form lib/python3/cmk/gui/plugins/metrics/translation.py, or not?

By the way,
I use other metrics from the lib/python3/cmk/gui/plugins/metrics/network.py, too.
There works it fine.

Best, c3po

Hi Tom,

for test purposes I´ve add

check_metrics["check_mk-<plugin-name>"] = if_translation

and it works.

It’s illogical for me!

Crazy observation, without this solution:
only “outqlen” from interface-check works even so.

Best, c3po

Why illogical, you need to define for your check a translation of the performance data. The system needs to know that your performance data graph should be drawn the same way as the interface graph.
Nothing else does this one line.

1 Like

It’s a bit of a special case. You use a helper function which outputs performance data where the names differ from that of the metric definitions. The metric translation is used to translate the names in the performance data (like e.g. outerr) to the correct metric names (if_out_err in this case).

Usually the names in the performance data and metric definitons are identical. In that case no translation is needed. But for historical reasons it’s different here.

1 Like

Hi,

ok, now.

I assumed that must be identical,
and the helper function outputs correct metric names.
Why is this not so? What ever … ! :slight_smile:

Thanks very much Tom and Andreas!

Best regards,
c3po

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.