19.02.2013 Views

SNMP Trap Handling für Nagios

SNMP Trap Handling für Nagios

SNMP Trap Handling für Nagios

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

21<br />

<strong>SNMP</strong> <strong>Trap</strong> <strong>Handling</strong> <strong>für</strong> <strong>Nagios</strong><br />

Beispiel Wrapper: apx_service_trap_wrapper (1)<br />

#!/bin/bash<br />

# Author: M.Fuerstenau, OPS, Poing<br />

# 18.11.2005<br />

#<br />

# Purpose:<br />

# Will ge startet from snmptt (Config-file /etc/snmptt/snmptt.conf.apx)<br />

# Instead of being started directly from the mentioned config file<br />

# the use of this wrapper was necessary due to the fact that the<br />

# service name for the <strong>Nagios</strong> service has to be generated and<br />

# that strings like "APXsev1" must be mapped to the appropriate<br />

# <strong>Nagios</strong> return code<br />

# Anzahl uebergebener Argumente pruefen<br />

if [ $# -ne 6 ]<br />

then<br />

echo $*<br />

echo "Wrong number of arguments - exiting"<br />

exit 1<br />

fi<br />

September 22, 2006

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!