Table des matières

Enabling SNMP on Mac OS

Installing SNMP

To configure snmp on Mac OS, you first need to install the snmpd package. If the file /etc/snmp/snmpd.conf exists, then snmp is already installed.

If not, you can install it using one of these methods:

Enable SNMP automatically at boot time

  1. Edit the file /etc/hostconfig

  2. Search for the header # Services and below the list of services (just above the line APPLETALK_HOSTNAME) add the following line :

    copy
    SNMPSERVER=-YES-
  3. Save the file

Configure SNMP

Next, you need to edit the :

copy
nano /etc/snmp/snmpd.conf

Change the line ( or put it as a comment ) and replace it with :

agentAddress udp:127.0.0.1:161

by

copy
agentAddress udp:0.0.0.0:161

The next step is to configure the SNMP community:

copy
rocommunity read_community default

or rocommunity “ community name ” “ range ip (unique ip ) /subnet mask ”.

copy
rocommunity read_community 10.7.0.14/32

Then restart the SNMP service by typing :

copy
sudo launchctl unload /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist

Integration into Esia

As the SNMP service on Mac OS is the same as on Linux, the esia …_SNMP_LINUX_… patterns and plugins will work on Macs.