1. #!/bin/bash
  2. # Tool for converting Novell ZenWorks Server Management Mibs to Nagios Compatible Mib Files in
  3. # cooperation with snmptt
  4. # Version 0.0.1
  5. # written by Christian Mies
  6. # created January 2006
  7. # Just add MIB File to the Command and on the end their is a 'SNMPTT ready' MIB File for Nagios
  8. # This script is without absolut no warranty and free
  9.  
  10. mibfile=$1
  11. temp=$1.temp
  12. output=snmptt.$1
  13.  
  14. /usr/sbin/snmpttconvertmib --in=$mibfile --out=$temp > /var/log/convert.log
  15. tail -4 /var/log/convert.log
  16.  
  17. #sed -e "s/INFORMATIONAL/OK/g" $output > $output.temp
  18. sed -e "s/INFORMATIONAL/OK/g" -e "s/MINOR/WARNING/g" -e "s/MAJOR/CRITICAL/g" $temp > $temp.temp
  19.  
  20. mv $temp.temp $output
  21. rm $temp
  22.  
  23. echo "Conversion Done"
  24.