This article applies to PRTG Network Monitor 19 or later

I would like to monitor my machine that is running on macOS with the SNMP sensors of PRTG. How do I activate SNMP on macOS so that PRTG can query values for disk free, load average, and others via SNMP?


Activate SNMP on macOS and Monitor with PRTG

Current macOS versions include SNMP by default. There is a basic setup assistant that you can use to configure SNMP on your macOS machine.

Step 1: Back Up the snmpd.conf File

On your macOS machine, open the Terminal app, locate the snmpd.conf file under /etc/snmp/snmpd.conf, and save a backup copy. You can use the following command:

sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org

Step 2: Adapt the snmpd.conf File

In the Terminal, enter the following command to start the setup assistant:

sudo snmpconf -g basic_setup

Follow the setup questions to configure SNMP to your needs.

Note: We recommend that you explicitly configure read-only access for SNMP v1 and SNMP v2c. This is because the default configuration value for the SNMP community string is public and therefore access is not secured.

Step 3: Start the SNMP Daemon

To start the SNMP daemon, use the following command:

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

Step 4: Create SNMP Sensors

In PRTG, create a new device that represents your macOS machine using the respective IP address or DNS name.

  • For this new device, run an auto-discovery to let PRTG automatically create some SNMP sensors.
  • You can manually add further SNMP sensors. Not all measurements will be available via SNMP, but you should be able to create the following sensor types:
  • The auto-discovery might also find several generic SNMP values such as Internet Control Message Protocol (ICMP) errors or User Datagram Protocol (UDP) datagrams.

Step 5: Add the SNMP Daemon to Automatic Startup

Because you manually started the SNMP daemon in Step 3, the daemon will not run after you restart your macOS system.

Best practice is to automatically start the SNMP daemon at system startup. To add your SNMP daemon to automatic startup, you can edit the file /etc/hostconfig.

In the file, locate the lineAPPLETALK_HOSTNAMEand add the following entry before APPLETALK_HOSTNAME:SNMPSERVER:=-YES-

See also


Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.