monitors:hobbit-nis

Error loading plugin struct
ParseError: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
More info is available in the error log.

hobbit-nis

Author Gildas
Compatibility Xymon 4.2
Requirements unix, Linux
Download None
Last Update 2006-11-28

This hobbit server-side script, compatible Unix & Linux, allows nis server monitoring.

The script is based on Henrik's Server-side script examples. The NIS test itself comes from a revamped bigbrother installation and was changed by different persons from Genome Research Limited.

  1. Add script to server's ext folder
  2. Modify for your environment and add the following to the server hobbitlaunch.cfg
    [nis]
            ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
            NEEDS hobbitd
            CMD $BBHOME/ext/hobbit-nis.sh
            LOGFILE $BBSERVERLOGS/hobbit-nis.log
            INTERVAL 5m
  3. Now you can add the “nis” service for hosts in your bb-hosts file.

Show Code ⇲

Hide Code ⇱

#!/bin/sh
# hobbit-nis.sh
# Nis server test, Courtesy of Genome Research Limited
# v1.0 - 06/10/2006
 
BBHTAG=nis      # What we put in bb-hosts to trigger this test
COLUMN=$BBHTAG  # Name of the column, often same as tag in bb-hosts
 
# set your nis domain name here:
DOMAINNAME=your.nis.domain
# Check that the path for yppoll is valid:
YPPOLL=/usr/sbin/yppoll
YPMAP=passwd.byname
 
$BBHOME/bin/bbhostgrep $BBHTAG | while read L
do
        set $L  # To get one line of output from bbhostgrep
        HOSTIP="$1"
        MACHINEDOTS="$2"
        MACHINE=`echo $2 | $SED -e's/\./,/g'`
        COLOR=green
 
        OUTPUT=`$YPPOLL -h $HOSTIP -d $DOMAINNAME $YPMAP 2>&1`
        RC=$?
 
        case $RC in
                0)
                        COLOR="green"
                        ;;
                *)
                        COLOR="red"
                        ;;
        esac
 
        $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`
 
${OUTPUT}
        "
done
 
exit 0
  • No known bugs
  • Genome Research Limited
  • 2006-06-10
    • Initial release
  • monitors/hobbit-nis.txt
  • Last modified: 2009/11/23 05:49
  • by 127.0.0.1