Coder Social home page Coder Social logo

Comments (7)

SteScho avatar SteScho commented on July 24, 2024

Hi.

Just a short question at the beginning: Do you really use the check_snmp_int.pl from this repo? Perl claims line 1100 but that script has only 1085 lines.

To your questions:

  1. Normally that happens if your switch don't send the interface speed via snmp.
  2. The uom is c. Your monitoring solutions should be able to handle that.
  3. Hm, not yet. But you are welcome to send a PR with suitable code.

A general tip: Can you start the command on the cli and add -v as an argument? This gives you more details on what this command is doing in the background.

from manubulon-snmp.

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

Hi,

first thx for your support!

  1. Sorry, I recopy the source code from git to the checkscript, with the Parameter -S and -v I can see, that the Interface-Speed read corectly:
'/usr/lib64/nagios/plugins/check_snmp_int.pl' '-t' '10' '-H' '172.xx.xx.xx' '-x' 'password' '-L' 'sha,aes' '-X' 'password' '-n' 'eth0' '-l' 'username' '-N' '--label' '-q' '-k' '-e' '-f' '-d' '60' '-c' '280,280,2,2,2,2' '-Y' '-M' '-B' '-w' '200,200,1,1,1,1' '--64bits'  -S -v
Alarm in 10 seconds
SNMPv3 AuthPriv login : username, sha, aes
Filter : eth0
OID : 1.3.6.1.2.1.31.1.1.1.1.143, Desc : br1
OID : 1.3.6.1.2.1.31.1.1.1.1.2, Desc : eth0
**Name : eth0, Index : 2**
OID : 1.3.6.1.2.1.31.1.1.1.1.3, Desc : eth1
...
File read returns : 0 with 200 rows
**Interface speed : 100000000**
Write file returned : 0
Interface 0, check 0 : 0.232522642201835
Interface 0, check 1 : 0.242002788990826
Interface 0, check 2 : 0
Interface 0, check 3 : 0
Interface 0, check 4 : 0
Interface 0, check 5 : 0
Use of uninitialized value $speed_real in concatenation (.) or string at /usr/lib64/nagios/plugins/check_snmp_int.pl line 1042.
eth0:UP (in=0.2Mbps/out=0.2Mbps/errors-in=0.0/errors-out=0.0/discard-in=0.0/discard-out=0.0):1 UP: OK | 'eth0_in_bps'=232523;200000000;280000000;0;100000000 'eth0_out_bps'=242003;200000000;280000000;0;100000000 'eth0_in_error'=0c 'eth0_in_discard'=531c 'eth0_out_error'=0c 'eth0_out_discard'=0c 'eth0_speed_bps'=
  1. We use Icinga2, if I read the icinga2 docs, i find a descripten, that Icinga2 support the uom c.
    https://icinga.com/docs/icinga-2/latest/doc/05-service-monitoring/#unit-of-measurement-uom
    c - A continuous counter (e.g. interface traffic counters).

  2. sorry, I can program something in principle, but deeper knowledge and experience I do not have, I see myself more as a user ;-)

from manubulon-snmp.

SteScho avatar SteScho commented on July 24, 2024

So it works now for you? If so I will close that issue. Or do you have any further questions?

from manubulon-snmp.

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

Hi,

  1. No, with the parameter "-v" i can see, that the script can read the interface speed, but the output still looks like this: eth0_speed_bps=
  2. Why couldn't Icinga2 can't handle the output correctly?
  3. Why I can see the warning and critical level in the output vor in/out speed, but not for error/discard level?

I love this script, but special with the second and third point i can't use the script :-(

Cheers, Marco

from manubulon-snmp.

SteScho avatar SteScho commented on July 24, 2024

Hi Marco.

  1. Can you try to fix line 1041 in the check? The line looks like my $speed_real = "" unless (defined($speed_real)); and I think you should just remove the my at the beginning.
  2. Icinga2 does handle the output correctly. Can you give me some more information about what you think that the problem with Icinga2 is in detail?
  3. The UOM is c. Warning and critical makes usually no sense here. But what do you want to achieve? Maybe it needs some explanation or that there is an alternative solution.

Regards,
Steffen

from manubulon-snmp.

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

Hi Steffen,

thank you!

  1. Remove thy "my" in line 1041 solve the problem with the output of the line speed!

  2. The Plugin-Output looks good (120 discard packets since last messure), but the Performancedata don't display the delta value since last messure, it shows the all time discard packets:
    1

  3. The first problem is, that the warning and critical value don't display in Icinga Perfomancedata-output:
    2

I want configure, that the sensor go in warning state, when for example the discard packets over 120 discard packets since last messure, see question 2). Now I configured, that the sensor go in warning state when all time discard packetes reach 35.000.000. I hope you understand my bad english! ;-)

'/usr/lib64/nagios/plugins/check_snmp_int.pl' '-t' '10' '-H' '172.00.00.10' '-x' 'password' '-L' 'sha,aes' '-n' 'eth0' '-X' 'password' '-l' 'username' '-N' '--label' '-q' '-k' '-e' '-S' '-d' '60' '-f' '-c' '280,280,50,50,40000000,50' '-Y' '-M' '-B' '-w' '250,250,25,25,35000000,25' '--64bits'

from manubulon-snmp.

SteScho avatar SteScho commented on July 24, 2024

Hi Marco.

  1. I have updated the source on github and removed that my too
  2. The output of the performance data of Icinga2 is correct. Just remember that Icinga2 only shows that data and don't interpreted in any way. That is just a simple -show me what you get- overview. Not more. If you want a deeper look use any of those visualizing tools.
  3. I know what you mean. That would be a bigger change if it is possible. And it only works if you store the latest check result on disk. Unfortunately, I don't have the time for such a change at the moment - I'm more of the moderator here. If you knew someone who could build it, just send me the associated PR.

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.