krypted.com

Tiny Deathstars of Foulness

Mountain Lion Server comes with a few new alerting options previously unavailable in versions of OS X. The alerts are sent to administrators via servermgrd and configured in the Server app. To configure alerts in Mountain Lion Server, open the Server app and then click on Alerts in the Server app sidebar. Next, click on the Delivery tab.

At the Delivery screen, click on the Edit button for Email Addresses and enter every email address that should receive alerts sent from the server. Then click on the Edit button for Push Notifications. Here, check the box for each administrator of the server. The email address on file for the user then receives push notifications of events from the server.

Click on OK when you’ve configured all of the appropriate administrators for alerting. Then, check the boxes for Email and Push for each of the alerts you want to receive (you don’t have to check both for each entry). Options include:

  • Certificate expiration: One of the certificates installed on the system (including Push) will expire soon and needs to be updated.
  • Disk unreachable: A disk that was mounted on the server is no longer available (you will get these when you rotate offsite backup hard drives if using spinning or solid state disks)
  • S.M.A.R.T. status: A disk has an error with its S.M.A.R.T. What this really means usually is that it would be very smart to replace the disk that’s likely to fail soon
  • Disk space: The server is running out of hard drive space
  • Mail storage quota: A violation to the mail quota is exceeded
  • Virus detected: A virus was detected on the server
  • Network configuration change: The port state of the server changed, an IP address changed, etc.
  • Software updates: There are software updates available to be installed on the server computer

Some of these settings can be configured a little more granularly. For example, by default the disk space alert is sent when there is only 5% of the free space available on the server. To increase this to 10, edit the serveradmin settings to swap info:notifications:diskFull:freeSpaceThreshold with 10 rather than 5:

sudo serveradmin settings info:notifications:diskFull:freeSpaceThreshold = 10

To see a list of all notifications options run:

sudo serveradmin settings info:notifications

Which provides the following:

info:notifications:certificateExpiration:active = no
info:notifications:certificateExpiration:who = _empty_array
info:notifications:suAvailable:active = no
info:notifications:suAvailable:who = _empty_array
info:notifications:diskFull:active = no
info:notifications:diskFull:who = _empty_array
info:notifications:diskFull:freeSpaceThreshold = 5

Finally, as with previous versions of OS X Server, Mountain Lion Server has snmp built in. The configuration file for which is located in the /private/etc/snmp/snmpd.conf and the built-in LaunchDaemon is org.net-snmp.snmpd, where the actual binary being called is /usr/sbin/snmpd (and by default it’s called with a -f option). Once started, the default community name should be COMMUNITY (easily changed in the conf file) and to test, use the following command from a client (the client is 192.168.210.99 in the following example):

snmpwalk -On -v 1 -c COMMUNITY 192.168.210.99

August 4th, 2012

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , , , , , , , ,

  • Jay

    You sure about push notifications going to the email address on file? 2 of the 3 options in my list don’t even have email addresses in their account info.

    The only correlation I can see based on the choices I have there are user accounts I’ve run the Server.app while logged in as (although always authenticating the app as admin).

  • The notifications are nice, but annoyingly I keep getting a hostname changed alert every time I restart my system.

  • Matt Domenici

    I’m still not clear on the push notifications. How does the Mac in question get the push? Does it have to be a system running Server.app, or is there a way for these to be delivered to a mobile device?

    • Matt Domenici

      Just answered my own question: It pushes only to the other admins in Server.app on their client systems.

      That being said, e-mail notification seems to be a little flaky.

  • Is there a way to create a security alert which would send out an email/push notification when a user connects to my server via VPN?

  • Filip Viskovic

    I’m having issues with configuring the freespacethreshold for Yosemite server. Any info:notification command outputs `info = _empty_dictionary` in terminal. Any suggestions on how to fix it?

    • pgb0517

      I can’t get it either. Has this granular ability been removed from recent versions of server?