[dev.icinga.com #12135] ITL: check_iftraffic64.pl default values, wrong postfix value in CheckCommand #4359
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12135
Created by ronator on 2016-07-11 14:46:07 +00:00
When I execute 'iftraffic' with its defaults defined in /usr/share/icinga2/include/plugins-contrib.d/network-components.conf, I get an error on cmd and web ui:
I checked the latest code, the misconfig is still there, if I am not looking at the wrong files:
root/itl/plugins-contrib.d/network-components.conf; rows 340 and 341:
This is easy to fix: Please remove the percent signs from the values, then the check works as intended. Thank you and
2016-07-12 10:46:56 +00:00 by mfriedrich 172b57e
2016-07-12 16:39:57 +00:00 by mfriedrich b0e6eb0
The text was updated successfully, but these errors were encountered:
Updated by mfriedrich on 2016-07-12 07:58:31 +00:00
AFAIK there are two versions of this plugin. Our documentation links to https://exchange.icinga.org/exchange/iftraffic which expects the percent values. Can you provide the plugin's URL you are using?
Updated by ronator on 2016-07-12 10:13:59 +00:00
Yes, I know there are two versions: check_iftraffic.pl and check_iftraffic64.pl. And as far as I can see, icinga2 uses check_iftraffic64.pl per default - not the "newer" version check_iftraffic.pl that you mentioned.
I am using icinga2 version r2.4.10-1 - in my plugins-contrib.d/network-components.conf there is a CheckCommand Definition called "iftraffic" and this one links to check_iftraffic64.pl. I can see the same in the repository file in root/itl/plugins-contrib.d/network-components.conf on line 299 where it says
[ PluginContribDir + "/check_iftraffic64.pl"]
So the ITL uses check_iftraffic64.pl. And this is the version that complains about non-integer when % is given after the value. So as far I can see, ITL is using the wrong plugin.
Updated by mfriedrich on 2016-07-12 10:46:39 +00:00
Ok point taken. I've modified the "iftraffic" CheckCommand pointing to the correct plugin. In addition to that I've created a new CheckCommand definition with adjusted thresholds.
The check_iftraffic64.pl plugin is now uploaded to exchange.icinga.org as well: https://exchange.icinga.org/exchange/check\_iftraffic64
Please test that accordingly.
Updated by ronator on 2016-07-12 11:58:24 +00:00
I was asked to test it. I did. Suprisingly, both plugins expect the value without % sign. I am sorry, I was misled. I didn't use iftraffic but iftraffic64 so it wasn't me who said, one plugin needs them with % sign ;-) Both plugins also say, they want integer values:
-c --critical INTEGER
I can call both plugins with % sign on command line and it will work - output data - but with same error messages as in icingaweb2:
Argument "50%" isn't numeric in numeric gt (>) at /usr/lib/nagios/plugins/check_iftraffic.pl line 250.
Argument "50%" isn't numeric in numeric lt (<) at /usr/lib/nagios/plugins/check_iftraffic64.pl line 799.
I am sorry for this confusion (and extra work) but obviously, both plugins do not expect a % sign.