Skip to content
Snippets Groups Projects
Commit f2d52219 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Added check_link_status and check_true.

parent a466af6a
No related branches found
No related tags found
No related merge requests found
DESTDIR = /usr/local/nagios/libexec/
SCRIPTS = check_cups check_glsa check_saned check_lpd check_hddtemp
SCRIPTS = check_cups check_glsa check_saned check_lpd check_hddtemp \
check_link_status check_true
all:;
install:
mkdir -p $(DESTDIR)
for s in $(SCRIPTS); do install $$s $(DESTDIR)/$$s || exit 1; done
#!/bin/sh
#
# This check script is maintained in a Subversion repository at
# http://lsvn.lysator.liu.se/svnroot/nagios-plugins. Contact
# <ceder@lysator.liu.se> for commit access.
LINK_TMP=`tempfile`
trap "rm $LINK_TMP" 0
sudo /sbin/mii-tool $1 > $LINK_TMP 2>&1
grep 'link ok' < $LINK_TMP >/dev/null 2>&1
RC=$?
if [ $RC -eq 0 ]
then
echo OK - link ok
exit 0
else
echo CRITICAL - `cat $LINK_TMP`
exit 2
fi
#!/bin/sh
#
# This check script is maintained in a Subversion repository at
# http://lsvn.lysator.liu.se/svnroot/nagios-plugins. Contact
# <ceder@lysator.liu.se> for commit access.
echo OK - untestable, assumed OK
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment