simple chech using snmp
Andreas Ericsson
ae at op5.se
Fri Sep 29 18:11:18 CEST 2006
Tom Brown wrote:
>> thanks for this - This is exactly what i am after however i have an issue...
>>
>> when i run it after making a couple of mode for community string and
>> snmp version etc i get this
>>
>> # ./retrieve_custom_snmp -H 192.168.12.176 -o 1.3.6.1.4.1.2021.56
>>
>> and thats it - no output. if i enable debug i get this
>>
>> # cat /tmp/foobar
>> Retrieve exit code is
>> Retrieve status message is:
>>
>> ie nothing - can you offer any assistance here?
>>
>
> OK better...
>
> # ./retrieve_custom_snmp -H 192.168.12.176 -o .1.3.6.1.4.1.2021.55
> UCD-SNMP-MIB::ucdavis.55.101.1 = STRING: "CRITICAL emcpowera, 2 dead, 2
> alive, possible LUN tresspass or HBA failure"
>
> but it there a way to remove the "UCD-SNMP-MIB::ucdavis.55.101.1 =
> STRING: " so i just see the text of the string?
>
sed be thy friend. I didn't catch the beginning of the discussion, but
if you append
| sed 's/.*STRING: //'
to whatever command you're running it should work pretty ok, although
with decently recent tools you should also be able to pass -Ovq to
snmpget and achieve pretty much the same result with less overhead.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list