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
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:
- SNMP Traffic and SNMP Traffic v2 sensors to monitor traffic on the network cards
- SNMP Linux Load Average and SNMP Linux Load Average v2 sensors (this sensor works although it is intended for Linux operating systems)
- SNMP System Uptime and SNMP Uptime v2 sensors to monitor how long the system has been running
- SNMP Disk Free and SNMP Disk Free v2 sensors to monitor free disk space
- SNMP CPU Load and SNMP CPU Usage sensors to monitor the load of each CPU
- 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 line
APPLETALK_HOSTNAME
and add the following entry before APPLETALK_HOSTNAME:
SNMPSERVER:=-YES-
More
Knowledge Base
Paessler Blog