3

I have a small program that I am preparing for release. As part of its functionality, it queries SNMP for a few statistics.

The MIBs in question are installed by the default net-snmp package, but are not enabled by the default /etc/snmp/snmpd.conf.

I would like to ship a custom configuration file with my RPM, but I do not want to modify /etc/snmp/snmpd.conf (in case any of my users have custom configuration in there already).

Is there a way to ship a separate snmpd.local.conf file (or something similar) and have it take effect, without modifying /etc/snmp/snmpd.conf? man snmp_config(5) seems to imply that it is possible but nothing I try seems to have any effect.

javanix
  • 247
  • 4
  • 15

1 Answers1

2

There are IncludeDir and IncludeFile options available from RHEL/Centos 6.5:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/6.5_Technical_Notes/net-snmp.html

hdanniel
  • 4,293
  • 23
  • 25
  • Do you know if these are "checked" at all, or are the configuration files just naively concatenated and evaluated by `snmpd`? – javanix Mar 20 '15 at 22:01
  • Thanks - ended up adding an `includeDir` to a `snmpd.local.conf` file. – javanix Mar 25 '15 at 18:59