I have done the modified my script to
LOGFILE= 'ls -ltr FSC-VsXml* | tail -1
more $LOGFILE | nawk -F '{print $2}' | tail -1 >> Attempts.stats
then i want to do
snmptrap –c public –v 2c 192.168.100.185 6 <trap OID> <variable OID> i
$(more Attempts.stat)
to send the numeric value via snmp. Since this is a custom snmptrap how do
i generate the OID? What are the <trap OID> <variable OID> values that I can
use. I tried using some values for the custom Sun MIBs
ie enterprises.42.2.15.12.1.1.1.1 but i get illegal variable .
2011/10/19 Eirik Nordbrøden <[email protected]>
> Hello****
>
> ** **
>
> Or use snmptrap/inform to send an enterprise specific trap with an
> enterprise specific OID. Something along these lines:****
>
> ** **
>
> snmptrap –c public –v 2c <manager address> 0 <trap OID> <variable OID> i
> $(tail -1 FSC-xxxxxxxxx.stat | nawk -F, '{print $2}')****
>
> ** **
>
> Use snmpinform (or –Ci) if you like a confirmed service.****
>
> ** **
>
> You should read the man pages for snmptrap/inform and check the examples
> that are available within the Net-SNMP community.****
>
> ** **
>
> PS Not sure that all of this is supported in the 5.0.9 line though.****
>
> ** **
>
> Eirik Nordbrøden****
>
> (+47) 90174789****
>
> ** **
>
> *From:* Tawanda Rushwaya [mailto:[email protected]]
> *Sent:* 19. oktober 2011 11:42
> *To:* [email protected]
> *Subject:* Send statistical data via SNMP****
>
> ** **
>
> I am a newbie in terms of snmp . I am working on a SunOS 5.10
> Generic_142900-03 sun4v sparc SUNW,Netra-T2000. With this command: (Unix
> based cronjob)****
>
> Code:****
>
> ** **
>
> tail -1 FSC-xxxxxxxxx.stat | nawk -F, '{print $2}'****
>
>
> I want to send the numeric output of this command from a statistical file
> which is updating constantly via SNMPv2 every 1 minute to a remote
> monitoring node. What is the best way to achieve this?
> ****
>
> ** **
>
> The server has NET-SNMP version 5.0.9 and I am wondering if there is a way
> to modify the existing MIB objects (some which capture information which is
> not particulary useful to me) and channel the output of the command to the
> file which is polled by the SNMP manager node. From which files does the
> SNMP manager node get its data say load averages, CPU usage, disk space??
> ****
>
> ** **
>
> Thanks in advance ****
>
> ** **
>
> Kind regards ****
>
> --
> *Rushwaya Tawanda
> 10 Edwards*****
>
> *Braeside*****
>
> *Harare*****
>
> *Zimbabwe*****
>
> ** **
>
> *skype: rushwaya.tawanda*****
>
> *Mobile +263 772 222 517*****
>
> ** **
>
--
*Rushwaya Tawanda
10 Edwards*
*Braeside*
*Harare*
*Zimbabwe*
*
*
*skype: rushwaya.tawanda*
*Mobile +263 772 222 517*
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders