Newbie questions
Frank Fock
frank.fock____marconicomms.com
Tue Mar 7 19:00:14 CET 2000
James Nakamura wrote:
> 1. Sending traps from the agent: the gateway will notify the agent when it
> needs to
> send a trap. I see a set of trap objects, but how does one implement the
> sending of
> traps, and setting the trap receivers?
The atm_mib example sends a coldStart trap when it starts. A trap is
sent simply by calling the generate method of NotificationOriginator.
This is how it looks like:
Vbx* vbs = 0;
coldStartOid coldOid;
NotificationOriginator notification_originator;
notification_originator.generate(vbs, 0, coldOid, "", "");
The last paramter is the context/community to use. The 4th is deprecated
and should be set "".
The targets are defined using the SNMP-TARGET-MIB and SNMP-NOTIFICATION-MIB.
So, trap filtering and multiple destinations are supported.
> 2. Setting/getting Mib data: The agent and the gateway are two separate
> processes that
> currently communicate through a TCP socket. AGENT++ appears to assume
> that the data
> is residently available in the agent. My presumption is that one would
> use the multi
> threaded version (how do you set that up?) when you send a
> process_request. That
> way the agent can open a socket and wait for the data. Is that correct?
Yes, you should use the multi-threaded version for that purpose.
Just put
#define _THREADS
in the agent++/include/agent++.h file. By default, threads are activated.
> The only
> other option I can think of is make the agent part of the gateway itself.
> Are there
> any other ways? What is the recommended way?
see above
> 3. System variables/traps: is there an implementation of system traps (for
> load average,
> disk space, checking processes are still alive)?
>
No, sorry. But if you can wait a few weeks there will be AgentX support
available for UNIX and then you can use the UCD agent for that ;-)
> Anyway, I think AGENT++ looks really promising if I could get these things
> resolved.
> Any help is greatly appreciated.
>
Please let me know if you have further questions.
Best regards,
Frank
--
Frank Fock Marconi Communications Software Systems
<frank.fock at marconicomms.com> Blumenstrasse 22-24,
Phone: +49 7191 13-4851 71522 Backnang,
Fax: +49 7191 13-2502 Germany
More information about the AGENTPP
mailing list