Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: difference between snmpd.conf and snmp.local.conf

1,114 views
Skip to first unread message

Dave Shield

unread,
May 26, 2010, 8:46:44 AM5/26/10
to
On 26 May 2010 13:06, Weiwei Zhang <zhang...@gmail.com> wrote:
> What is the difference between snmpd.conf and snmp.local.conf?

There are actually two different questions here:

1) what is the difference between {xxx}.conf and {xxx}.local.conf ?
The answer is "nothing".
The config parsing code looks for files with *both* of these names
(for any given application token), in a range of locations.
The idea here is to support both common configuration (identical
across a range of machines), and system-specific configuration.

For example, you could put the access control settings in 'snmpd.conf'
(so they are consistent across all systems), while having sysLocation
in 'snmpd.local.conf' (so it's different for each system)


2) what is the difference between snmp.conf and snmpd.conf ?

The first contains library-level config (typically used for
client-side tools,
snmpget, snmpwalk and the like).
The second is specific to the SNMP agent (snmpd).

See 'snmp.conf(5)' and 'snmpd.conf(5)' for details.

Dave

------------------------------------------------------------------------------

_______________________________________________
Net-snmp-coders mailing list
Net-snm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Dave Shield

unread,
May 26, 2010, 12:02:29 PM5/26/10
to
On 26 May 2010 16:55, Weiwei Zhang <zhang...@gmail.com> wrote:
> What happens in my test is that, when re-config is set, the agent snmpd read
> the snmpd.conf, not the snmp.local.conf.

No - the agent will read *both* snmpd.conf (& snmpd.local.conf)
for agent-specific configuration *and* snmp.conf (& snmp.local.conf)
for library configuration.

But these contain different sets of directives.

If the agent comes across agent-specific entries in snmp.conf (or
snmp.local.conf)
then it will ignore them - probably generating a warning.
If the agent comes across library-specifci entries in snmpd.conf (or
snmpd.local.conf)
then it will also ignore them - again, generating a warning.


> So I think it is the snmpd.conf that controls the agent's behavior.

snmpd.conf controls the behaviour of the agent.
snmp.conf controls the behaviour of the library (which may also affect
the agent)


> But I don't know what is the snmp.local.conf used for in net-snmp package.
> Could you give me some hints, Dave?

Please read the snmp.conf(5) man page.

Dave Shield

unread,
May 27, 2010, 3:24:49 AM5/27/10
to
On 27 May 2010 01:01, Weiwei Zhang <zhang...@gmail.com> wrote:
>> snmpd.conf controls the behaviour of the agent.
>> snmp.conf controls the behaviour of the library
>> (which may also affect the agent)
>
> I didn't find the snmp.conf, maybe it is not included in my project.

There isn't an example snmp.conf shipped as part of the Net-SNMP
distribution, no. And most vendor-supplied packages typically
won't include one either.

It's a text-based configuration file. You can create this for yourself
if you decide that you need it. See the man page for appropriate
content.


> You mentioned agent, do you mean process snmpd on linux system?

Yes.

0 new messages