Fall is here, which means beautiful foliage, colder weather, and a new operating system from our friends in Cupertino. I ran into a change today that surprised me a bit – the command line snmpconf utility got a makeover! Essentially, the utility has morphed from a process-oriented walk through all the options into a menu-based system. Anyone who has configured gear over telnet will be very familiar with this kind of structure.
The new utility will first ask you what config file to make – the choices are snmpd.conf, snmp.conf, and snmptrapd.conf. We’re concerned with option 1, which is snmpd.conf – it allows us to configure how the daemon operates. Choosing the other options will prompt you with different menus that are appropriate for those configs.
Below is a quick run-through of the menu options you’ll need to set up a basic SNMP configuration. Many of the default values and descriptions are discussed on my SNMP setup walkthrough post.
1: Access Control Setup
This one is pretty straight forward. The sub menu selected in 1 allows you to add SNMPv3 users or configure SNMPv1/v2c communities. The questions remain the same – you will be asked to provide a unique community name and have the option to restrict access by hostname or IP address. Generally, unless you are a moderately advanced user, you want to allow all OIDs here.
4: Agent Operating Mode
The first three options are advanced – the one you would probably be interested in is defining which IP address SNMP should listen on. This can be super handy if your server has multiple addresses, or you only want it to listen on a single interface. The default SNMP port is 161, you can change that in this section as well.
5: System Information Setup
This menu item allows you to configure the “location” and information fields that will pop up in Observium – for example, you can specify a default contact email, a physical address, and more.
There does seem to be one typo in this utility, though – it instructs the user to move the configuration file to /usr/share/snmp, which is an SIP protected directory! The daemon will still look in /etc/snmp for configuration files, so I recommend placing there.
In a future series, I’ll try to cover some of the “stupid SNMP tricks” you can do with traps and allowing SNMP to report on various tests. Extending the SNMP agent can be super powerful if you want to monitor custom apps and data, but it doesn’t really fit into Observium unless you’re willing to modify that significantly too.
[…] walk you through the instructions differently – see an updated post with more information here if you get […]
Hi, thanks for your tips.
Unfortunately it doesn’t seems to work.. I can’t reach the server with the SNMP parameters.
Is it possible for you to provide me an example of your configuration file ? I will modify it to match my parameters …
Thanks in advance for you help
When you run through the configuration, the “wizard” will save the configuration file to your current working directory. It will need to be copied into /etc/snmp (sudo cp snmpd.conf /etc/snmp/) and the snmpd Launch Daemon reloaded (launchctl unload /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist and then load again). Do those steps allow you to reach the server?
Sorry for my late reply.
I did all of this commands but it didn’t work until I rebooted the Mac mini. It’s strange but I have to reboot each time I modify the snmpd.conf
On an other machine just reload the daemon works.. Very strange but ok for me 🙂
An other strange thing is that Observium displays OS X 16.0.0. Funny …