NETWORK ADMINISTRATIONSsnmp

Setup SNMP Daemon on MacOSX

In this video, I setup an SNMP daemon on MacOSX and query it from another computer on the same network.

On the iMac, open a terminal and edit the snmpd.conf file.

# sudo nano /etc/snmp/snmpd.conf

Edit the 2 lines as I show in the video, but use your own community name, and the IP address/CIDR for the server/network that you want to allow to query the SNMP daemon from.
In my video I enter the IP address of my raspberry pi, which already has snmpwalk installed on it.

After editing the snmpd.conf, you will need to restart the SNMPD service on the iMac for changes to take effect.

Unload the SNMPD service
# sudo launchctl unload -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist

Load the SNMPD service
# sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist

Check it is running
# sudo launchctl list | grep snmp

On the other server, open a terminal, and try to query the SNMPD running on the iMac.
# snmpwalk -v2c -cmycommunity xxx.xxx.xxx.xxx .
Replace xxx.xxx.xxx.xxx with the IP Address of your iMac.

And you should start to see SNMP data from the iMac written to the console.

0:00 Introduction to SNMPD on an iMac
0:30 Edit snmpd.conf on MacOSX
0:40 Set the community
1:05 Discuss CIDR/network masks
2:05 Start/Stop SNMPD
2:35 Test SNMP query of iMac from a different server on same network

#snmp
#snmpd
#snmpmacosx

source

by seanwasere ytbe

simple network management protocol

Leave a Reply

Your email address will not be published. Required fields are marked *