2009/11/30 Duo Maxwell <[email protected]>:
> I am having trouble getting a subagent to work.
> I hope this is not one of thoes cases where the answer is
> obvious and I have complete overlooked it.
Probably not - getting new MIB modules to work
can often be tricky.
The best starting point is probably the FAQ entry
Why doesn't my new MIB module report anything?
This gives some guidance as to how to pinpoint
where the problem actually lies.
Other suggestions:
- try compiling your module directly into the agent
(rather than via a subagent). That way you can
ensure that the code is working. You can always
re-compile the same module to run as a subagent
later, for active deployment with a standard agent.
> 4)Testing
> When using an SNMP manager connected to "localhost"
> -Asking for the variable "1.3.6.1.2.1.1.1.0" does return the
> "sysDescription". The SYSTEM tree does work.
> -Asking for the variable "1.3.6.1.4.1.82.2" which belongs to the subagent,
> returns null.
What about information *outside* the system group
(but still provided by themain agent)?
> snmpget -v1 -c public localhost PS-TEST6-MIB::psTest6MIB
> returns
> "Eror In packet"
> "Reason: (noSouchName) There is no such variable in this MIB"
> "Failed object: PS-TEST6-MIB::psTest6MIB"
That will always fail - you forgot the .0 instance subidentifier.
> snmpwalk -v1 -c public localhost PS-TEST6-MIB:psTest6MIB
> returns
> "End Of MIB"
I'd expect to see Net-SNMP values here.
That looks like the access control settings might be wrong.
(hence asking about non-system information above)
> Using
> "snmpd -DpsTest6MIB" to start the agent
> returns some errors
Is this the main agent, or your subagent?
> 5)Confirgation
> I added
> rocommunity public 192.168.1.0/16
> to the configuration.
Is there any other access control in the config file?
after that didn't worked I also added the following
> lines
> com2sec readonly default public
> com2sec readwrite default private
> That still didnt work
No - it wouldn't. The com2sec/view/group/access
directives work in combination - you'd need all four.
Just one bit isn't sufficient.
But I'd forget about that style - the rocommunity
approach is much simpler.
Try with *just*
rocommunity public
master agentx
in your config file.
> psTest6MIB MODULE-IDENTITY
> LAST-UPDATED "9912090000Z"
> ORGANIZATION "Organization name goes here"
> CONTACT-INFO "Contact info goes here"
> DESCRIPTION "Attempt number 6 to get sub agents working"
> ::= { enterprises 82 }
Are you working for Network Computing Devices ?
if not, then you shouldn't really be using their enterprise number.
There's an OID (NET-SNMP-MIB::netSnmpPlaypen) that we
provide specifically for testing purposes. If you don't have an
OID of your own, then I suggest you use this as the root of your MIB.
Dave
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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