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 #12155] check_network performance data in invalid format - ingraph #4369

Closed
icinga-migration opened this issue Jul 15, 2016 · 22 comments
Labels
area/windows Windows agent and plugins bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12155

Created by viper539 on 2016-07-15 10:32:21 +00:00

Assignee: jflach
Status: Resolved (closed on 2016-09-28 09:25:04 +00:00)
Target Version: 2.6.0
Last Update: 2016-12-02 09:51:19 +00:00 (in Redmine)

Icinga Version: 2.4.10
Backport?: Not yet backported
Include in Changelog: 1

Hello,

the ingraph-collector dies if he gets this packet:

DATATYPE::SERVICEPERFDATA   TIMET::1468515118   HOSTNAME::mars.bitlab.de    SERVICEDESC::network    SERVICEPERFDATA::network=157344B;;;0; netI='LAN-Verbindung';in=96B;out=96B netI='Intel[R] 'I350 Gigabit Network Connection';in'=62B;out=0B netI='Intel[R] 'I350 Gigabit Network Connection _2';in'=30994B;out=97625B netI='Intel[R] 'I350 Gigabit Network Connection _3';in'=62B;out=0B netI='Intel[R] 'I350 Gigabit Network Connection _4';in'=26700B;out=1709B netI='isatap.{2717219A-3240-4FF4-A464-326E28EC2A6F}';in=0B;out=0B netI='isatap.{1FD78EED-5F39-400F-AD35-D96AD48979E8}';in=0B;out=0B netI='isatap.{9CAAED04-6F59-41A7-8BA7-5ADF073A039D}';in=0B;out=0B netI='isatap.{91AD5331-F765-44D1-97C5-8300E1657E15}';in=0B;out=0B netI='isatap.{AF7DE461-DFBB-4122-804D-6CB5ECCF2683}';in=0B;out=0B netI='6TO4 Adapter';in=0B;out=0B SERVICECHECKCOMMAND::dummy  HOSTSTATE::UP   HOSTSTATETYPE::HARD SERVICESTATE::OK    SERVICESTATETYPE::HARD

with this Message:

[2016-07-15 10:24:57,180, CRITICAL] Traceback (most recent call last):
[2016-07-15 10:24:57,180, CRITICAL]   File "/usr/sbin/ingraph-collectord", line 9, in 
[2016-07-15 10:24:57,180, CRITICAL] load_entry_point('ingraph==1.0.2', 'console_scripts', 'ingraph-collectord')()
[2016-07-15 10:24:57,180, CRITICAL]   File "/usr/lib/python2.7/dist-packages/ingraph/bin/ingraph_collectord.py", line 376, in main
[2016-07-15 10:24:57,206, CRITICAL] return getattr(collectord, args[0])()
[2016-07-15 10:24:57,206, CRITICAL]   File "/usr/lib/python2.7/dist-packages/ingraph/daemon.py", line 207, in start
[2016-07-15 10:24:57,211, CRITICAL] self.run()
[2016-07-15 10:24:57,212, CRITICAL]   File "/usr/lib/python2.7/dist-packages/ingraph/bin/ingraph_collectord.py", line 230, in run
[2016-07-15 10:24:57,212, CRITICAL] observation, perfdata = parser.parse(line)
[2016-07-15 10:24:57,212, CRITICAL]   File "/usr/lib/python2.7/dist-packages/ingraph/parser.py", line 188, in parse
[2016-07-15 10:24:57,217, CRITICAL] warn_upper = self._parse_decimal(warn_upper)
[2016-07-15 10:24:57,218, CRITICAL]   File "/usr/lib/python2.7/dist-packages/ingraph/parser.py", line 105, in _parse_decimal
[2016-07-15 10:24:57,218, CRITICAL] value = float(value.replace(',', ''))
[2016-07-15 10:24:57,218, CRITICAL] ValueError
[2016-07-15 10:24:57,218, CRITICAL] :
[2016-07-15 10:24:57,218, CRITICAL] could not convert string to float: out=0B

Executed from the Windows Commandline:

C:\Program Files\ICINGA2\sbin>check_network.exe -w 30000000 -c 35000000
NETWORK CRITICAL 107197220B/s | network=107197220B;30000000;35000000;0; netI='IB
M-USB-NDIS-Remotenetzwerkgerõt';in=0B;out=0B netI='Intel[R] I350 Gigabit Network
 Connection';in=497B;out=274B netI='Intel[R] I350 Gigabit Network Connection _2'
;in=4777716B;out=98490849B netI='Intel[R] I350 Gigabit Network Connection _3';in
=407B;out=184B netI='Intel[R] I350 Gigabit Network Connection _4';in=632151B;out
=3295142B netI='isatap.{2717219A-3240-4FF4-A464-326E28EC2A6F}';in=0B;out=0B netI
='isatap.{1FD78EED-5F39-400F-AD35-D96AD48979E8}';in=0B;out=0B netI='isatap.{9CAA
ED04-6F59-41A7-8BA7-5ADF073A039D}';in=0B;out=0B netI='isatap.{91AD5331-F765-44D1
-97C5-8300E1657E15}';in=0B;out=0B netI='6TO4 Adapter';in=0B;out=0B

Can i do anything to fix this, or is it a Plugin-Problem?

Thank you,
Uwe

PS:
It's not rally nice, because the script collect all but that's only a secondary Problem.
Could you please add a "check only this Interface"-Option?

Attachments

Changesets

2016-09-28 09:20:42 +00:00 by black_dragon131 8c35c82

Update perfdata; Add skipping of isatap interfaces with parameter

Also updates interface names to fix perfdata output

refs #12155

2016-09-28 09:20:42 +00:00 by jflach 6c565d1

Update check_network in docs and itl

fixes #12155

2016-09-28 09:26:08 +00:00 by jflach eabb54e

Spell ISATAP correctly and set noisatap in the ITL

refs #12155

2016-09-29 06:28:51 +00:00 by gbeutner cb86fb8

Update AUTHORS

refs #12155
refs #12822

Relations:

@icinga-migration
Copy link
Author

Updated by viper539 on 2016-07-15 13:04:28 +00:00

OS is Windows Server 2008 R2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-07-28 15:13:39 +00:00

  • Relates set to 10544

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-07-28 15:13:51 +00:00

  • Status changed from New to Assigned
  • Assigned to set to jflach

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-07-28 15:14:01 +00:00

  • Category changed from Perfdata to Plugins

@icinga-migration
Copy link
Author

Updated by Marax on 2016-09-19 13:00:52 +00:00

  • File added perfdata.jpg

With Icinga2 2.5.4 the perfdata of this Windows plugin is still broken. See attachet file perfdata.jpg

pnp4nagios errs out with "Invalid Perfdata detected".

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-09-19 13:22:47 +00:00

  • Status changed from Assigned to Feedback

You can test the snapshot packages. Jean fixed the performance data output as part of #10544.

@icinga-migration
Copy link
Author

Updated by Marax on 2016-09-20 15:39:49 +00:00

dnsmichi wrote:

You can test the snapshot packages. Jean fixed the performance data output as part of #10544.

Testing 2.5.4-101-gfe3fe5c with no success. Appearance is unchanged.

@icinga-migration
Copy link
Author

Updated by Marax on 2016-09-21 10:26:53 +00:00

This is what the plugin offer

NETWORK OK 0B/s | network=0B;;;0; netI='Intel[R] PRO_1000 MT-Netzwerkverbindung';in=0B;out=0B netI='isatap.{AEDD2589-9E0B-41CD-A917-7D30C07D982E}';in=0B;out=0B netI='6TO4 Adapter';in=0B;out=0B

looks like a problem with the spaces as delimiter. As it looks in the perfdata.jpg it interpretes everything behind the netI= until to the next space as perfdata ( Intel[R , isatap.{AEDD2589-9E0B-41CD-A917-7D30C07D982E}, 6TO4 )

after the spaces it starts with a new Label ( netI (3 times), PRO_1000, MT-Netzwerkverbindung, Adapter';in )

@icinga-migration
Copy link
Author

Updated by black_dragon131 on 2016-09-21 19:06:03 +00:00

  • File added 0001-fix-wrong-perfdata.patch
  • File added 0002-fix-wrong-perfdata-add-skipping-of-isatap-interfaces.patch

dnsmichi wrote:

You can test the snapshot packages. Jean fixed the performance data output as part of #10544.

This never fixed the problem. This was the right way to fix it #53

The reason is perfdata is defined as 'label'=value[UOM];[warn];[crit];[min];[max]
but it gets:
network=valueB;;;min; (this one is correct)

followed for each interface with:

'label' : netI (correct, but not really ‎descriptive)
value : name of interface (no number)
warn : in=valueB (same)
crit : out=valueB (same)

I recreated my patch for the current version (first file).
Second one adds a parameter to skip isatap interfaces in the output. Don't know if it's useful for someone but I believe graphite doesn't like those { } in it's path (at least it didn't a few versions ago).

Output looks like:

PS L:\git\icinga2> .\Bin\Release\Debug\check_network.exe -n -w 1 -c 2
NETWORK CRITICAL 119B/s | network=119B;1;2;0; 'Realtek PCIe GBE Family Controller_in'=119B 'Realtek PCIe GBE Family Controller_out'=0B

so it creates a perfdata for in and out for each interface.

@icinga-migration
Copy link
Author

Updated by Marax on 2016-09-22 10:10:11 +00:00

black_dragon131 wrote:

so it creates a perfdata for in and out for each interface.

Can i download somewhere the compiled check_network.exe with this Patches for testing?

@icinga-migration
Copy link
Author

Updated by black_dragon131 on 2016-09-24 09:35:35 +00:00

Marax wrote:

Can i download somewhere the compiled check_network.exe with this Patches for testing?

Try those:
x86: https://black-dragon131.de/icinga/x86/check\_network.exe
x64: https://black-dragon131.de/icinga/x64/check\_network.exe

@icinga-migration
Copy link
Author

Updated by jflach on 2016-09-26 15:04:07 +00:00

Hello black_dragon131,

I'd love to merge your patch but we do have a real name policy. Could you please change your name to something that sounds like a normal name?

Cheers,
Jean

@icinga-migration
Copy link
Author

Updated by black_dragon131 on 2016-09-27 05:32:13 +00:00

jflach wrote:

Hello black_dragon131,

I'd love to merge your patch but we do have a real name policy. Could you please change your name to something that sounds like a normal name?

Cheers,
Jean

If you tell me where I can change my name I can do it

@icinga-migration
Copy link
Author

Updated by jflach on 2016-09-27 09:05:26 +00:00

I wish it was trivial

First you'll need to rebase before the commit you want to change (git rebase $hashofyourcommit^)
Then you can change your name with
git commit --amend --author "New Name <mail@addr.tld>"

Alternatively I could do it for you when merging

@icinga-migration
Copy link
Author

Updated by Marax on 2016-09-27 12:38:20 +00:00

  • File added Icinga2_Perf.jpg
  • File added NSClient_Perf.jpg

black_dragon131 wrote:

Try those:
x86: https://black-dragon131.de/icinga/x86/check\_network.exe
x64: https://black-dragon131.de/icinga/x64/check\_network.exe

Thank you.

Little feedback after brief testing. The performance data are now useable.
The crit and warn values are global for "network". If there are several NICs with different speedlevel this may be difficult to handle.

What I have noticed also is the badly formatted performance table in IcingaWeb2.This is the case on every check of the Icinga2 Client/Agent. The "Label" row is too small. If the data came from the NSClient** the table rows looking well formatted. Maybe random just here...

I have tested the changed command-plugins-windows.conf to enable the noisatap option.

Line 107 "-n" = {
set_if = "$network_win_noisatap$"
description = "Exclude the IsaTap - Adapter from check"
}
}
vars.network_win_noisatap = false

@icinga-migration
Copy link
Author

Updated by black_dragon131 on 2016-09-27 18:43:26 +00:00

  • File added 0001-fix-wrong-perfdata-add-skipping-of-isatap-interfaces.patch

@jflach Ah I thought you mean here... my bad
git setup was long time ago didn' t remember I set the name...
Check the new file :)

Marax wrote:

Little feedback after brief testing. The performance data are now useable.

I use those .exe in our production environment so it should ;)

Marax wrote:

The crit and warn values are global for "network". If there are several NICs with different speedlevel this may be difficult to handle.

That's true but isn' t related to perfdata ;) But I agree with this:

viper539 wrote:

PS:
It's not rally nice, because the script collect all but that's only a secondary Problem.
Could you please add a "check only this Interface"-Option?

Marax wrote:

I have tested the changed command-plugins-windows.conf to enable the noisatap option.

Line 107 "-n" = {
set_if = "$network_win_noisatap$"
description = "Exclude the IsaTap - Adapter from check"
}
}
vars.network_win_noisatap = false

That' s correct and how I did in our environment :)

@icinga-migration
Copy link
Author

Updated by jflach on 2016-09-28 09:19:27 +00:00

Thank you very much!

I'll merge this and then update the documentation and itl

@icinga-migration
Copy link
Author

Updated by jflach on 2016-09-28 09:25:04 +00:00

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

Applied in changeset 6c565d1.

@icinga-migration
Copy link
Author

Updated by leeclemens on 2016-11-08 18:58:13 +00:00

I ran in to this issue with 2.5.4 as well. The snapshot from 2016-10-26 resolved it.
However, I don't see this bug on the Roadmap or a target version for the fix (hopefully it's just a metadata issue, but I wanted to bring it up).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-09 09:27:05 +00:00

  • Target Version set to 2.6.0

@icinga-migration
Copy link
Author

Updated by nE0sIghT on 2016-12-02 06:05:49 +00:00

jflach wrote:

Applied in changeset 6c565d1.

There is a typo - "network_no_iastap" should be "network_no_isatap"

@icinga-migration
Copy link
Author

Updated by jflach on 2016-12-02 09:51:19 +00:00

nE0sIghT wrote:

jflach wrote:
> Applied in changeset 6c565d1.

There is a typo - "network_no_iastap" should be "network_no_isatap"

That was fixed in eabb54e, no worries .

@icinga-migration icinga-migration added bug Something isn't working Plugins labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.6.0 milestone Jan 17, 2017
@dnsmichi dnsmichi added the area/windows Windows agent and plugins label May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows Windows agent and plugins bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants