mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
Merge branch 'master' of https://opensource.ok.is/git/misc
This commit is contained in:
commit
2c23f04ffa
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check APC devices
|
Summary: A Nagios plugin to check APC devices
|
||||||
Name: nagios-okplugin-apc
|
Name: nagios-okplugin-apc
|
||||||
Version: 0.0.2
|
Version: 0.0.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_apcext.pl/rel
|
|||||||
Requires: nagios-plugins
|
Requires: nagios-plugins
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -37,5 +38,8 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/*
|
%{_libdir}/nagios/plugins/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -1,41 +0,0 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
|
|
||||||
Summary: A Nagios plugin to check APC devices
|
|
||||||
Name: nagios-okplugin-apc
|
|
||||||
Version: 0.0.1
|
|
||||||
Release: 1%{?dist}
|
|
||||||
License: GPLv2+
|
|
||||||
Group: Applications/System
|
|
||||||
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-APC
|
|
||||||
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_apcext.pl/releases/nagios-okplugin-apc-%{version}.tar.gz
|
|
||||||
Requires: nagios-plugins
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
Checks APC devices, both netbotz and UPS
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
#perl -pi -e "s|/usr/lib|%{_libdir}|g" check_sip
|
|
||||||
|
|
||||||
%build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
install -D -p -m 0755 check_apcext.pl %{buildroot}%{_libdir}/nagios/plugins/check_apcext.pl
|
|
||||||
install -D -p -m 0755 check_snmp_apc_ups %{buildroot}%{_libdir}/nagios/plugins/snmp_apc_ups
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc README
|
|
||||||
%{_libdir}/nagios/plugins/*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
|
||||||
- Initial packaging
|
|
@ -1 +0,0 @@
|
|||||||
check_apcext.pl - APC Extra gear checks (netbotz/pdus)
|
|
@ -1,447 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# check_apcext.pl - APC Extra gear monitoring plugin for Nagios
|
|
||||||
# 05.02.07 Paul Venezia
|
|
||||||
#
|
|
||||||
# v0.0.1
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
use Net::SNMP;
|
|
||||||
use Getopt::Std;
|
|
||||||
use Data::Dumper;
|
|
||||||
use vars qw/ %opt /;
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
sub getmasked_values ($$);
|
|
||||||
|
|
||||||
if ($ARGV[0] =~ /(--help|-h|help)/ || !defined$ARGV[0]) {
|
|
||||||
&usage;
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $opts = 's:lmC:H:p:w:c:';
|
|
||||||
getopts ( "$opts", \%opt ) or &usage;
|
|
||||||
|
|
||||||
|
|
||||||
my $host = $opt{H};
|
|
||||||
my $comm = $opt{C};
|
|
||||||
my $param = $opt{p};
|
|
||||||
my $warn = $opt{w};
|
|
||||||
my $crit = $opt{c};
|
|
||||||
my $metric = $opt{m};
|
|
||||||
my $list = $opt{l};
|
|
||||||
my $sensor_int_name = $opt{s};
|
|
||||||
|
|
||||||
my ($oid, $oidbase, $fval, $unit, $outmsg);
|
|
||||||
my $retval = 0;
|
|
||||||
my %rpduamps;
|
|
||||||
|
|
||||||
my %oids = (
|
|
||||||
'nbmstemp' => {
|
|
||||||
'label' => 'Temp',
|
|
||||||
'unit' => ($metric ? 'degC' : 'degF'),
|
|
||||||
'oidbase' => '.1.3.6.1.4.1.5528.100.4.1.1.1',
|
|
||||||
'sensor_key' => 5,
|
|
||||||
'sensor_val' => 2,
|
|
||||||
'cdef' => ($metric ? '$val * 0.1' : '($val * .18) + 32')
|
|
||||||
},
|
|
||||||
'nbmshum' => {
|
|
||||||
'label' => 'Humidity',
|
|
||||||
'unit' => '%',
|
|
||||||
'oidbase' => '.1.3.6.1.4.1.5528.100.4.1.2.1',
|
|
||||||
'sensor_key' => 5,
|
|
||||||
'sensor_val' => 8,
|
|
||||||
},
|
|
||||||
'nbmsairflow' => {
|
|
||||||
'label' => 'Air Flow',
|
|
||||||
'unit' => 'CFM',
|
|
||||||
'oidbase' => '.1.3.6.1.4.1.5528.100.4.1.5.1',
|
|
||||||
'sensor_val' => 8,
|
|
||||||
'sensor_key' => 5,
|
|
||||||
'mod' => 'lt'
|
|
||||||
},
|
|
||||||
'nbmsaudio' => {
|
|
||||||
'label' => 'Audio Level',
|
|
||||||
'unit' => '',
|
|
||||||
'oidbase' => '.1.3.6.1.4.1.5528.100.4.1.4.1',
|
|
||||||
'sensor_val' => 7,
|
|
||||||
'sensor_key' => 5,
|
|
||||||
'mod' => ''
|
|
||||||
},
|
|
||||||
'rpduamps' => {
|
|
||||||
'label' => 'Power Output',
|
|
||||||
'unit' => 'Amps',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acscstatus' => {
|
|
||||||
'label' => 'Status',
|
|
||||||
'unit' => '',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.1.0'
|
|
||||||
},
|
|
||||||
'acscload' => {
|
|
||||||
'label' => 'Cooling Load',
|
|
||||||
'unit' => 'kW',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.3.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acscoutput' => {
|
|
||||||
'label' => 'Cooling output',
|
|
||||||
'unit' => 'kW',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.2.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acscsupair' => {
|
|
||||||
'label' => 'Supply Air',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.8.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acscretair' => {
|
|
||||||
'label' => 'Return Air',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.10.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acscairflow' => {
|
|
||||||
'label' => 'Airflow',
|
|
||||||
'unit' => 'CFM',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.4.0',
|
|
||||||
},
|
|
||||||
'acscracktemp' => {
|
|
||||||
'label' => 'Rack Inlet Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.6.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acsccondin' => {
|
|
||||||
'label' => 'Cond Inlet Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.30.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acsccondout' => {
|
|
||||||
'label' => 'Cond Outlet Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.28.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcstatus' => {
|
|
||||||
'label' => 'Status',
|
|
||||||
'unit' => '',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.1.0'
|
|
||||||
},
|
|
||||||
'acrcload' => {
|
|
||||||
'label' => 'Cooling Load',
|
|
||||||
'unit' => 'kW',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.2.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcoutput' => {
|
|
||||||
'label' => 'Cooling Output',
|
|
||||||
'unit' => 'kW',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.3.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcairflow' => {
|
|
||||||
'label' => 'Airflow',
|
|
||||||
'unit' => 'CFM',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.4.0'
|
|
||||||
},
|
|
||||||
'acrcracktemp' => {
|
|
||||||
'label' => 'Rack Inlet Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.6.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcsupair' => {
|
|
||||||
'label' => 'Supply Air',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.8.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcretair' => {
|
|
||||||
'label' => 'Return Air',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.10.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcfanspeed' => {
|
|
||||||
'label' => 'Fan Speed',
|
|
||||||
'unit' => '%',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.16.0',
|
|
||||||
'cdef' => '$val * .10',
|
|
||||||
},
|
|
||||||
'acrcfluidflow' => {
|
|
||||||
'label' => 'Fluid Flow',
|
|
||||||
'unit' => 'GPM',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.21.0',
|
|
||||||
'cdef' => '$val * .10',
|
|
||||||
'mod' => 'lt'
|
|
||||||
},
|
|
||||||
'acrcflenttemp' => {
|
|
||||||
'label' => 'Entering Fluid Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.23.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
'acrcflrettemp' => {
|
|
||||||
'label' => 'Returning Fluid Temp',
|
|
||||||
'unit' => 'F',
|
|
||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0',
|
|
||||||
'cdef' => '$val * .10'
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($list) {
|
|
||||||
my ($baseoid, $int_name_id, $value_id) = @_;
|
|
||||||
|
|
||||||
my ($session, $error) = Net::SNMP->session(
|
|
||||||
-hostname => $host,
|
|
||||||
-community => $comm,
|
|
||||||
-version => 1,
|
|
||||||
# -translate => [-octetstring => 0x0],
|
|
||||||
-port => "161"
|
|
||||||
);
|
|
||||||
my $response = $session->get_table(-baseoid => ".1.3.6.1.4.1.5528.100.2.1.1");
|
|
||||||
my $err = $session->error;
|
|
||||||
if ($err){
|
|
||||||
$retval = 3;
|
|
||||||
$outmsg = "UNKNOWN";
|
|
||||||
$session->close();
|
|
||||||
print "$outmsg $err - SNMP Error connecting to $host\n";
|
|
||||||
exit $retval;
|
|
||||||
}
|
|
||||||
my %sensor;
|
|
||||||
foreach my $k (keys %{$response}) {
|
|
||||||
my ($type, $id) = (split(/\./, $k))[-2,-1];
|
|
||||||
next if ($type != 1 and $type != 4);
|
|
||||||
next if ($id < 2000000000);
|
|
||||||
if ($type == 1) {
|
|
||||||
$sensor{$id}->{"int_name"} = $response->{$k};
|
|
||||||
} else {
|
|
||||||
$sensor{$id}->{"friendly_name"} = $response->{$k};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<" EO";
|
|
||||||
Specify a sensor by using the -s and the INTERNAL name of the sensor
|
|
||||||
|
|
||||||
Detected sensors:
|
|
||||||
|
|
||||||
EO
|
|
||||||
printf("\t%-32s %s\n", "Friendly Name", "Internal Name");
|
|
||||||
foreach my $id (sort { $sensor{$a}->{"friendly_name"} cmp $sensor{$b}->{"friendly_name"} } keys %sensor) {
|
|
||||||
printf ("\t%-32s %s\n", "\"$sensor{$id}->{friendly_name}\"", "\"$sensor{$id}->{int_name}\"");
|
|
||||||
}
|
|
||||||
exit 0;
|
|
||||||
|
|
||||||
|
|
||||||
} elsif (!$oids{$param}) {
|
|
||||||
print "No test parameter specified";
|
|
||||||
exit 3;
|
|
||||||
} else {
|
|
||||||
$oid = $oids{$param}->{oid};
|
|
||||||
$oidbase = $oids{$param}->{oidbase};
|
|
||||||
}
|
|
||||||
|
|
||||||
my ($session, $error) = Net::SNMP->session(
|
|
||||||
-hostname => $host,
|
|
||||||
-community => $comm,
|
|
||||||
-version => 1,
|
|
||||||
# -translate => [-octetstring => 0x0],
|
|
||||||
-port => "161"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
if ($param eq "rpduamps") {
|
|
||||||
# $param = "RackPDU";
|
|
||||||
my $i;
|
|
||||||
for ($i=1;$i<4;$i++) {
|
|
||||||
my $phoid = $oid . $i;
|
|
||||||
my $response = $session->get_request($phoid);
|
|
||||||
my $err = $session->error;
|
|
||||||
if ($err){
|
|
||||||
$retval = 3;
|
|
||||||
$outmsg = "UNKNOWN";
|
|
||||||
$session->close();
|
|
||||||
print "$outmsg $err - SNMP Error connecting to $host\n";
|
|
||||||
exit $retval;
|
|
||||||
}
|
|
||||||
$rpduamps{$i} = $response->{$phoid};
|
|
||||||
}
|
|
||||||
$session->close;
|
|
||||||
#$crit = ($crit * 10);
|
|
||||||
#$warn = ($warn * 10);
|
|
||||||
|
|
||||||
$unit = "Amps";
|
|
||||||
foreach my $ph ( sort keys %rpduamps ) {
|
|
||||||
my $tphase = ($rpduamps{$ph} * .1);
|
|
||||||
|
|
||||||
if (($tphase >= $crit) && ($retval < 2)) {
|
|
||||||
$retval = 2;
|
|
||||||
$outmsg = "CRITICAL";
|
|
||||||
|
|
||||||
} elsif (($tphase >= $warn) && ($retval < 1)) {
|
|
||||||
$retval = 1;
|
|
||||||
$outmsg = "WARNING";
|
|
||||||
|
|
||||||
} elsif ($retval < 1) {
|
|
||||||
$retval = 0;
|
|
||||||
$outmsg = "OK";
|
|
||||||
}
|
|
||||||
|
|
||||||
$fval .= "Phase $ph: " . $tphase;
|
|
||||||
#$fval .= "Phase $ph: " . ($tphase * .1);
|
|
||||||
if ($ph lt 3) {
|
|
||||||
$fval .= " Amps, ";
|
|
||||||
#} else {
|
|
||||||
# $fval .= " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
my $val;
|
|
||||||
if ($oid) {
|
|
||||||
my $response = $session->get_request($oid);
|
|
||||||
|
|
||||||
my $err = $session->error;
|
|
||||||
if ($err){
|
|
||||||
$retval = 3;
|
|
||||||
$outmsg = "UNKNOWN";
|
|
||||||
$session->close();
|
|
||||||
print "$outmsg $err - SNMP Error connecting to $host\n";
|
|
||||||
exit $retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$val = $response->{$oid};
|
|
||||||
$session->close();
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
my $snmpd = getmasked_values($oidbase, { $oids{$param}->{sensor_key} => 'sensor_key',
|
|
||||||
$oids{$param}->{sensor_val} => 'sensor_val' });
|
|
||||||
|
|
||||||
if ((keys %{$snmpd}) > 1 && !$sensor_int_name) {
|
|
||||||
print "UNKNOWN - Many sensors found but none specified, see -s and -l\n";
|
|
||||||
exit 3;
|
|
||||||
} elsif ((keys %{$snmpd}) == 0) {
|
|
||||||
print "UNKNOWN - no sensors found on this device\n";
|
|
||||||
exit 3;
|
|
||||||
} else {
|
|
||||||
my $id = (keys %{$snmpd})[0];
|
|
||||||
$val = $snmpd->{$id}->{sensor_val};
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($sensor_int_name) {
|
|
||||||
foreach my $k (keys %{$snmpd}) {
|
|
||||||
if (lc($snmpd->{$k}->{sensor_key}) eq lc($sensor_int_name)) {
|
|
||||||
$val = $snmpd->{$k}->{sensor_val};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($val eq "") {
|
|
||||||
print Dumper $snmpd;
|
|
||||||
print "UNKNOWN Unable to get sensor status\n";
|
|
||||||
exit 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($param eq "acscstatus" || $param eq "acrcstatus") {
|
|
||||||
if ($val == 1) {
|
|
||||||
$fval = "Standby";
|
|
||||||
$retval = 1;
|
|
||||||
$outmsg = "WARNING";
|
|
||||||
} elsif ($val == 2) {
|
|
||||||
$fval = "On";
|
|
||||||
$retval = 0;
|
|
||||||
$outmsg = "OK";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if ($oids{$param}->{cdef}) {
|
|
||||||
$fval = eval "$oids{$param}->{cdef}";
|
|
||||||
} else {
|
|
||||||
$fval = $val;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fval > $crit) {
|
|
||||||
$retval = 2;
|
|
||||||
$outmsg = "CRITICAL";
|
|
||||||
} elsif ($fval > $warn) {
|
|
||||||
$retval = 1;
|
|
||||||
$outmsg = "WARNING";
|
|
||||||
} else {
|
|
||||||
$retval = 0;
|
|
||||||
$outmsg = "OK";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print "$outmsg - " . $oids{$param}->{label} . " " .$fval . " " . $oids{$param}->{unit} . " | $param=$fval$oids{$param}->{unit}\n";
|
|
||||||
|
|
||||||
|
|
||||||
exit $retval;
|
|
||||||
|
|
||||||
sub usage {
|
|
||||||
|
|
||||||
print "Usage: $0 -H <hostip> -C <community> -p <parameter> -w <warnval> -c <critval> [-l] [-s sensor]\n";
|
|
||||||
print "\nParameters:\n";
|
|
||||||
print <<" EO";
|
|
||||||
APC NetBotz
|
|
||||||
nbmstemp NetBotz main sensor temp | nbmshum NetBotz main sensor humidity
|
|
||||||
nbmsairflow NetBotz main sensor airflow | nbmsaudio NetBotz main sensor audio
|
|
||||||
-l List connected sensors | -s sensor Sensor we want info from
|
|
||||||
|
|
||||||
APC Metered Rack PDU
|
|
||||||
rpduamps Amps on each phase
|
|
||||||
|
|
||||||
APC ACSC In-Row
|
|
||||||
acscstatus System status (on/standby) | acscload Cooling load
|
|
||||||
acscoutput Cooling output | acscsupair Supply air
|
|
||||||
acscairflow Air flow | acscracktemp Rack inlet temp
|
|
||||||
acsccondin Condenser input temp | acsccondout Condenser outlet temp
|
|
||||||
|
|
||||||
APC ACRC In-Row
|
|
||||||
acrcstatus System status (on/standby) | acrcload Cooling load
|
|
||||||
acrcoutput Cooling output | acrcairflow Air flow
|
|
||||||
acrcracktemp Rack inlet temp | acrcsupair Supply air
|
|
||||||
acrcretair Return air | acrcfanspeed Fan speed
|
|
||||||
acrcfluidflow Fluid flow | acrcflenttemp Fluid entering temp
|
|
||||||
acrcflrettemp Fluid return temp
|
|
||||||
EO
|
|
||||||
|
|
||||||
exit 3;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
sub getmasked_values ($$) {
|
|
||||||
my ($baseoid, $values) = @_;
|
|
||||||
|
|
||||||
my ($session, $error) = Net::SNMP->session(
|
|
||||||
-hostname => $host,
|
|
||||||
-community => $comm,
|
|
||||||
-version => 1,
|
|
||||||
-port => "161"
|
|
||||||
);
|
|
||||||
my $response = $session->get_table(-baseoid => $baseoid);
|
|
||||||
my $err = $session->error;
|
|
||||||
if ($err){
|
|
||||||
$retval = 3;
|
|
||||||
$outmsg = "UNKNOWN";
|
|
||||||
$session->close();
|
|
||||||
print "$err - SNMP Error connecting to $host\n";
|
|
||||||
exit $retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
my %snmpdata;
|
|
||||||
foreach my $k (keys %{$response}) {
|
|
||||||
my ($type, $id) = (split(/\./, $k))[-2,-1];
|
|
||||||
if ($values->{$type}) {
|
|
||||||
$snmpdata{$id}->{$values->{$type}} = $response->{$k};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return \%snmpdata;
|
|
||||||
}
|
|
@ -1,562 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
# Copyright (C) 2004 Altinity Limited
|
|
||||||
# E: info@altinity.com W: http://www.altinity.com/
|
|
||||||
#
|
|
||||||
# Edited by Roderick Derks (roderick@r71.nl)
|
|
||||||
# I changed the output of this plugin so it can bu used with Nagiosgrapher
|
|
||||||
# to create nice graphs (output is in hours is changed to minutes).
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# Adjusted by Roderick Derks (roderick@r71.nl)
|
|
||||||
# Output of snmp query for remaing battery runtime is in minutes or in hours. This
|
|
||||||
# is a problem when you want to create some nice graphs because of the different
|
|
||||||
# output. Now hours are converted to minutes.
|
|
||||||
#
|
|
||||||
|
|
||||||
use Net::SNMP;
|
|
||||||
use Getopt::Std;
|
|
||||||
|
|
||||||
$script = "check_snmp_apcups";
|
|
||||||
$script_version = "2.1.0";
|
|
||||||
|
|
||||||
$metric = 1;
|
|
||||||
|
|
||||||
$ipaddress = "192.168.1.1"; # default IP address, if none supplied
|
|
||||||
$version = "1"; # SNMP version
|
|
||||||
$timeout = 2; # SNMP query timeout
|
|
||||||
# $warning = 100;
|
|
||||||
# $critical = 150;
|
|
||||||
$status = 0;
|
|
||||||
$returnstring = "";
|
|
||||||
|
|
||||||
$community = "public"; # Default community string
|
|
||||||
|
|
||||||
|
|
||||||
# .1.3.6.1.4.1.
|
|
||||||
# enterprises.318.1.1.1.1.1.1.0 = STRING: "SMART-UPS 1000" upsIdent
|
|
||||||
|
|
||||||
# enterprises.318.1.1.1.2.2.1.0 Battery capacity (%)
|
|
||||||
# enterprises.318.1.1.1.2.2.2.0 Temperature (Celcius)
|
|
||||||
# enterprises.318.1.1.1.2.2.3.0 Battery runtime remaining
|
|
||||||
# enterprises.318.1.1.1.2.2.4.0 Battery replace indicator (1=ok, 2=replace)
|
|
||||||
# enterprises.318.1.1.1.2.2.5.0 Number of battery packs
|
|
||||||
# enterprises.318.1.1.1.2.2.6.0 Number of bad battery packs
|
|
||||||
|
|
||||||
# enterprises.318.1.1.1.3.2.1.0 Input voltage
|
|
||||||
# enterprises.318.1.1.1.3.2.4.0 Input frequency
|
|
||||||
# enterprises.318.1.1.1.3.2.5.0 Reason for last transfer to UPS battery power:
|
|
||||||
|
|
||||||
# enterprises.318.1.1.1.4.2.1.0 Output voltage
|
|
||||||
# enterprises.318.1.1.1.4.2.2.0 Output frequency
|
|
||||||
# enterprises.318.1.1.1.4.2.3.0 Output load as % of capacity
|
|
||||||
# enterprises.318.1.1.1.4.2.4.0 Output current in ampheres
|
|
||||||
|
|
||||||
# enterprises.318.1.1.1.4.2.1.0 Configured voltage
|
|
||||||
# enterprises.318.1.1.1.8.1.0 Whether agent is communicating with UPS (1)
|
|
||||||
|
|
||||||
$oid_upstype = ".1.3.6.1.4.1.318.1.1.1.1.1.1.0";
|
|
||||||
$oid_battery_capacity = ".1.3.6.1.4.1.318.1.1.1.2.2.1.0";
|
|
||||||
$oid_battery_temperature = ".1.3.6.1.4.1.318.1.1.1.2.2.2.0";
|
|
||||||
$oid_battery_runtimeremain = ".1.3.6.1.4.1.318.1.1.1.2.2.3.0";
|
|
||||||
$oid_battery_replace = ".1.3.6.1.4.1.318.1.1.1.2.2.4.0";
|
|
||||||
$oid_input_voltage = ".1.3.6.1.4.1.318.1.1.1.3.2.1.0";
|
|
||||||
$oid_input_frequency = ".1.3.6.1.4.1.318.1.1.1.3.2.4.0";
|
|
||||||
$oid_input_reasonforlasttransfer = ".1.3.6.1.4.1.318.1.1.1.3.2.5.0";
|
|
||||||
$oid_output_voltage = ".1.3.6.1.4.1.318.1.1.1.4.2.1.0";
|
|
||||||
$oid_output_frequency = ".1.3.6.1.4.1.318.1.1.1.4.2.2.0";
|
|
||||||
$oid_output_load = ".1.3.6.1.4.1.318.1.1.1.4.2.3.0";
|
|
||||||
$oid_output_current = ".1.3.6.1.4.1.318.1.1.1.4.2.4.0";
|
|
||||||
$oid_output_configuredvoltage = ".1.3.6.1.4.1.318.1.1.1.4.2.1.0";
|
|
||||||
$oid_comms = ".1.3.6.1.4.1.318.1.1.1.8.1.0";
|
|
||||||
$oid_test_result = ".1.3.6.1.4.1.318.1.1.1.7.2.3.0";
|
|
||||||
$oid_test_date = ".1.3.6.1.4.1.318.1.1.1.7.2.4.0";
|
|
||||||
$oid_sysDescr = ".1.3.6.1.2.1.1.1.0";
|
|
||||||
|
|
||||||
$upstype = "";
|
|
||||||
$battery_capacity = 0;
|
|
||||||
$battery_temperature = 0;
|
|
||||||
$battery_runtimeremain = 0;
|
|
||||||
$battery_replace = "";
|
|
||||||
$input_voltage = 0;
|
|
||||||
$input_frequency = 0;
|
|
||||||
$input_reasonforlasttransfer = "";
|
|
||||||
$output_voltage = 0;
|
|
||||||
$output_frequency = 0;
|
|
||||||
$output_load = 0;
|
|
||||||
$output_current = 0;
|
|
||||||
$output_configuredvoltage = 0;
|
|
||||||
$outagecause = "";
|
|
||||||
$test_result = "";
|
|
||||||
$test_date = "";
|
|
||||||
|
|
||||||
|
|
||||||
# Do we have enough information?
|
|
||||||
if (@ARGV < 1) {
|
|
||||||
print "Too few arguments\n";
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
|
|
||||||
getopts("h:H:C:w:c:");
|
|
||||||
if ($opt_h){
|
|
||||||
usage();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
if ($opt_H){
|
|
||||||
$hostname = $opt_H;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "No hostname specified\n";
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
if ($opt_C){
|
|
||||||
$community = $opt_C;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Create the SNMP session
|
|
||||||
my ($s, $e) = Net::SNMP->session(
|
|
||||||
-community => $community,
|
|
||||||
-hostname => $hostname,
|
|
||||||
-version => $version,
|
|
||||||
-timeout => $timeout,
|
|
||||||
);
|
|
||||||
|
|
||||||
main();
|
|
||||||
|
|
||||||
# Close the session
|
|
||||||
$s->close();
|
|
||||||
|
|
||||||
if ($returnstring eq ""){
|
|
||||||
$status = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($status == 0){
|
|
||||||
print "Status is OK - $returnstring\n";
|
|
||||||
# print "$returnstring\n";
|
|
||||||
}
|
|
||||||
elsif ($status == 1){
|
|
||||||
print "Status is a WARNING level - $returnstring\n";
|
|
||||||
}
|
|
||||||
elsif ($status == 2){
|
|
||||||
print "Status is CRITICAL - $returnstring\n";
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
print "Problem with plugin. No response from SNMP agent.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit $status;
|
|
||||||
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# This is where we gather data via SNMP and return results #
|
|
||||||
####################################################################
|
|
||||||
|
|
||||||
sub main {
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_comms))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$temp = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($temp eq "1"){
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
append("SNMP agent not communicating with UPS");
|
|
||||||
$status = 2;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_upstype))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$upstype = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_battery_capacity))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$battery_capacity = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_battery_temperature))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$battery_temperature = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_battery_runtimeremain))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$battery_runtimeremain = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
|
|
||||||
# RRD if output is in hours, change it to minutes so we can make a nice graph
|
|
||||||
if ( $battery_runtimeremain =~ "hour" ) {
|
|
||||||
$battery_runtimeremain2 = "$battery_runtimeremain";
|
|
||||||
$battery_runtimeremain =~s/hour.*//g;
|
|
||||||
$battery_runtimeremain = $battery_runtimeremain*60;
|
|
||||||
$battery_runtimeremain = "$battery_runtimeremain minutes";
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_battery_replace))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$battery_replace = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_input_voltage))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$input_voltage = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_input_frequency))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$input_frequency = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_input_reasonforlasttransfer))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$input_reasonforlasttransfer = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_output_voltage))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$output_voltage = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_output_frequency))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) { $returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$output_frequency = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_output_load))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$output_load = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_test_result))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$test_result = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
if (!defined($s->get_request($oid_test_date))) {
|
|
||||||
if (!defined($s->get_request($oid_sysDescr))) {
|
|
||||||
$returnstring = "SNMP agent not responding";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$returnstring = "SNMP OID does not exist";
|
|
||||||
$status = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($s->var_bind_names()) {
|
|
||||||
$test_date = $s->var_bind_list()->{$_};
|
|
||||||
}
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
$issue = "";
|
|
||||||
|
|
||||||
if ($input_reasonforlasttransfer eq "1"){
|
|
||||||
$outagecause = "No events"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "2"){
|
|
||||||
$outagecause = "High line voltage"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "3"){
|
|
||||||
$outagecause = "Brownout"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "4"){
|
|
||||||
$outagecause = "Loss of mains power"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "5"){
|
|
||||||
$outagecause = "Small temporary power drop"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "6"){
|
|
||||||
$outagecause = "Large temporary power drop"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "7"){
|
|
||||||
$outagecause = "Small spike"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "8"){
|
|
||||||
$outagecause = "Large spike"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "9"){
|
|
||||||
$outagecause = "UPS self test"
|
|
||||||
}
|
|
||||||
elsif ($input_reasonforlasttransfer eq "10"){
|
|
||||||
$outagecause = "Excessive input voltage fluctuation"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$outagecause = "Cannot establish reason"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($test_result eq "1") {
|
|
||||||
$test_result_string = "Passed";
|
|
||||||
}
|
|
||||||
elsif ($test_result eq "2") {
|
|
||||||
$test_result_string = "Failed";
|
|
||||||
}
|
|
||||||
elsif ($test_result eq "4") {
|
|
||||||
$test_result_string = "In Progress";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$test_result_string = "Unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($battery_capacity < 50) {
|
|
||||||
$issue = $issue . "BATTERY CAPACITY WARNING! ";
|
|
||||||
$status = 1;
|
|
||||||
}
|
|
||||||
if ($output_load > 80) {
|
|
||||||
$status = 1;
|
|
||||||
$issue = $issue . "OUTPUT LOAD WARNING! ";
|
|
||||||
}
|
|
||||||
if ($test_result eq "2") {
|
|
||||||
$issue = $issue . "SELF TEST FAILED! ";
|
|
||||||
$status = 1;
|
|
||||||
}
|
|
||||||
if ($input_voltage < 1){
|
|
||||||
$status = 2;
|
|
||||||
$issue = $issue . "RUNNING ON BATTERY! ";
|
|
||||||
}
|
|
||||||
if ($battery_capacity < 25) {
|
|
||||||
$issue = $issue . "BATTERY RUNNING LOW! ";
|
|
||||||
$status = 2;
|
|
||||||
}
|
|
||||||
if ($output_load > 90) {
|
|
||||||
$issue = $issue . "HIGH OUTPUT LOAD! ";
|
|
||||||
$status = 2;
|
|
||||||
}
|
|
||||||
if ($battery_replace eq "2") {
|
|
||||||
$issue = $issue . "REPLACE BATTERY! ";
|
|
||||||
$status = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Modified by Pall Sigurdsson <palli@opensource.is> to add some perfdata
|
|
||||||
# Modified 2010-06-03
|
|
||||||
my $perfdata="| 'battery_capacity'=$battery_capacity% 'temperature'=$battery_temperature 'input_voltage'=$input_voltage input_frequency=$input_frequency output_voltage=$output_voltage output_frequency=$output_frequency output_load=$output_load%";
|
|
||||||
|
|
||||||
|
|
||||||
if ($status == 0){
|
|
||||||
$temp = sprintf "$upstype - BATTERY:(capacity $battery_capacity%%, temperature $battery_temperature C, runtime $battery_runtimeremain) INPUT:(voltage $input_voltage V, frequency $input_frequency Hz) OUTPUT:(voltage $output_voltage V, frequency $output_frequency Hz, load $output_load%%) SELF TEST:($test_result_string on $test_date) LAST EVENT:($outagecause) $perfdata";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$temp = sprintf "$issue - $upstype - BATTERY:(capacity $battery_capacity%%, temperature $battery_temperature C, runtime $battery_runtimeremain) INPUT:(voltage $input_voltage V, frequency $input_frequency Hz) OUTPUT:(voltage $output_voltage V, frequency $output_frequency Hz, load $output_load%%) LAST EVENT:$outagecause $perfdata ";
|
|
||||||
}
|
|
||||||
append($temp);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# help and usage information #
|
|
||||||
####################################################################
|
|
||||||
|
|
||||||
sub usage {
|
|
||||||
print << "USAGE";
|
|
||||||
-----------------------------------------------------------------
|
|
||||||
$script v$script_version
|
|
||||||
|
|
||||||
Monitors APC SmartUPS via AP9617 SNMP management card.
|
|
||||||
|
|
||||||
Usage: $script -H <hostname> -c <community> [...]
|
|
||||||
|
|
||||||
Options: -H Hostname or IP address
|
|
||||||
-C Community (default is public)
|
|
||||||
|
|
||||||
-----------------------------------------------------------------
|
|
||||||
Copyright 2004 Altinity Limited
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it or modify
|
|
||||||
it under the terms of the GNU General Public License
|
|
||||||
-----------------------------------------------------------------
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
# Appends string to existing $returnstring #
|
|
||||||
####################################################################
|
|
||||||
|
|
||||||
sub append {
|
|
||||||
my $appendstring = @_[0];
|
|
||||||
$returnstring = "$returnstring$appendstring";
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check SMTP blacklists
|
Summary: A Nagios plugin to check SMTP blacklists
|
||||||
Name: nagios-okplugin-mailblacklist
|
Name: nagios-okplugin-mailblacklist
|
||||||
Version: 0.0.1
|
Version: 0.0.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -12,6 +12,7 @@ Requires: nagios-plugins
|
|||||||
Requires: nagios-plugins-perl
|
Requires: nagios-plugins-perl
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -37,5 +38,8 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/*
|
%{_libdir}/nagios/plugins/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.2-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -1,160 +0,0 @@
|
|||||||
#!/usr/bin/perl -w
|
|
||||||
#
|
|
||||||
# check_bl plugin for nagios
|
|
||||||
# $Revision: 1.0 $
|
|
||||||
#
|
|
||||||
# Nagios plugin designed to warn you if you mail servers appear in one of the
|
|
||||||
# many anti-spam 'blacklists'
|
|
||||||
#
|
|
||||||
# By Sam Bashton, Bashton Ltd
|
|
||||||
# bashton.com/content/nagios-plugins
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use lib "/usr/lib/nagios/plugins";
|
|
||||||
use utils qw($TIMEOUT %ERRORS &print_revision &support);
|
|
||||||
use Net::DNS;
|
|
||||||
use vars qw($PROGNAME);
|
|
||||||
my ($verbose,$host),;
|
|
||||||
my ($opt_V,$opt_h,$opt_B,$opt_H,$opt_c);
|
|
||||||
$opt_V = $opt_h = $opt_B = $opt_H = $opt_c = '';
|
|
||||||
my $state = 'UNKNOWN';
|
|
||||||
sub print_help();
|
|
||||||
sub print_usage();
|
|
||||||
|
|
||||||
$PROGNAME = "check_bl";
|
|
||||||
|
|
||||||
$ENV{'BASH_ENV'}='';
|
|
||||||
$ENV{'ENV'}='';
|
|
||||||
$ENV{'PATH'}='';
|
|
||||||
$ENV{'LC_ALL'}='C';
|
|
||||||
|
|
||||||
use Getopt::Long;
|
|
||||||
Getopt::Long::Configure('bundling');
|
|
||||||
GetOptions(
|
|
||||||
"V" => \$opt_V, "version" => \$opt_V,
|
|
||||||
"h" => \$opt_h, "help" => \$opt_h,
|
|
||||||
"H=s" => \$opt_H, "hostname=s" => \$opt_H,
|
|
||||||
"B=s" => \$opt_B, "blacklists=s" => \$opt_B,
|
|
||||||
"c=s" => \$opt_c, "critical=s" => \$opt_c
|
|
||||||
);
|
|
||||||
|
|
||||||
# -h means display verbose help screen
|
|
||||||
if ($opt_h) { print_help(); exit $ERRORS{'OK'}; }
|
|
||||||
|
|
||||||
# -V means display version number
|
|
||||||
if ($opt_V) {
|
|
||||||
print_revision($PROGNAME,'$Revision: 1.0 $ ');
|
|
||||||
exit $ERRORS{'OK'};
|
|
||||||
}
|
|
||||||
|
|
||||||
# First check the hostname is OK..
|
|
||||||
unless ($opt_H) { print_usage(); exit $ERRORS{'UNKNOWN'}; }
|
|
||||||
|
|
||||||
if (! utils::is_hostname($opt_H)){
|
|
||||||
print "$opt_H is not a valid host name\n";
|
|
||||||
print_usage();
|
|
||||||
exit $ERRORS{"UNKNOWN"};
|
|
||||||
}else{
|
|
||||||
if ($opt_H =~ /[a-zA-Z]/ )
|
|
||||||
# If the host contains letters we assume it's a hostname, not an IP
|
|
||||||
{
|
|
||||||
$host = lookup($opt_H);
|
|
||||||
}
|
|
||||||
else { $host = $opt_H }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# $opt_c is a count of the blacklists a mail server is in,
|
|
||||||
# after which state will be CRITICAL rather than WARNING
|
|
||||||
# By default any listing is CRITICAL
|
|
||||||
my $critcount = 0;
|
|
||||||
if ($opt_c) { $critcount = $opt_c };
|
|
||||||
|
|
||||||
# $opt_B is a comma seperated list of blacklists
|
|
||||||
$opt_B = shift unless ($opt_B);
|
|
||||||
unless ($opt_B) { print_usage(); exit -1 }
|
|
||||||
my @bls = split(/,/, $opt_B);
|
|
||||||
|
|
||||||
|
|
||||||
# Just in case of problems, let's not hang Nagios
|
|
||||||
$SIG{'ALRM'} = sub {
|
|
||||||
print ("ERROR: No response from BL server (alarm)\n");
|
|
||||||
exit $ERRORS{"UNKNOWN"};
|
|
||||||
};
|
|
||||||
alarm($TIMEOUT);
|
|
||||||
|
|
||||||
my %listed; # Hash of blacklists we're listed in.
|
|
||||||
foreach(@bls)
|
|
||||||
{
|
|
||||||
if (blcheck($host,$_)) { $listed{$_} = 1 }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scalar(keys(%listed)) == 0) { $state = 'OK' }
|
|
||||||
elsif (scalar(keys(%listed)) < $critcount) { $state = 'WARNING' }
|
|
||||||
else { $state = 'CRITICAL' }
|
|
||||||
|
|
||||||
if (%listed)
|
|
||||||
{
|
|
||||||
print "Listed at";
|
|
||||||
foreach (keys(%listed)) { print " $_" }
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
else { print "Not black-listed\n" }
|
|
||||||
|
|
||||||
exit $ERRORS{$state};
|
|
||||||
|
|
||||||
|
|
||||||
######## Subroutines ==========================
|
|
||||||
|
|
||||||
|
|
||||||
sub print_help() {
|
|
||||||
print_revision($PROGNAME,'$Revision: 1.0 $ ');
|
|
||||||
print "\n";
|
|
||||||
support();
|
|
||||||
}
|
|
||||||
|
|
||||||
sub print_usage () {
|
|
||||||
print "Usage: \n";
|
|
||||||
print " $PROGNAME -H host -B [blacklist1],[blacklist2] [-c critnum]\n";
|
|
||||||
print " $PROGNAME [-h | --help]\n";
|
|
||||||
print " $PROGNAME [-V | --version]\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub blcheck
|
|
||||||
{
|
|
||||||
my ($ip, $bl) = @_;
|
|
||||||
my $lookupip = $ip;
|
|
||||||
$lookupip =~
|
|
||||||
s/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/$4.$3.$2.$1.$bl/;
|
|
||||||
if (lookup($lookupip)) { return 1 }
|
|
||||||
else { return 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
sub lookup
|
|
||||||
{
|
|
||||||
my $tolookup = shift;
|
|
||||||
my $res = Net::DNS::Resolver->new;
|
|
||||||
my $query = $res->search($tolookup);
|
|
||||||
if ($query)
|
|
||||||
{
|
|
||||||
foreach my $rr ($query->answer)
|
|
||||||
{
|
|
||||||
next unless $rr->type eq "A"; # We're not interested in TXT records
|
|
||||||
return $rr->address;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
Nagios check_bl plugin (C)Copyright 2005 Bashton Ltd
|
|
||||||
----------------------------------------------------
|
|
||||||
|
|
||||||
A Nagios plugin to check whether a server is in any known anti-spam
|
|
||||||
blocklists. Licensed under the GNU GPL v2.0 or later (at your option). For
|
|
||||||
full copyright and warranty details, please see the COPYING file included in
|
|
||||||
this package.
|
|
||||||
|
|
||||||
By Sam Bashton, Bashton Ltd - sam@bashton.com www.bashton.com
|
|
||||||
|
|
||||||
Comments, bug reports etc are welcome.
|
|
||||||
|
|
||||||
Pre-Requisites
|
|
||||||
--------------
|
|
||||||
|
|
||||||
- Working Nagios install
|
|
||||||
- Perl 5 (tested with Perl 5.6.1 and 5.8)
|
|
||||||
- Net::DNS Perl library and associated dependencies
|
|
||||||
|
|
||||||
Installation
|
|
||||||
------------
|
|
||||||
|
|
||||||
- Copy to your nagios plugins directory (possibly /usr/lib/nagios/plugins)
|
|
||||||
- Add the following to your checkcommands.cfg:
|
|
||||||
|
|
||||||
define command{
|
|
||||||
command_name check_bl
|
|
||||||
command_line $USER1$/check_bl -H $HOSTADDRESS$ -B sbl-xbl.spamhaus.or
|
|
||||||
g,bl.spamcop.net,t1.dnsbl.net.au
|
|
||||||
}
|
|
||||||
|
|
||||||
- Alter your services.cfg to include a check against the check_bl command
|
|
||||||
|
|
||||||
Variables
|
|
||||||
---------
|
|
||||||
|
|
||||||
check_bl requires the following variables:
|
|
||||||
|
|
||||||
-H host : Hostname to check
|
|
||||||
-B blacklist1,blacklist2 : Comma separated list of blacklists to check against
|
|
||||||
|
|
||||||
The following optional variable is also available:
|
|
||||||
|
|
||||||
-c critnum : Number of blacklists the server must be listed in before the status is 'critical'. By default, any listing is regarded as critical.
|
|
@ -1,41 +0,0 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
|
|
||||||
Summary: A Nagios plugin to check SMTP blacklists
|
|
||||||
Name: nagios-okplugin-mailblacklist
|
|
||||||
Version: 0.0.1
|
|
||||||
Release: 1%{?dist}
|
|
||||||
License: GPLv2+
|
|
||||||
Group: Applications/System
|
|
||||||
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-MailBlacklist
|
|
||||||
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_bl/releases/%{name}-%{version}.tar.gz
|
|
||||||
Requires: nagios-plugins
|
|
||||||
Requires: nagios-plugins-perl
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
Checks DNS Blacklists for existance of hosts
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
perl -pi -e "s|/usr/lib|%{_libdir}|g" check_bl
|
|
||||||
|
|
||||||
%build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
install -D -p -m 0755 check_bl %{buildroot}%{_libdir}/nagios/plugins/check_bl
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc README COPYING
|
|
||||||
%{_libdir}/nagios/plugins/*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
|
||||||
- Initial packaging
|
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check network bond devices
|
Summary: A Nagios plugin to check network bond devices
|
||||||
Name: nagios-okplugin-bond
|
Name: nagios-okplugin-bond
|
||||||
Version: 0.0.1
|
Version: 0.0.2
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-Bond
|
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-Bond
|
||||||
@ -40,6 +40,9 @@ rm -rf %{buildroot}
|
|||||||
%config(noreplace) %{_sysconfdir}/nrpe.d/check_bond.cfg
|
%config(noreplace) %{_sysconfdir}/nrpe.d/check_bond.cfg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.2-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Sun Oct 16 2011 Tomas Edwardsson <tommi@opensource.is> 0.1-2
|
* Sun Oct 16 2011 Tomas Edwardsson <tommi@opensource.is> 0.1-2
|
||||||
- Added configuration into package
|
- Added configuration into package
|
||||||
|
|
@ -1,125 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
|
|
||||||
# Copyright 2010, Tomas Edwardsson
|
|
||||||
#
|
|
||||||
# check_bond.py is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# check_bond.py is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import pprint
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import getopt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def readbond( interface ):
|
|
||||||
intfile = "/proc/net/bonding/%s" % interface
|
|
||||||
|
|
||||||
# Read interface info
|
|
||||||
try:
|
|
||||||
bondfh = open (intfile, 'r')
|
|
||||||
except IOError, (errno, strerror):
|
|
||||||
print "Unable to open bond %s: %s" % (intfile, strerror)
|
|
||||||
sys.exit(3)
|
|
||||||
except:
|
|
||||||
print "Unexpected error:", sys.exc_info()[0]
|
|
||||||
sys.exit(3)
|
|
||||||
|
|
||||||
# Initialize bond data
|
|
||||||
bond = {}
|
|
||||||
bond['slaves'] = []
|
|
||||||
|
|
||||||
# Which interface are we working with
|
|
||||||
current_int = ''
|
|
||||||
|
|
||||||
# Loop throught the file contents
|
|
||||||
for line in bondfh.readlines():
|
|
||||||
# Remove newlines and split on colon, ignore other
|
|
||||||
try:
|
|
||||||
k, v = line.replace('\n', '').split(': ', 1)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Remove leading whitespaces
|
|
||||||
k = re.sub('^\s*', '', k)
|
|
||||||
# Bonding mode for the channel
|
|
||||||
if k == "Bonding Mode":
|
|
||||||
bond['bonding_mode'] = v
|
|
||||||
# Record current slave interface
|
|
||||||
elif k == "Slave Interface":
|
|
||||||
current_int = v
|
|
||||||
# Slave interface mii status
|
|
||||||
elif current_int and k == "MII Status":
|
|
||||||
bond['slaves'].append( { 'int' : current_int, 'mii_status' : v })
|
|
||||||
# Bond mii status
|
|
||||||
elif k == "MII Status":
|
|
||||||
bond['mii_status'] = v
|
|
||||||
|
|
||||||
return bond
|
|
||||||
|
|
||||||
def usage():
|
|
||||||
print "Usage: %s -i bond0" % sys.argv[0]
|
|
||||||
sys.exit(3)
|
|
||||||
|
|
||||||
def main(argv):
|
|
||||||
# Set variables
|
|
||||||
interface = ''
|
|
||||||
outstring = ''
|
|
||||||
retval = 0
|
|
||||||
|
|
||||||
# Nagios return code states
|
|
||||||
states = { 0 : 'OK', 1 : 'Warning', 2 : 'Critical', 3 : 'Unknown' }
|
|
||||||
|
|
||||||
# Try to read the arguments
|
|
||||||
try:
|
|
||||||
opts, args = getopt.getopt(argv, "hi:", ["help", "interface="])
|
|
||||||
except getopt.GetoptError:
|
|
||||||
usage()
|
|
||||||
sys.exit(3)
|
|
||||||
|
|
||||||
|
|
||||||
for opt, arg in opts:
|
|
||||||
if opt in ("-h", "--help"):
|
|
||||||
usage()
|
|
||||||
sys.exit(3)
|
|
||||||
elif opt in ("-i", "--interface"):
|
|
||||||
interface = arg
|
|
||||||
|
|
||||||
if (interface == ""):
|
|
||||||
usage()
|
|
||||||
sys.exit(3)
|
|
||||||
|
|
||||||
bond = readbond(interface)
|
|
||||||
|
|
||||||
# The whole bond is down
|
|
||||||
if bond['mii_status'] != 'up':
|
|
||||||
print "Critical: bonding device %s %s" % (interface, bond['mii_status'])
|
|
||||||
sys.exit(2)
|
|
||||||
|
|
||||||
# Some interface in the bond is down
|
|
||||||
for slave in bond['slaves']:
|
|
||||||
if slave['mii_status'] != 'up':
|
|
||||||
outstring = "%s%s down " % (outstring, slave['int'])
|
|
||||||
if retval < 1:
|
|
||||||
retval = 1
|
|
||||||
|
|
||||||
if retval:
|
|
||||||
print "%s: %s%s %s" % (states[retval], outstring, "in bonding device", interface)
|
|
||||||
sys.exit(retval)
|
|
||||||
|
|
||||||
print "OK: bonding device %s up and running" % interface
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main(sys.argv[1:])
|
|
@ -1,39 +0,0 @@
|
|||||||
%define debug_package %{nil}
|
|
||||||
|
|
||||||
Summary: A Nagios plugin to check network bond devices
|
|
||||||
Name: nagios-okplugin-bond
|
|
||||||
Version: 0.0.1
|
|
||||||
Release: 1%{?dist}
|
|
||||||
License: GPLv2+
|
|
||||||
Group: Applications/System
|
|
||||||
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-Bond
|
|
||||||
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_bond/releases/%{name}-%{version}.tar.gz
|
|
||||||
Requires: nagios-plugins
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
Checks the network bond device on a Linux machine
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
install -D -p -m 0755 check_bond %{buildroot}%{_libdir}/nagios/plugins/check_bond
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc README
|
|
||||||
%{_libdir}/nagios/plugins/*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
|
||||||
- Initial packaging
|
|
@ -1,3 +0,0 @@
|
|||||||
check_bond
|
|
||||||
|
|
||||||
Simple Nagios plugin that checks the status of bond devices
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check Brocade devices
|
Summary: A Nagios plugin to check Brocade devices
|
||||||
Name: nagios-okplugin-brocade
|
Name: nagios-okplugin-brocade
|
||||||
Version: 0.0.3
|
Version: 0.0.4
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -36,5 +36,8 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/*
|
%{_libdir}/nagios/plugins/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.4-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Nov 21 2010 Tomas Edwardsson <tommi@ok.is> 0.0.3-1
|
* Mon Nov 21 2010 Tomas Edwardsson <tommi@ok.is> 0.0.3-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check CIFS shares
|
Summary: A Nagios plugin to check CIFS shares
|
||||||
Name: nagios-okplugin-cifs
|
Name: nagios-okplugin-cifs
|
||||||
Version: 0.0.3
|
Version: 0.0.4
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -12,6 +12,7 @@ Requires: perl-Nagios-Plugin
|
|||||||
Requires: samba-client, krb5-workstation
|
Requires: samba-client, krb5-workstation
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -38,5 +39,8 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/*
|
%{_libdir}/nagios/plugins/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.4-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Nov 21 2010 Tomas Edwardsson <tommi@ok.is> 0.0.3-1
|
* Mon Nov 21 2010 Tomas Edwardsson <tommi@ok.is> 0.0.3-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check CPU on Linux servers
|
Summary: A Nagios plugin to check CPU on Linux servers
|
||||||
Name: nagios-plugins-check_cpu
|
Name: nagios-plugins-check_cpu
|
||||||
Version: 0.2
|
Version: 0.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_cpu/releases/
|
|||||||
Requires: nrpe
|
Requires: nrpe
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This shell script checks cpu utilization (user,system,iowait,idle in %)
|
This shell script checks cpu utilization (user,system,iowait,idle in %)
|
||||||
@ -41,6 +42,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.3-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Thu Nov 25 2010 Pall Sigurdsson <palli@opensource.is> 0.1-2
|
* Thu Nov 25 2010 Pall Sigurdsson <palli@opensource.is> 0.1-2
|
||||||
- Nrpe config now ships with plugin by default
|
- Nrpe config now ships with plugin by default
|
||||||
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
* Mon Mar 1 2010 Tomas Edwardsson <tommi@ok.is> 0.1-1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: Nagios Plugins to monitor HP Dataprotector
|
Summary: Nagios Plugins to monitor HP Dataprotector
|
||||||
Name: nagios-okplugin-check_dataprotector
|
Name: nagios-okplugin-check_dataprotector
|
||||||
Version: AUTOVERSION
|
Version: 1.0.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -45,5 +45,8 @@ rm -rf %{buildroot}
|
|||||||
/etc/nrpe.d/check_dataprotector.cfg
|
/etc/nrpe.d/check_dataprotector.cfg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 1.0.1-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Sep 15 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
* Mon Sep 15 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check disks via NRPE
|
Summary: A Nagios plugin to check disks via NRPE
|
||||||
Name: nagios-okplugin-check_disks
|
Name: nagios-okplugin-check_disks
|
||||||
Version: AUTOVERSION
|
Version: 1.0.1
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://opensource.is/trac/wiki/check_disks
|
URL: http://opensource.is/trac/wiki/check_disks
|
||||||
@ -40,6 +40,9 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/check_disks.pl
|
%{_libdir}/nagios/plugins/check_disks.pl
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 1.0.1-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Sun Oct 16 2011 Tomas Edwardsson <tommi@opensource.is> 0.1-2
|
* Sun Oct 16 2011 Tomas Edwardsson <tommi@opensource.is> 0.1-2
|
||||||
- Fixed dependencies and build arch
|
- Fixed dependencies and build arch
|
||||||
|
|
59
check_drbd/nagios-okplugin-check_drbd.spec
Normal file
59
check_drbd/nagios-okplugin-check_drbd.spec
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
%define plugin_name check_drbd
|
||||||
|
|
||||||
|
|
||||||
|
Summary: A Nagios plugin to check Linux Devicemapper Multipathing
|
||||||
|
Name: nagios-okplugin-%{plugin_name}
|
||||||
|
Version: 0.0.4
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: GPLv2+
|
||||||
|
Group: Applications/System
|
||||||
|
URL: http://opensource.is/trac/wiki/%{plugin_name}
|
||||||
|
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/%{plugin_name}/releases/%{name}-%{version}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
Packager: Pall Sigurdsson <palli@opensource.is>
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
perl -pi -e "s|/usr/lib|%{_libdir}|g" nrpe.d/%{plugin_name}.cfg
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
install -D -p -m 0755 check_drbd %{buildroot}%{_libdir}/nagios/plugins/check_drbd
|
||||||
|
install -D -p -m 0755 nrpe.d/%{plugin_name}.cfg %{buildroot}/etc/nrpe.d/%{plugin_name}.cfg
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
#%doc README LICENSE
|
||||||
|
%{_libdir}/nagios/plugins/*
|
||||||
|
/etc/nrpe.d/%{plugin_name}.cfg
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is> 0.0.4-1
|
||||||
|
- licence and readme removed from specfile (palli@opensource.is)
|
||||||
|
|
||||||
|
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is>
|
||||||
|
- licence and readme removed from specfile (palli@opensource.is)
|
||||||
|
|
||||||
|
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is>
|
||||||
|
- licence and readme removed from specfile (palli@opensource.is)
|
||||||
|
|
||||||
|
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is>
|
||||||
|
- licence and readme removed from specfile (palli@opensource.is)
|
||||||
|
|
||||||
|
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.2-1
|
||||||
|
- new package built with tito
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check HP EVA Disk Systems
|
Summary: A Nagios plugin to check HP EVA Disk Systems
|
||||||
Name: nagios-okplugin-check_eva
|
Name: nagios-okplugin-check_eva
|
||||||
Version: AUTOVERSION
|
Version: 1.0.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -40,5 +40,8 @@ rm -rf %{buildroot}
|
|||||||
/etc/nrpe.d/check_eva.cfg
|
/etc/nrpe.d/check_eva.cfg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 1.0.1-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Mar 1 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
* Mon Mar 1 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: A Nagios plugin to check HP Array with hpacucli
|
Summary: A Nagios plugin to check HP Array with hpacucli
|
||||||
Name: nagios-okplugin-check_hpacucli
|
Name: nagios-okplugin-check_hpacucli
|
||||||
Version: 0.0.2
|
Version: 0.0.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -38,5 +38,8 @@ rm -rf %{buildroot}
|
|||||||
/etc/nrpe.d/check_hpacucli.cfg
|
/etc/nrpe.d/check_hpacucli.cfg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
* Mon Mar 1 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
* Mon Mar 1 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
|
||||||
- Initial packaging
|
- Initial packaging
|
@ -300,7 +300,7 @@ def check_blowers():
|
|||||||
# Check blower 2
|
# Check blower 2
|
||||||
if blower2state == "1":
|
if blower2state == "1":
|
||||||
nagios_status(ok)
|
nagios_status(ok)
|
||||||
add_summary("Blower1 OK. " )
|
add_summary("Blower2 OK. " )
|
||||||
else:
|
else:
|
||||||
add_summary("Blower2 NOT OK. ")
|
add_summary("Blower2 NOT OK. ")
|
||||||
nagios_status(warning)
|
nagios_status(warning)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@ -278,3 +278,64 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) 19yy <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
54
check_linux_modules.pl/check_linux_modules.spec
Normal file
54
check_linux_modules.pl/check_linux_modules.spec
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
Summary: A Nagios plugins to check if a specific linux module exists
|
||||||
|
Name: nagios-okplugin-check_linux_modules
|
||||||
|
Version: 0.0.13
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: GPLv2+
|
||||||
|
Group: Applications/System
|
||||||
|
URL: http://opensource.is/trac/wiki/check_smssend
|
||||||
|
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/%{name}-%{version}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
Packager: Pall Sigurdsson <palli@opensource.is>
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
A Nagios plugins to check if a specific linux module exists
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
perl -pi -e "s|/usr/lib|%{_libdir}|g" nrpe.d/check_module.cfg
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
install -D -p -m 0755 check_linux_modules.pl %{buildroot}%{_libdir}/nagios/plugins/check_linux_modules.pl
|
||||||
|
install -D -p -m 0755 nrpe.d/check_module.cfg %{buildroot}/etc/nrpe.d/check_module.cfg
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc LICENSE
|
||||||
|
%{_libdir}/nagios/plugins/*
|
||||||
|
/etc/nrpe.d/check_module.cfg
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.13-1
|
||||||
|
- typo in plugin name fixed (palli@opensource.is)
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.12-1
|
||||||
|
- new package built with tito
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.11-1
|
||||||
|
- license added (palli@opensource.is)
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.10-1
|
||||||
|
-
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.9-1
|
||||||
|
- new package built with tito
|
||||||
|
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
Summary: Nagios plugins to check the status of MS-SQL Servers
|
Summary: Nagios plugins to check the status of MS-SQL Servers
|
||||||
Name: nagios-okplugin-mssql
|
Name: nagios-okplugin-mssql
|
||||||
Version: 0.0.3
|
Version: 0.0.6
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://opensource.is/trac/wiki/nagios-MSSQL
|
URL: http://opensource.is/trac/wiki/nagios-MSSQL
|
||||||
@ -39,5 +39,14 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/nagios/plugins/*
|
%{_libdir}/nagios/plugins/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.6-1
|
||||||
|
-
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is>
|
||||||
|
-
|
||||||
|
|
||||||
|
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is>
|
||||||
|
-
|
||||||
|
|
||||||
* Sun Nov 21 2010 Tomas Edwardsson <tommi@opensource.is> 0.0.3-1
|
* Sun Nov 21 2010 Tomas Edwardsson <tommi@opensource.is> 0.0.3-1
|
||||||
- Initial packaging
|
- Initial packaging
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user