mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-13 02:20:57 +01:00
Compare commits
5 Commits
nagios-okp
...
nagios-okp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebd64badf2 | ||
|
|
e875698a95 | ||
|
|
9e9c8293cd | ||
|
|
fb05e9ad4b | ||
|
|
d776077d65 |
@@ -15,7 +15,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ldap
|
||||
from pynag.Plugins import PluginHelper,critical
|
||||
from pynag.Plugins import PluginHelper,critical, warning
|
||||
|
||||
plugin = PluginHelper()
|
||||
|
||||
@@ -45,8 +45,12 @@ except Exception, e:
|
||||
|
||||
# Loop through replication agreements
|
||||
for rhost in replication:
|
||||
plugin.add_summary("Replica", rhost[1]['nsDS5ReplicaHost'][0], "Status:", rhost[1]['nsds5replicaLastUpdateStatus'][0])
|
||||
plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0]))
|
||||
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ":
|
||||
plugin.status(critical)
|
||||
|
||||
if not len(replication):
|
||||
plugin.add_summary("Warning: No replicas found")
|
||||
plugin.status(warning)
|
||||
|
||||
plugin.exit()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Summary: A Nagios plugin to check IPA server status
|
||||
Name: nagios-okplugin-%{plugin}
|
||||
Version: 0.0.2
|
||||
Version: 0.0.3
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
@@ -41,6 +41,11 @@ rm -rf %{buildroot}
|
||||
%config(noreplace) %{_sysconfdir}/nrpe.d/check_ipa.cfg
|
||||
|
||||
%changelog
|
||||
* Thu Apr 25 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.3-1
|
||||
- Preliminary testing done, released
|
||||
- Various errors in syntax fixed (tommi@tommi.org)
|
||||
- Detection for no configured replicas (tommi@tommi.org)
|
||||
|
||||
* Thu Apr 25 2013 Tomas Edwardsson <tommi@tommi.org> 0.0.2-1
|
||||
- Tagged new release
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ fi
|
||||
|
||||
echo "$MESSAGE | $PERFDATA"
|
||||
grep -E "^Error|^Warning" "$TMPFILE"
|
||||
rm -f TMPFILE
|
||||
rm -f $TMPFILE
|
||||
exit $EXIT_CODE
|
||||
|
||||
Reference in New Issue
Block a user