Re: scripting help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




You set the variable EXITCODE to the standard output of the SNMPWALK command. I have no idea what you want to do with the output but to check the exit status you want something like this:

$SNMPWALK -v 1 -c $COMMUNITY $HOST $STATUS
EXITCODE=$?

Also, do not use backquotes when you can use $( cmd ) instead.

output=$($SNMPWALK -v 1 -c $COMMUNITY $HOST $STATUS)

i am trying to get a plugin to work that uses snmp to execute checks on remote hosts over snmp and return that value to nagios. I was using this as an assistance

http://www.kilala.nl/Sysadmin/retrieve_custom_snmp.php

i am no developer thats for sure but i will try to muddle through.

any more help appreciated

thanks



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux