Comments (7)
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:
- Normally that happens if your switch don't send the interface speed via snmp.
- The uom is c. Your monitoring solutions should be able to handle that.
- 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.
Hi,
first thx for your support!
- 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'=
-
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). -
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.
So it works now for you? If so I will close that issue. Or do you have any further questions?
from manubulon-snmp.
Hi,
- 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=
- Why couldn't Icinga2 can't handle the output correctly?
- 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.
Hi Marco.
- 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 themy
at the beginning. - 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?
- 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.
Hi Steffen,
thank you!
-
Remove thy "my" in line 1041 solve the problem with the output of the line speed!
-
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:
-
The first problem is, that the warning and critical value don't display in Icinga Perfomancedata-output:
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.
Hi Marco.
- I have updated the source on github and removed that my too
- 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.
- 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)
- check_snmp_int.pl - Quantifier follows nothing in regex HOT 1
- Issues with 2012R2 and check_snmp_mem.pl HOT 1
- Use of uninitialized value $speed_real in concatenation (.) or string at check_snmp_int.pl line 976. HOT 3
- Consider Changing check_snmp_load -T netsl value names HOT 2
- check_snmp_int.pl treats device reboot as octet counters overflow
- SNMP interface check doesn't work with Perl < 5.13.2 HOT 1
- Installation requires perl-bignum on Fedora (likely CentOS/Redhat) for bigint package HOT 3
- check_snmp_mem.pl plugin giving wrong results HOT 5
- check_snmp_load.pl with -T netsl uses wrong oid HOT 4
- check_snmp_int with subinterface return cannot get interface speed using highperf mib : UNKNOWN HOT 3
- Fallback SNMP versions and counter sizes HOT 3
- Maintainer wanted HOT 1
- Error with check_snmp_process.pl with snmpv3 but not check_snmp_storage.pl HOT 3
- SNMP retries not respected due to global timeout HOT 3
- check_snmp_mem.pl fails with a specific device HOT 4
- check_snmp_storage - multiple warning args HOT 1
- check_snmp_int filling 0 valued rows PALO-ALTO 3220 HOT 1
- check_snmp_process - Slightly confusing error message due to rounding HOT 2
- Add support for SHA-256 auth and AES128 priv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manubulon-snmp.