Coder Social home page Coder Social logo

Comments (6)

dnsmichi avatar dnsmichi commented on July 24, 2024

Can you send in a PR which fixes the issue please? :)

from manubulon-snmp.

jcromero avatar jcromero commented on July 24, 2024

My perl knowledge is close to zero, but I think that https://github.com/dnsmichi/manubulon-snmp/blob/master/plugins/check_snmp_int.pl#L718 is the line to modify :/

from manubulon-snmp.

dnsmichi avatar dnsmichi commented on July 24, 2024

Hm, do you have some sample data then which I could use for further analysis? (plugin output and perfdata on the cli)

from manubulon-snmp.

pclerie avatar pclerie commented on July 24, 2024

This is the command line that produces the interface data being shown, as taken from /var/log/icinga2/debug.log:

'/usr/lib/nagios/plugins/check_snmp_int.pl' '-2' '-B' '-C' 'logisys-monitor' '-H' '172.28.5.3' '-M' '-Y' '-c' '0,600' '-d' '300' '-f' '-k' '-n' '\bpppoe0|\beth1|\btun0' '-t' '5' '-w' '300,400'

And if we enter that as is on the command line the output is:

eth1:UP  (0.0Mbps/0.0Mbps), tun0:UP  (0.0Mbps/0.0Mbps), pppoe0:UP  (0.0Mbps/0.0Mbps):(3 UP): UNKNOWN | 'eth1_in_bps'=1114;300000000;;0;100000000 'eth1_out_bps'=752;400000000;600000000;0;100000000  'tun0_in_bps'=5075;300000000;;0;0 'tun0_out_bps'=3401;400000000;600000000;0;0  'pppoe0_in_bps'=22887;300000000;;0;0 'pppoe0_out_bps'=12744;400000000;600000000;0;0

(The reason for the UNKOWN status is because I removed the parts of the output saying it could not write to the output file in /tmp.)

And the performance data from this output get written to the database as:

perfdata = E'eth1_in_bps=1761;300000000;;0;100000000 eth1_out_bps=969;400000000;600000000;0;100000000 '' ''pppoe0_in_bps''''=23036;300000000;;0;0 pppoe0_out_bps=12687;400000000;600000000;0;0 '' ''tun0_in_bps''''=4569;300000000;;0;0 tun0_out_bps=3055;400000000;600000000;0;0'

There are three things to note:

  • The first is only apparent when looking at a full debug.log. The interfaces are not always returned in the same order. Each in/out pair is listed alternately in first position.

  • In the command line output, the pairs are separated by two spaces, while the in|out counters are separated by a single space.

  • Finally, here is how I unpack the database input line:

    • Each pair of counters is between single quotes. So the first pair is: 'eth1_in_bps=1761;300000000;;0;100000000 eth1_out_bps=969;400000000;600000000;0;100000000 '.
    • The second pair is: ' ''pppoe0_in_bps''''=23036;300000000;;0;0 pppoe0_out_bps=12687;400000000;600000000;0;0 '
    • And the last: ' ''tun0_in_bps''''=4569;300000000;;0;0 tun0_out_bps=3055;400000000;600000000;0;0'

The above is part of my internal bug report. The command line above will produce counters:

  • eth1_in_bps
  • _'pppoe0_in_bps'
  • _'tun0_in_bps'

Hope that helps.

from manubulon-snmp.

Marco-Total avatar Marco-Total commented on July 24, 2024

Hi,

i think, i have the same issue, i use the actually version from this page and use the following command

'/usr/lib64/nagios/plugins/check_snmp_int.pl' '-H' '172xx.xx.xx' '-L' 'sha,des' '-l' 'icinga2' '-X' 'XXX' '-x' 'XXX' '-Y' '-d' '60' '-e' '-f' '-kM' '-n' '48' '-w' '80,80' '-c' '90,90' '-B' '--64bits'

Perfdate Output looks very strange:

'D-Link Corporation DGS-1250-52XMP HW A1 firmware 2_01.006 Port 48_in_error'=0c

In this form i didn't get the grafana graph.

from manubulon-snmp.

SteScho avatar SteScho commented on July 24, 2024

Hi,

The problem with the spaces in the interface name - not to mention the length. I don't have a D-Link here: Are ifName or ifAlias better? Have you already tried that?

Otherwise you could think about a PR which converts the names. Convert spaces to _ and shorten the name using a regexp filter. The firmware version actually has no place in a switch port name. I thik "Port_48_in_error" would be enough. It's strange what D-Link is doing here.

from manubulon-snmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.