logo       

Re: sub-agent: msg#00279

network.net-snmp.user

Subject: Re: sub-agent


> 1. Can I run Master agent and sub-agent on two different machines?

Yes.
By default, the master agent listens on a domain socket,
so subagents can only connect if they're running on the same system.
But it's possible to listen on a TCP socket, and connect to the
master agent from other machines.

See the FAQ entry:
How can I run AgentX with a different socket address?

> If yes, how do i specify the master agent's IP address?

This is covered in the above FAQ entry.


Note that there are security implications in working this way.
Those are also covered in the FAQ.



> 2. I was trying to send a trap from sub-agent. In the .conf file for
> sub-agent I mentioned the manager's IP address and port number.

The sub-agent does not have to have *any* special configuration
for sending traps. It will send all traps directly to the master
agent, and let that handle things. It will not attempt to contact
the manager directly.


> the call to send_v2trap() is printing "snmpd:
> unknown pdu type"

This is due to a bug in the software, that I need to look at
as a matter of high priority.



> 3. On the subagent side, In create_trap_session() which IP address should i
> pass Master agent/Manager?

None.
You shouldn't need to explicitly create a trap session at all.
The sub-agent uses the AgentX connection to handle traps.
The fact that this doesn't currently work is a bug.

> if you could tell me which API should i use to
> send trap from a sub-agent to a master-agent running on the same machine?

The standard 'snmp_easy_trap', 'snmp_trap_vars' and 'send_v2trap' APIs.
It doesn't matter whether the subagent and master agent are running
on the same machine or on different systems - the API looks the same.
The fact that this doesn't currently work is a bug.


Dave



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@xxxxxxxxxxxxxxxxxxxxx
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise