Friday, May 27, 2011

Setting up SNMP on OSX 10 Xserve via SSH

setting up snmpd on MAC Server OS X via ssh

verify /usr/sbin/snmpd exists
 ls /usr/sbin/snmpd

verify /usr/share/snmp/snmpd.conf exists
 ls /usr/share/snmp/snmpd.conf

if snmpd.conf doesn't exist, run:
 /usr/bin/snmpconf -i (-i is required to write the file to the correct location)

    set the following options:
 default = all
 1 (snmpd.conf)
 1 (access control setup)
  3 v1/2c ro community name
 4 (Agent operating mode)
  2 (system user agent runs as)
 5 (system information setup)
  1 (physical location of system)
 6 (trap destinations)
  2 (v2c trap receiver)
  3 (v2c inform receiver)
  5 (default trap sink community)

starting snmpd:

restart snmpd:
 kill -HUP <pid>

finally, to make sure it runs at boot time:
Under Snow Leopard there is a slight change to the way services are enabled.
-w       Overrides the Disabled key and sets it to false. In previous versions, this
         option would modify the configuration file. Now the state of the Disabled key
         is stored elsewhere on-disk.

So, to enable the SNMP daemon correctly:
$ sudo launchctl load -w /System/Library/LaunchDaemons/

No comments:

Post a Comment