On 23 November 2011 10:05, Vivek Nagaraj <[email protected]> wrote:
> Currently my application uses hardcoded community - 'public'. I need
> to parse the snmpd.conf file for this.

No - you don't.

Each config file is intended for a particular application.
The "snmpd.conf" file is specifically intended for the "snmpd" application.
The "snmptrapd.conf" file is specifically intended for the "snmptrapd"
application.

Your application (let's call it "vivek")  would read the config file
"vivek.conf"
It wouldn't read the snmpd.conf file, and shouldn't make use of these settings
(unless it is actually an SNMP agent itself)

One possibility would be to use the *library* config file ("snmp.conf" - note,
there's no 'd' in that filename).   This has an option "defCommunity"
to set the default community string.

But you shouldn't be looking at the agent's config file for
client-side applications.

Dave

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to