Re: Question about traps

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/8/12 François Dumont <[email protected]>:
> I see what you mean, and that's the way I want to do, but I don't really
> understand how can I do.
>
> I do that :
>     snmpwalk -v 2c -c public DestHost TrapEvenLogType
>
> But then, how can I store the relevant index ?

Are you wanting to do this manually, or in a program?

"snmpwalk" is typically used by a real person,
so "stor[ing] the relevant index" involves looking
at the output, and thinking about what it means :-)

If you are doing this within a program, then you wouldn't
typically use snmpwalk - you'd use a sequence of individual
GETNEXT requests.   Something like:

    entry = GETNEXT trapEventLogType
    while not finished
    do
        extract index from entry
        if entry is Link{Up,Down}
        then
             GET trapEventLog*.$index
        endif

        entry = GETNEXT  trapEventLogType.$index
    done

The details will obviously depend on what programming
language you are intending to work with!   But that should
give you the basic idea.

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.