Geert> 1. Overload the context in snmp.conf
Geert> ====================================
Geert> Example:
Geert> defCommunity public
Geert> [myhost1]
Geert> defCommunity whatever
Geert> [myhost2]
Geert> defCommunity whatelse
Robert> This is what my original idea was, and I like it better than
Robert> the other two. Not only does it match our exising conf file
Robert> special tokens, the idea of a header is fairly common in conf files.
I like the idea of having host-specific configuration, but I'm not
at all keen on this syntax. I very rarely remember that we support
this "[snmp]" trick, never use it, and have no idea how you'd switch
back to "common" settings.
I'd also question whether this is common in conf files anyway.
It's common in the Windows world, sure - but I can't recall coming
across it much in Unix-based applications.
(A quick bit of poking around reveals that KDE uses this style,
but Gnome uses XML-based syntax).
I'd like to propose a fourth alternative, which would offer the same
functionality with minimal impact to the code.
That's to use a separate config file (with the usual syntax) - using
the hostname as a suffix.
So you'd have
snmp.conf
---------
defCommunity public
snmp.conf.myhost1
-----------------
defCommunity whatever
snmp.conf.myhost2
-----------------
defCommunity whatelse
That's a technique we've been using for years, and would really only
require a minor tweak to the code for building the config search path.
It wouldn't need any changes to the config parsing code.
Of the other two suggestions - "Override" is just too dangerous/confusing.
Particularly since we've already got an agent config directive "override".
The magic directive is better, but could get messy if there were a large
number of directives that needed to be applied in this manner.
Of the three "in-line" approaches, the "[host]" is the least worst,
but I question whether it would be appropriate to adopt this for the
5.2 release. But using a separate config file should be safe enough.
That's my 2p anyway.
Dave
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders