3

I'm having to add a number of extend directives to snmpd.conf, and each of the extends are actually apart of various monitoring groups. It makes a lot of sense to collect each group into a single file and then just add include somewhere in snmpd.conf but for the life of me I can't determine if there actually is an include directive (I think the answer is no) or how to use configuration file discovery (i.e., search and load configuration files in various directories).

Joe
  • 472
  • 4
  • 15
  • I don't see anything. I'd use [puppetlabs/concat](https://forge.puppetlabs.com/puppetlabs/concat) or something similar for something like this. – Michael Hampton May 30 '14 at 01:46
  • Unfortunately due to Puppet's feature of overwriting things when you least expect it, that isn't an option. I'm pretty amazed that a tool like this doesn't have such a basic feature. – Joe May 30 '14 at 11:54

1 Answers1

5

In RHEL there're two configuration options, according to "man snmp_config", added in BZ#917816 enhancement.

# include site specific config
includeFile site.conf

# include a all *.conf files in a directory
includeDir /etc/snmp/config.d
Dima Medvedev
  • 346
  • 1
  • 7
  • 2
    Added in CentOS 6.5 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/6.5_Technical_Notes/net-snmp.html – KCD Sep 09 '14 at 22:56