This article applies to PRTG 25

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

The MacOS terminal is open with the sudoconf -g basic_setup command. The image shows the resulting prompts/

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.

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 line

APPLETALK_HOSTNAME

and add the following entry before APPLETALK_HOSTNAME:

SNMPSERVER:=-YES-

More

Knowledge Base

Paessler Blog