monitors:hobbit-nis

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


monitors:hobbit-nis [2009/11/23 05:49] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== hobbit-nis ======
 +
 +^ Author | [[ gn1@sanger.ac.uk | Gildas ]] |
 +^ Compatibility | Xymon 4.2 |
 +^ Requirements | unix, Linux |
 +^ Download | None |
 +^ Last Update | 2006-11-28 |
 +
 +===== Description =====
 +
 +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.
 +
 +===== Installation =====
 +
 +  - Add script to server's ext folder
 +  - Modify for your environment and add the following to the server hobbitlaunch.cfg <code>
 +[nis]
 +        ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
 +        NEEDS hobbitd
 +        CMD $BBHOME/ext/hobbit-nis.sh
 +        LOGFILE $BBSERVERLOGS/hobbit-nis.log
 +        INTERVAL 5m
 +</code>
 +  - Now you can add the "nis" service for hosts in your bb-hosts file.
 +
 +===== Source =====
 +==== hobbit-nis.sh ====
 +<hidden onHidden="Show Code ⇲" onVisible="Hide Code ⇱">
 +<code bash>
 +#!/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
 +</code>
 +</hidden>
 +
 +===== Known  Bugs and Issues =====
 +
 +  * No known bugs
 +
 +===== To Do =====
 +
 +===== Credits =====
 +  * Genome Research Limited
 +===== Changelog =====
 +
 +  * **2006-06-10**
 +    * Initial release
  
  • monitors/hobbit-nis.txt
  • Last modified: 2009/11/23 05:49
  • by 127.0.0.1