Tag Archives: groundwork

Using Boxcar to push Nagios notifications

A Boxcar notification on Mac OS X.

Added to my Mac OS X Monitoring Tools repository today is a script push a Nagios notification through Boxcar. Whilst not technically limited to Mac OS X, it provides a great way to get real time notifications on your Mac and iPhone.

I use Boxcar as my central notification service on both Mac and iOS, and have it set up to let me know about my Mint instances, forwards from Growl, and now notifications from our Groundwork server.

The script itself is very self explanatory, simply making a curl call to Boxcar’s API with the passed arguments. It does however, make it very easy to integrate a Boxcar notification to your existing Nagios workflow.

As per the script’s comments, you will need to subscribe to a generic provider in order to have your notification passed to your account, and a command to do so is included.

notify_by_boxcar.sh on GitHub


Checking Kerio Connect statistics with Nagios

Added to my OSX-Monitoring-Tools project today is a bash script to check statistics for Kerio Connect. This bash script lets you define the standard warning and critical thresholds on any key in the stats.dat file generated by Kerio, and also returns clean performance data (great for Groundwork graphs!).

The complexity here is that Kerio’s statistics are a constant counter until reset, so in order to gather useful data, you have to reset the stats each time the check is run. This functionality is built into the script thanks to the Kerio Admin API, so simply set your check interval, and enjoy statistics based on that. The graph above is “HTTPConnections” graphed on a production Kerio Connect server every 10 minutes.

You will need to enter a few variables into the script itself to allow it access to the API in order to reset statistics, but the counter names and thresholds can be entered as arguments.

check_kerio_connect_stats.sh on GitHub


OSX Nagios Monitoring Tools & Scripts

Keeping an eye on your Mac OS X server instances can be a bit painful, with Apple’s inbuilt notification options limited to emails when software updates, expired certs, or super full volumes pop up. Having real time and historical data on your services health and performance can help with your troubleshooting workflow, and getting a near instant notification of an impending drive failure sure beats trudging out at midnight to an emergency maintenance callout.

For years, I have deployed the ever improving Groundwork Monitor to monitor our internal and customer infrastructure, and their recently announced Core licence provides free monitoring for up to 50 devices. Groundwork’s Nagios core brings with it a wealth of plugins for monitoring servers, network devices, and a plethora of services, but a Mac administrator might struggle to find plugins that can provide nice performance data, or even provide valid output on OSX without 5 hours of dependency building.

Below is a link to my new project hosted on GitHub. These are the scripts and tools I have authored over the years to monitor OSX and associated infrastructure. After a thorough cleaning of some old code, i’ll add the rest, as well as anything new, with a plan to keep them in development, and open to everyone:

Visit the project on GitHub

Over the next little while, i’ll also be posting some articles on how you can leverage the standard Nagios plugins to monitor services and hardware on the Mac platform too. I hope these additions make your life a little easier.