slauger/check_netscaler

Icinga2 issue with performance data

fatslimjoe opened this issue · 1 comments

Hi just wanted to let you know that on Icinga 2 there is problem with graphing few checks. We are using graphite to store and fetch from it performance data.

Icinga2 is having some behaviour, it will be problem if in data output will be label with . in the name ... like system.memory ... it was similar case opened at icinga2 community:

https://community.icinga.com/t/issue-icinga-not-showing-metrics-stored-in-graphite/466/3

example:

-icinga2 will not store graphs:
NetScaler OK - perfdata: ns_tcpcurserverconn: 9163 | 'ns.tcpcurserverconn'=9163;;

-icinga2 will store graphs:
NetScaler OK - perfdata: ns_tcpcurserverconn: 9163 | 'ns_tcpcurserverconn'=9163;;

After troubleshooting I have made some changes almost on every line where I have $plugin->add_perfdata...

for 1 example changing label inside hash structure and changing the "." to "_"
original:
$plugin->add_perfdata(
label => "'" . $plugin->opts->objectname . ".member_quorum'",
value => $member_quorum . '%',
min => 0,
max => 100,
warning => $member_quorum_warning,
critical => $member_quorum_critical,
);

I have changed to this:

$plugin->add_perfdata(
label => "'" . $plugin->opts->objectname . "_member_quorum'",
value => $member_quorum . '%',
min => 0,
max => 100,
warning => $member_quorum_warning,
critical => $member_quorum_critical,
);

After changes has been done, we are getting the graphs.
Maybe you should think also to change the format of output.

This plugin is great and thank you for sharing it with community.

KR,
Josip

duplicate case