Tools

Account Tools

Search Tools


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:

  • from the Mac OS CD
  • download it from the project site NET_SNMP
  • via the Mac OS package manager Homebrew
    1. Install Homebrew by typing the following line in the terminal :

      copy
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    2. Install SNMP by typing the following line in the terminal :

      copy
      brew install net-snmp

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.

en/snmp/snmp_mac_os.txt · Last modified: 2023/11/09 18:08 by q.george