Hi Dave
I am able to do the subagent configuration and able to retrieve the value .I
am providing the steps for this that i followed taking reference from the
FAQ abd your mails ,hope these are correct .
For Configuring the Master Agent & Subagent on two Linux Machine:
MASTER AGENT:
On the master agent system, turn on AgentX support
and listen on the TCP port (rather than the default Unix socket)
This could be done on the command line:
snmpd -x 705
or via the snmpd.conf file(I did this)
master agentx
agentxsocket 705
NOTE: Use ./configure command for configuration
The AgentX support is included by default.
You don't need to give any special flags to configure.
Start the master agent as :
snmpd -f -Le -Dagentx
For testing whether your master is running on the specific port
you mentioned ,check the results of following commands
Run "netstat -an", can you see a listening
connection on port 705 or not?
If you run "lsof" on the running agent, can you see
mention of TCP port 705?
SUBAGENT
There are two methods for subagent configuration:
NOTE: You have to configure the subagent with the mib modules for which
you want the values like
./configure --with-mib-modules=dot1dBridge
On the subagent system, turn on AgentX subagent support, and connect
to the master agent TCP port
Running as a subagent is done using the "-X" command line flag.
Specifying the socket address can use either of the forms above ("-x" or
agentxsocket), giving the value "tcp:{master}:705" - with the
appropriate
address for {master}
Like for example ./snmpd -X -x tcp:10.9.10.195:705
If you fire a query without starting the subagent, an error message will be
displayed
Like for example:
snmpget -c public 10.9.10.195 .1.3.6.1.4.1.272.4.8.1.2.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI:: dot1dBaseNumPorts.0
Else after starting the subagent if you fire the same query it will display
the relevant results
snmpget -c public 10.9.10.195 .1.3.6.1.4.1.272.4.8.1.2.0
SNMPv2-SMI:: dot1dBaseNumPorts.0= INTEGER: 2
Or(I followed this method )
(on 10.9.10.153)
First, the files you'll need:
1.MakeFile
2.Any MIB file say BRIDGE-MIB.txt
3.MibNode.c and MibNode.h file (say dot1dBaseNumPorts.c
and dot1dBaseNumPorts.h)
4. example-demon.c file /* The main() code for our
demon*/
A subagent running embedded within some other application will typically
not understand the same command-line options. This will need to set the
same configuration programmatically.For example, the example subagent
driving code from the Net-SNMP "subagent program" tutorial (on the project
web pages) could be made to connect to the same TCP port by adding the line
I added
netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_X_SOCKET,
"10.9.10.195:705");
before the 'init_agent' call.
In the subagent system you have to run example-demon file and it will start
a subagent ,then you can query through master agent .It will display the
expected result.
Need your valuable comment on this .And thanks a lot for your help through
out .
With regards
Vishakha
-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 14, 2006 5:46 PM
To: vishakha s
Cc: [email protected]
Subject: RE: Error while starting a subagent
On Tue, 2006-02-14 at 16:38 +0530, vishakha s wrote:
> But now it is giving the
> error while running the subagent as "unknown host"
> Do we need to have a master agent in the system in which
> subagent is there to start it .
If you're running a subagent, then there has to be a
master agent for it to connect to, yes. That's pretty
fundamental!
The two don't necessarily have to be running on the
same system - it depends on how you've configured
the two agents. See the FAQ entry
How can I run AgentX with a different socket address?
for more details
Dave
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s)and may
contain confidential or privileged information. If you are not the intended
recipient, please notify the sender or [EMAIL PROTECTED]
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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