-- MathiasMuench - 20 Oct 2008

LSF Batch Host status für Nagios
/usr/lib/nagios/plugins/check_snmp -P 1 -C public -p 163 -m LSF-SNMP-MIB -H lxlsf1 -w 5:4 -c 3:2 -o

LSF Batch Host Names
snmpwalk -v 1 -c public -m LSF-SNMP-MIB -Ov -OQ lxlsf1:163 lsbHostName

E-Mail Prefixes and Passwords from Wiki (for Nagios), /tmp/xx contains list of wiki names
lxwww01:~# for i in $(cat /tmp/xx); do grep Email.*gsi.de $i.txt | sed -e 's/^.*: //' -e 's/@.*$//' | tr [:upper:] [:lower:]; grep $i /var/www/wiki.gsi.de/data/.htpasswd; done

Massen-Kommando für Nagios
while read; do echo "[$(date +%s)] ACKNOWLEDGE_HOST_PROBLEM;$REPLY;1;1;1;Mathias Muench;Stromabschaltung"; done >/var/lib/nagios2/rw/nagios.cmd

LSF Batch infos in Config verwandeln
ssh lxi008 ". /LSF/lsf/conf/profile.lsf; /LSF/lsf/bin/bhosts -R sarge32" | sed 1d | tr -s \  | cut -d\  -f1 | while read; do echo "{../LSF_Batch_Hosts/$REPLY/Jobs},+,"; done

/usr/lib/nagios/plugins/check_generic -n "LSF Batch Host Status" -e "snmpget -v 1 -c public -m LSF-SNMP-MIB -Oq -Ov lxlsf1:163" -o "=~/ok|closed/" -w "=~/unavail|unreach/"
Edit | Attach | Print version |  PDF | History: r7 | r5 < r4 < r3 < r2 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r4 - 2008-10-27, MathiasMuench
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)