mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-13 02:20:57 +01:00
Compare commits
26 Commits
nagios-okp
...
nagios-okp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf9ecb7777 | ||
|
|
756c0ef1de | ||
|
|
9346c1a60d | ||
|
|
77b527f44d | ||
|
|
5a4d14734e | ||
|
|
27f4da23bf | ||
|
|
468f7ef32a | ||
|
|
682ad04b9e | ||
|
|
6f5041d8cd | ||
|
|
2c23f04ffa | ||
|
|
ceda55b389 | ||
|
|
af98917b05 | ||
|
|
ddaad8f39d | ||
|
|
d6f9b6093f | ||
|
|
381aef1156 | ||
|
|
ed9d2eb2b9 | ||
|
|
9248569b6d | ||
|
|
26e5c218b9 | ||
|
|
aa41f16b6e | ||
|
|
6230193b05 | ||
|
|
bbc5893cfe | ||
|
|
599134bc5e | ||
|
|
f60a518bd3 | ||
|
|
f4615ffed5 | ||
|
|
5cdbba7b66 | ||
|
|
15b9e64a88 |
@@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_apcext.pl/rel
|
||||
Requires: nagios-plugins
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
|
||||
@@ -12,6 +12,7 @@ Requires: nagios-plugins
|
||||
Requires: nagios-plugins-perl
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
|
||||
@@ -12,6 +12,7 @@ Requires: perl-Nagios-Plugin
|
||||
Requires: samba-client, krb5-workstation
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
|
||||
@@ -11,6 +11,7 @@ Source0: http://opensource.ok.is/trac/browser/nagios-plugins/check_cpu/releases/
|
||||
Requires: nrpe
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Packager: Tomas Edwardsson <tommi@ok.is>
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
This shell script checks cpu utilization (user,system,iowait,idle in %)
|
||||
|
||||
@@ -207,16 +207,17 @@ if($opt_H ne "localhost" and $opt_H ne "127.0.0.1") {
|
||||
|
||||
# Envoi commande et renseignement Hashage %disks
|
||||
my @output = `$cmd`;
|
||||
|
||||
my $ret = $?;
|
||||
$ret >>= 8;
|
||||
|
||||
if ($ret == -1) {
|
||||
print "Could not find " . (split(' ', $cmd))[0] . "\n";
|
||||
exit $EXIT_CODES{'UNKNOWN'};
|
||||
}
|
||||
|
||||
$ret >>= 8;
|
||||
# 2010/02/25 palli@ok.is : Check if $cmd ran successfully
|
||||
if ($ret > 0) {
|
||||
if ($ret > 1) {
|
||||
print "Failed to execute $cmd: " . join("\n", @output) . "\n";
|
||||
exit $EXIT_CODES{'UNKNOWN'} ;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Summary: A Nagios plugin to check disks via NRPE
|
||||
Name: nagios-okplugin-check_disks
|
||||
Version: 1.0.1
|
||||
Version: 1.0.3
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
@@ -40,6 +40,13 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/nagios/plugins/check_disks.pl
|
||||
|
||||
%changelog
|
||||
* Wed May 16 2012 Tomas Edwardsson <tommi@tommi.org> 1.0.3-1
|
||||
- Updated version of nagios-okplugin-check_disks (tommi@tommi.org)
|
||||
- Issue #56, temporary fix for selinux and disk checks (tommi@tommi.org)
|
||||
|
||||
* Mon May 16 2012 Tomas Edwardsson <tommi@opensource.is> 1.0.2-1
|
||||
- Ignore warning states from nrpe
|
||||
|
||||
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 1.0.1-1
|
||||
- new package built with tito
|
||||
|
||||
|
||||
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
|
||||
@@ -1,2 +1,2 @@
|
||||
command[check_hpacucli]=/usr/lib/nagios/plugins/check_hpacucli.py
|
||||
command[check_hpacucli]=sudo /usr/lib/nagios/plugins/check_hpacucli.py
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ def check_blowers():
|
||||
# Check blower 2
|
||||
if blower2state == "1":
|
||||
nagios_status(ok)
|
||||
add_summary("Blower1 OK. " )
|
||||
add_summary("Blower2 OK. " )
|
||||
else:
|
||||
add_summary("Blower2 NOT OK. ")
|
||||
nagios_status(warning)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Summary: Nagios plugins to check the status of MS-SQL Servers
|
||||
Name: nagios-okplugin-mssql
|
||||
Version: 0.0.5
|
||||
Version: 0.0.7
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
@@ -39,6 +39,12 @@ rm -rf %{buildroot}
|
||||
%{_libdir}/nagios/plugins/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 19 2012 Pall Sigurdsson <palli@opensource.is> 0.0.7-1
|
||||
-
|
||||
|
||||
* Mon Mar 19 2012 Pall Sigurdsson <palli@opensource.is>
|
||||
-
|
||||
|
||||
* Mon Mar 12 2012 Pall Sigurdsson <palli@opensource.is> 0.0.5-1
|
||||
-
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ MESSAGE="Nagios configuration is valid"
|
||||
EXIT_CODE=3
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
trap "rm -f $TMPFILE" EXIT
|
||||
nagios -v /etc/nagios/nagios.cfg > $TMPFILE
|
||||
RESULT=$?
|
||||
|
||||
|
||||
@@ -120,9 +120,12 @@ def main():
|
||||
usage()
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
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)
|
||||
if typeCheck == 'cluster':
|
||||
|
||||
# First we query for the state of the cluster itself.
|
||||
|
||||
22
check_rhcs/check_rhcs_fence
Normal file
22
check_rhcs/check_rhcs_fence
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
|
||||
OK=0
|
||||
WARNING=1
|
||||
CRITICAL=2
|
||||
UNKNOWN=3
|
||||
|
||||
STATUS=$UNKNOWN
|
||||
|
||||
OUTPUT=`fence_tool ls | grep "wait state" | awk '{ print $3}' `
|
||||
|
||||
if [ "$OUTPUT" = "none" ]; then
|
||||
STATUS=$OK
|
||||
fi
|
||||
|
||||
|
||||
echo "Fence wait state (fence_tool ls) is: $OUTPUT"
|
||||
exit $STATUS
|
||||
|
||||
|
||||
69
check_rhcs/nagios-okplugin-check_rhcs.spec
Normal file
69
check_rhcs/nagios-okplugin-check_rhcs.spec
Normal file
@@ -0,0 +1,69 @@
|
||||
%define debug_package %{nil}
|
||||
|
||||
%define plugin_name check_rhcs
|
||||
%define version 0.0.4
|
||||
|
||||
|
||||
Summary: A Nagios plugin to check Red Hat Cluster suite (rhel5 and rhel6)
|
||||
Name: nagios-okplugin-%{plugin_name}
|
||||
Version: %{version}
|
||||
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_rhcs %{buildroot}%{_libdir}/nagios/plugins/check_rhcs
|
||||
install -D -p -m 0755 check_rhcs_cman_group.sh %{buildroot}%{_libdir}/nagios/plugins/check_rhcs_cman_group.sh
|
||||
install -D -p -m 0755 check_rhcs_manualfencing.sh %{buildroot}%{_libdir}/nagios/plugins/check_rhcs_manualfencing.sh
|
||||
install -D -p -m 0755 check_rhcs_fence %{buildroot}%{_libdir}/nagios/plugins/check_rhcs_fence
|
||||
|
||||
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
|
||||
* Thu May 24 2012 Pall Sigurdsson <palli@opensource.is> 0.0.4-1
|
||||
- version bump of check_rhcs (palli@opensource.is)
|
||||
- check_rhcs_fence added for rhel6 compatibility (palli@opensource.is)
|
||||
- copy/paste error removed from spec file (palli@opensource.is)
|
||||
|
||||
* Thu May 24 2012 Pall Sigurdsson <palli@opensource.is>
|
||||
- make sure plugin exits cleanly if unable to run clustat -fx command
|
||||
(palli@opensource.is)
|
||||
- check_rhcs_fence added for rhel6 compatibility (palli@opensource.is)
|
||||
- copy/paste error removed from spec file (palli@opensource.is)
|
||||
|
||||
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is>
|
||||
-
|
||||
|
||||
* Wed Mar 14 2012 Pall Sigurdsson <palli@opensource.is> 0.0.3-1
|
||||
- new package built with tito
|
||||
|
||||
* 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
|
||||
@@ -14,3 +14,7 @@ command[check_rhcs_cman_group]=/usr/lib64/nagios/plugins/check_rhcs_cman_group.s
|
||||
command[check_rhcs_cman_group_default]=/usr/lib64/nagios/plugins/check_rhcs_cman_group.sh --level 0 --group default
|
||||
command[check_rhcs_cman_group_rgmanager]=/usr/lib64/nagios/plugins/check_rhcs_cman_group.sh --level 1 --group rgmanager
|
||||
|
||||
|
||||
# RHEL 6 specific
|
||||
command[check_rhcs6_fencing]=/usr/lib64/nagios/plugins/check_rhcs_fence
|
||||
|
||||
|
||||
Reference in New Issue
Block a user