RE: SNMP: GET/SET vs. TRAP

2008-04-21 Thread ronys
Hi,

Conceptually, there's a big difference between get/set and traps:

get/set messages in SNMP are always requested by the management application and 
responded to by the SNMP agent.

Traps, OTOH, are messages that are sent, unsolicited, from the agent to notify 
the management app of something of interest that has happened without having to 
wait for polling.

HTH,

Rony

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oren Held
Sent: Monday, April 21, 2008 3:27 PM
To: linux-il
Subject: SNMP: GET/SET vs. TRAP

Hi,

net-snmp's GET/SET mechanism looks completely separated from the TRAP 
mechanism, which I find quite bizarre.

NET-SNMP claims to be easily extensible with Perl 
(http://net-snmp.sourceforge.net/wiki/index.php/Tut:Extending_snmpd_using_perl)
However, this extension doesn't know what a TRAP is, only handles GET/SET 
commands.

It seems as if I have two options:
A. Write a completely separate Perl daemon that sends traps using Net::SNMP 
(completely separate code for sending TRAPs and handling GETs/SETs??)
B. Write a subagent in C (a separate process that talks to snmpd), which 
handles both GETs/SETs  TRAPs. (Is that the common approach?)

Am I missing something?

Thanks

 - Oren

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]


To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: SNMP: GET/SET vs. TRAP

2008-04-21 Thread Amos Shapira
On Mon, Apr 21, 2008 at 10:27 PM, Oren Held [EMAIL PROTECTED] wrote:
 Hi,

  net-snmp's GET/SET mechanism looks completely separated from the TRAP
  mechanism, which I find quite bizarre.

  NET-SNMP claims to be easily extensible with Perl
  
 (http://net-snmp.sourceforge.net/wiki/index.php/Tut:Extending_snmpd_using_perl)
  However, this extension doesn't know what a TRAP is, only handles GET/SET
  commands.

  It seems as if I have two options:
  A. Write a completely separate Perl daemon that sends traps using Net::SNMP
  (completely separate code for sending TRAPs and handling GETs/SETs??)

Why a daemon? It's not like it has to sit there listening on some port
- traps can be sent by any application at any time. fire and forget.

  B. Write a subagent in C (a separate process that talks to snmpd), which
  handles both GETs/SETs  TRAPs. (Is that the common approach?)

Not as far as I understand SNMP traps.


  Am I missing something?

I think you do - just try to sit back and get your head around this -
set/get are done with an SNMP agent (daemon) listening for queries
and answering them. Traps can be sent by any application on the
monitored host and nobody stays behind to see what happened to them.

Hope this helps,

--Amos

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]