1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-24 11:23:47 +01:00

Merge branch 'master' of github.com:opinkerfi/misc

Conflicts:
	nagios-plugins/check_yum/nagios-okplugin-check_yum.spec
This commit is contained in:
Pall Sigurdsson 2013-01-23 09:00:01 +00:00
commit 565cfa5e1a
14 changed files with 62 additions and 64 deletions

View File

@ -2,7 +2,7 @@
Summary: A Nagios plugin to check APC devices
Name: nagios-okplugin-apc
Version: 0.0.3
Version: 2.1.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -38,6 +38,10 @@ rm -rf %{buildroot}
%{_libdir}/nagios/plugins/*
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 2.1.0-1
- Version number bumped to 2.1.0 (palli@opensource.is)
- Added noarch buildarch (tommi@tommi.org)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
- new package built with tito

View File

@ -2,7 +2,7 @@
Summary: A Nagios plugin to check SMTP blacklists
Name: nagios-okplugin-mailblacklist
Version: 0.0.2
Version: 1.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -38,6 +38,9 @@ rm -rf %{buildroot}
%{_libdir}/nagios/plugins/*
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.0-1
- Updated buildarch to noarch (tommi@tommi.org)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.2-1
- new package built with tito

View File

@ -23,7 +23,7 @@ use Nagios::Plugin;
# Create the Nagios plugin object
my $np = Nagios::Plugin->new(
usage => "Usage: %s -H <hostname> -u <username> -p <password> -s <share>",
version => "0.01",
version => "1.0",
);
# Add valid arguments

View File

@ -2,7 +2,7 @@
Summary: A Nagios plugin to check CIFS shares
Name: nagios-okplugin-cifs
Version: 0.0.4
Version: 1.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -39,6 +39,10 @@ rm -rf %{buildroot}
%{_libdir}/nagios/plugins/*
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.0-1
- version number of scripts bumped (palli@opensource.is)
- Updates buildarch to noarch (tommi@tommi.org)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.4-1
- new package built with tito

View File

@ -2,7 +2,7 @@
Summary: A Nagios plugin to check CPU on Linux servers
Name: nagios-plugins-check_cpu
Version: 0.3
Version: 1.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -42,6 +42,10 @@ rm -rf %{buildroot}
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.0-1
- Version number bumped
- Updates buildarch to noarch (tommi@tommi.org)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.3-1
- new package built with tito

View File

@ -2,7 +2,7 @@
Summary: A Nagios plugin to check HP EVA Disk Systems
Name: nagios-okplugin-check_eva
Version: 1.0.1
Version: 1.0.2
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -40,6 +40,10 @@ rm -rf %{buildroot}
/etc/nrpe.d/check_eva.cfg
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.0.2-1
- changed sssu subcommands from being singlequoted to doublequoted for windows
compatibility (palli@opensource.is)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 1.0.1-1
- new package built with tito

View File

@ -26,7 +26,7 @@ debugging = False
# No real need to change anything below here
version="1.0"
version="1.1"
ok=0
warning=1
critical=2

View File

@ -2,8 +2,8 @@
Summary: A Nagios plugin to check HP Array with hpacucli
Name: nagios-okplugin-check_hpacucli
Version: 0.0.3
Release: 1%{?dist}
Version: 1.2
Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://opensource.is/trac/wiki/check_hpacucli
@ -38,6 +38,12 @@ rm -rf %{buildroot}
/etc/nrpe.d/check_hpacucli.cfg
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.2-2
- version number of scripts bumped (palli@opensource.is)
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.2-1
- check_command is now sudo'ed (palli@opensource.is)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
- new package built with tito

View File

@ -22,7 +22,7 @@
# No real need to change anything below here
version="1.1.0"
version="1.1.2"
ok=0
warning=1
critical=2

View File

@ -3,7 +3,7 @@
Summary: A Nagios plugin to check IBM Bladecenters
Name: nagios-okplugin-check_ibm_bladecenter
Version: 1.1.2
Release: 1%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://opensource.ok.is/trac/wiki/Nagios-OKPlugin-check_ibm_bladecenter
@ -40,6 +40,12 @@ rm -rf %{buildroot}
#%config(noreplace) %{_sysconfdir}/nrpe.d/check_bond.cfg
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.1.2-3
- version number of scripts bumped (palli@opensource.is)
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.1.2-2
- rpm spec file added. version number bumped (palli@opensource.is)
* Tue Jul 17 2012 Pall Sigurdsson 1.0.0-1
- Initial packaging

View File

@ -2,7 +2,7 @@
Summary: A set of Nagios plugins to check the health of a nagios host
Name: nagios-okplugin-check_nagios
Version: 0.0.8
Version: 1.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@ -40,6 +40,12 @@ rm -rf %{buildroot}
/etc/nrpe.d/check_nagios.cfg
%changelog
* Thu Aug 23 2012 Pall Sigurdsson <palli@opensource.is> 1.1-1
- Version number bumped
- bugfix, check_nagios_needs_reload check for reload instead of reparse
(palli@opensource.is)
- fixed missing tempfile cleanup (root@manage.tr.is)
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.8-1
- LICENSE file added (palli@opensource.is)

View File

@ -40,6 +40,8 @@ Usage: """ + sys.argv[0] + """ ([-s serviceName] | [-c])
Gathers the overall cluster status for the local node
-s, --service
Gets the stats of the named service
-Z, --suspended
Checks whether there are any suspended services
-h, --help
Display this
"""
@ -99,23 +101,27 @@ def getServiceState(dom, service):
if group.attributes['name'].value in (service,"service:"+service,"vm:"+service):
serviceState['owner'] = group.attributes['owner'].value
serviceState['state'] = group.attributes['state_str'].value
serviceState['flags'] = group.attributes['flags_str'].value
return serviceState
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], 's:ch', ['service=', 'cluster', 'help'])
opts, args = getopt.getopt(sys.argv[1:], 's:cZh', ['service=', 'cluster', 'supsended', 'help'])
except getopt.GetoptError:
usage()
sys.exit(2)
check_suspend = False
for o, a in opts:
if o in ('-c', '--cluster'):
typeCheck = 'cluster'
if o in ('-s', '--service'):
typeCheck = 'service'
serviceName = a
if o in ('-Z', '--suspended'):
check_suspend = True
if o in ('-h', '--help'):
usage()
sys.exit()
@ -124,8 +130,8 @@ def main():
clustatOutput = os.popen('/usr/sbin/clustat -fx')
dom = xml.dom.minidom.parse(clustatOutput)
except Exception, e:
print "Error: could not parse output of : '/usr/sbin/clustat -fx': ", e
sys.exit(3)
print "Error: could not parse output of : '/usr/sbin/clustat -fx': ", e
sys.exit(3)
if typeCheck == 'cluster':
# First we query for the state of the cluster itself.
@ -156,6 +162,9 @@ def main():
if serviceState['state'] != 'started':
print "CRITICAL: Service " + serviceName + " on " + serviceState['owner'] + " is in " + serviceState['state'] + " state"
sys.exit(2)
elif check_suspend is True and serviceState['flags'] == 'frozen':
print "WARNING: Service " + serviceName + " on " + serviceState['owner'] + " is in " + serviceState['flags'] + " state"
sys.exit(1)
else:
print "OK: Service " + serviceName + " on " + serviceState['owner'] + " is in " + serviceState['state'] + " state"
sys.exit(0)

View File

@ -1,5 +1,6 @@
command[check_rhcs]=sudo /usr/lib64/nagios/plugins/check_rhcs -c
command[check_rhcs_service]=sudo /usr/lib64/nagios/plugins/check_rhcs -s '$ARG1$'
command[check_rhcs_service_frozen]=sudo /usr/lib64/nagios/plugins/check_rhcs -s '$ARG1$' -Z
command[get_rhcs_fencing]=test ! -p /tmp/fence_manual.fifo
command[check_rhcs_fencing]=/usr/lib64/nagios/plugins/check_rhcs_manualfencing.sh

View File

@ -1,49 +0,0 @@
%define debug_package %{nil}
Summary: Nagios plugin to test for Yum updates on RedHat/CentOS Linux.
Name: nagios-okplugin-check_yum
Version: 0.8.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://opensource.is/trac/wiki/check_yum
Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_yum/releases/nagios-okplugin-check_yum-%{version}.tar.gz
Requires: yum-security
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Packager: Pall Sigurdsson <palli@opensource.is>
BuildArch: noarch
%description
Nagios plugin to test for Yum updates on RedHat/CentOS Linux.
%prep
%setup -q
perl -pi -e "s|/usr/lib/|%{_libdir}/|g" nrpe.d/check_yum.cfg
perl -pi -e "s|/usr/lib64/|%{_libdir}/|g" nrpe.d/check_yum.cfg
%build
%install
rm -rf %{buildroot}
install -D -p -m 0755 check_yum %{buildroot}%{_libdir}/nagios/plugins/check_yum
install -D -p -m 0755 nrpe.d/check_yum.cfg %{buildroot}/etc/nrpe.d/check_yum.cfg
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_libdir}/nagios/plugins/*
/etc/nrpe.d/check_yum.cfg
%changelog
* Thu Dec 13 2012 Tomas Edwardsson <tommi@opensource.is> 0.8.0-1
- New upstream release
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.7.3-1
- new package built with tito
* Mon Sep 14 2010 Pall Sigurdsson <palli@opensource.is> 0.1-1
- Initial packaging