2

I currently have a single /etc/snmp/snmp.conf that contains many mibdirs clauses. This is fine as we have a single package that contains all our MIBS, but now I would like to tie a subset of those MIBS to a driver, so that when I install a particular driver, it will also install the MIBS. Appending to snmp.conf seems unwieldy. I'd like multiple, independent conf files (obviously only adding on to the core conf) to make everything simple.

How would one have multiple conf files, specifically having separate files that each contain at set of mibdirs calls? Is there such thing as /etc/snmp/snmp.d?

1 Answer 1

0

From the man snmp_config:

   INCLUDING OTHER CONFIGURATION FILES
   It is possible to include other configuration files for processing 
   during normal configuration file processing.:

          # include site specific config
          includeFile site.conf

   This will load the specified configuration file. The
   path to file must be either absolute, starting with '/',
   or relative. The relative path is then relative to the directory
   where the parent file with 'includeFile' directive resides.

   The included file name does not need to have '.conf' suffix.

          # include a all *.conf files in a directory
          includeDir /etc/snmp/config.d

   This will search specified directory for all files with '.conf'
   suffix and process them as if they were included using includeFile
   directive. The configuration files are not processed in any particular
   order.

   The specified directory must be absolute directory path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.