ranl / monitor-utils Goto Github PK
View Code? Open in Web Editor NEWMonitoring scripts for Zabbix / Nagios
License: GNU General Public License v2.0
Monitoring scripts for Zabbix / Nagios
License: GNU General Public License v2.0
Hi,
I'm trying to use your check-cisco.pl to monitor a cisco router, almost all checks are clear and simple to me, great job! Anyway I don't know how to perform the "int" check, I don't know wich is the format of the parameter I should provide in -i and where I can find the right OID.
For examples if I give as OID .1.3.6.1.2.1.2.2.1.1.1 which should be the index of first interface I get :
./check-cisco.pl -H XXX.XXX.XXX.XXX -C <my community> -t int -o .1.3.6.1.2.1.2.2.1.1.1
SNMP error: No response from remote host 'XXX.XXX.XXX.XXX'
If I use the same OID using snmpwalk I get :
$ snmpwalk -v 1 XXX.XXX.XXX.XXX -c <my community> .1.3.6.1.2.1.2.2.1.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
Can you please provide some examples ? It's not so clear to understand which is the right way to pass the parameter and which parameter I should pass
Thanks in advance
magowiz
They shouldn't be required in the firmware and model modes.
Hello,
I noticed a problem with the subcommand SHELF of check-netapp-ng.pl:
the output is split on multiple lines and this make Nagios display the wrong message (the first line instead of the mast one). The following patch fix this issue:
@@ -368,7 +368,6 @@
$shelf{'VoltUnderWarn'} = _get_oid_value($snmp_session,"$snmpEnclTableVoltUnderWarn.$oid");
foreach my $subkey ( keys %shelf) {
- print "$subkey\t$shelf{$subkey}\n";
if($shelf{$subkey}) { push(@shelf_err,"$addr $subkey,") }
}
if($#shelf_err != -1) {
Makes it sense to you?
Thanks
The check times out and then exits with OK and status 0.
[root@hlv]~# time ./check-paloalto-A500.pl -H 123.123.123.123 -C communitystring -t ha -w asd -c asd
OK: High Availablity Mode: , Local: , Peer:
real 0m30.086s
user 0m0.047s
sys 0m0.007s
[root@hlv]~# echo $?
0
[root@hlv]~#
Should probably exit with UNKNOWN or CRITICAL.
The current calculation from centidegrees(?) to degrees contains an error.
When temperature is below 10 degrees the raw value is only 3 digits long, so by allways taking the first 2 digits, the calculated value ends up as eg 99 degreess instead of 9.9 degrees
I've fixed locally by using this line instead
$internal = $internal / 100.0;
For example if the remote host is not responding, I get:
PS: OK - 0 PS are running all good | total=0 err=0
For the fans checks, I get a misleading message:
fan: CRIT - No Fans are running
I was expected a message like "No reponse from ...", as the message returned by snmpget.
I'm working on a fix.
Hesslo i would be nice to check alse the aggregate allocation.
I've got this error when installing this plugin:
(No output on stdout) stderr: Can't locate utils.pm in @INC (@INC contains: /usr/lib64/nagios/plugins /usr/lib64/nagios/libexec /usr/lib/nagios/plugins /usr/lib/nagios/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check-netapp-ng.pl line 43.
Please add this use lib "/usr/local/nagios/libexec";
to the script to support default Nagios location when installed from source
If the check timeouts, no useful message is provided, and also the exit code is not correct:
[root@nagios hardware]# ./check-netapp-ng.pl -H 192.168.0.10 -C public -T UPTIME
Alarm clock
[root@nagios hardware]# echo $?
142
The check should return 2 (critical), and provide an input like "no reponse from XXXX"
I'll try to fix this.
Hello,
we have a FAS8200 and after a reboot the uptime check give following message.
**ePN /usr/local/icinga/libexec//check_netapp_ng.pl: plugin did not call exit()
The reason ist for the first day after a reboot the uptime output from snmp is
4 hours, 44:54.86
The check expected something like 4 days, 7:14:35:17.12
I have no experience with github so i do not know how i upload the fixed code.
Here my recommended code.
### UPTIME ###
} elsif("$opt{'check_type'}" eq "UPTIME") {
my $check = _get_oid_value($snmp_session,$snmpUpTime);
$msg = "$opt{'check_type'}: $check";
if ($check =~ /hours/){
$check =~ m/^\s*(\d+)\s+hours,\s+(\d+):(\d+).*$/;
$perf = "uptime=" . ($1*3600 + $2*60 + $3) . "s";
}else{
$check =~ m/^\s*(\d+)\s+days,\s+(\d+):(\d+):(\d+).*$/;
$perf = "uptime=" . ($1*86400 + $2*3600 + $3*60 + $4) . "s";
}
Hi Ran,
Great plugin however unfortunately it doesn't work with NetApp 8.3.
I tried it and it doesn't find the OID's - maybe NetApp has made some drastic changes in the MIB?
NetApp release:
snmpwalk -v 2c -c public netappvip 1.3.6.1.4.1.789.1.1.2
iso.3.6.1.4.1.789.1.1.2.0 = STRING: "NetApp Release 8.3.2P1: Thu Apr 14 15:58:25 UTC 2016"
Some examples:
./check-netapp-ng.pl -H netappvip -V 2c -C public -T GLOBALSTATUS
CRIT: GLOBALSTATUS noSuchObject noSuchObject | globalstatus=noSuchObject
./check-netapp-ng.pl -H netappvip -V 2c -C public -T FAN
OK: FAN noSuchObject | failedfans=noSuchObject
Would be great if you could make it compatible with the newer NetApp release. Maybe detect the version as a first step and according to the version (if version > 8) load different OID's?
Hi ,
I am using check_netapp_ng.pl -H xxx -T SNAPSHOTAGE -C public -V 1 โ c 2 (it works fine)
and we have from each /vol/*** ca. five snapshot
The check gives me a CRITICAL if the oldest snapshot is older then 2 days.
But I want a CIRTICAL if the youngest snapshot is older then 24 hours
Can someone help me ?
-d = number of days that th ethernet interface hasn't change state, default is 14 (only for -t freeint)
"the" is missing the "e"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.