Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #12135] ITL: check_iftraffic64.pl default values, wrong postfix value in CheckCommand #4359

Closed
icinga-migration opened this issue Jul 11, 2016 · 7 comments
Labels
area/itl Template Library CheckCommands bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Assignee: mfriedrich
Status: Resolved (closed on 2016-07-12 11:15:04 +00:00)
Target Version: 2.5.0
Last Update: 2016-07-12 11:58:24 +00:00 (in Redmine)

Icinga Version: 2.4.10

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:
Argument "85" isn't Argument "85" isn't numeric in numeric lt (<) at /usr/lib/nagios/plugins/check_​iftraffic64.​pl line 799.numeric in numeric lt (<) at /usr/lib/nagios/plugins/check_​iftraffic64.​pl line 799. Basically, it complains about the '%' sign.

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:

vars.iftraffic_warn = "85%"
vars.iftraffic_crit = "98%"

This is easy to fix: Please remove the percent signs from the values, then the check works as intended. Thank you and

Best wishes
Ron

Changesets

2016-07-12 10:46:56 +00:00 by mfriedrich 172b57e

ITL: Add iftraffic64 and fix iftraffic CheckCommand plugin path

fixes #12135

2016-07-12 16:39:57 +00:00 by mfriedrich b0e6eb0

ITL: Fix thresholds and descriptions for iftraffic{,64}

refs #12135
@icinga-migration
Copy link
Author

Updated by jmeyer on 2016-07-12 06:18:52 +00:00

  • Project changed from Icinga Web 2 to Icinga 2
  • Category deleted 180
  • Icinga Version set to 3

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-07-12 07:14:42 +00:00

  • Category set to ITL
  • Status changed from New to Feedback
  • Assigned to set to ronator
  • Icinga Version changed from 3 to 2

Can you provide a patch for this?

@icinga-migration
Copy link
Author

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?

@icinga-migration
Copy link
Author

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.
I have no issue switching to check_iftraffic.pl, but I stumbled upon the fact, that the ITL links "iftraffic" to "check_iftraffic64.pl" and not "check_iftraffic.pl" and that's why I wanted to report it.

Plugin-URL: https://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/check\_iftraffic64/details
Original Thread related to this issue: https://monitoring-portal.org/index.php?thread/33403-icinga2-iftraffic-monitoring/

Best
Ron

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-07-12 10:46:39 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to changed from ronator to mfriedrich
  • Target Version set to 2.5.0

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.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-07-12 11:15:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 172b57e.

@icinga-migration
Copy link
Author

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:

  1. /usr/lib/nagios/plugins/check_iftraffic.pl -H 192.168.0.123 -C community -i 1 -b 100 -u m -w 50%

Argument "50%" isn't numeric in numeric gt (>) at /usr/lib/nagios/plugins/check_iftraffic.pl line 250.
Total RX Bytes: 3115.02 MB, Total TX Bytes: 680.24 MB
Average Traffic: 85.62 kB/s (0.7) in, 0.13 kB/s (0.0) out| inUsage=0.7,50,98 outUsage=0.0,50,98 inAbsolut=3187556 outAbsolut=696560

  1. /usr/lib/nagios/plugins/check_iftraffic64.pl -H 192.168.0.123 -C community-i 1 -b 100 -u m -w 50%

Argument "50%" isn't numeric in numeric lt (<) at /usr/lib/nagios/plugins/check_iftraffic64.pl line 799.
OK - Average IN: 102.91KB (0.82), Average OUT: 175.95B (0.00)Total RX: 12359.89GBytes, Total TX: 5.01GBytes|inUsage=0.82;50;98 outUsage=0.00;50;98 inBandwidth=102905.58B outBandwidth=175.95B inAbsolut=12359887749623c outAbsolut=5008249043c

I am sorry for this confusion (and extra work) but obviously, both plugins do not expect a % sign.

@icinga-migration icinga-migration added bug Something isn't working area/itl Template Library CheckCommands labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.5.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/itl Template Library CheckCommands bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant