Adding Nagios Logs to Splunk

Now that we have all these systems working correctly under OSX its time to start making them work together a little.

First up I want to add the nagios logs to splunk. This is very easy, you can get this off the splunk site here. But I’ll recap exactly what I did for my setup here.

1. Click Manager in the upper right-hand corner of Splunk Web.
2. Under System configurations, click Data Inputs.
3. Click Files and directories.
4. Click New to add an input
I choose Monitor a file or directory
6. Specify the path to the file:
With my setup it is:
7. Under Host Heading
I choose constant value
8. Under Source Type
I choose Automatic
9. Click Save

Thats it now your nagios logs show up in splunk. Pretty easy stuff.

Custom Weather Notifications with Growl

Last night I download Prowl on my iPhone and setup my growl to work with it. It’s very cool stuff together, i’ve been using growl forever.

Anyway tonight I was reading in this thread in the prowl forum where one poster is using growl notifications for weather. Not just any weather but really local weather. Now if you live in or around a big town, most weather apps are pretty accurate for you area. But when you live out in the sticks like I do, they are only close most of the time.

Anyway tonight I set up this excellent pair of perl scripts as outlined here from IBM: Develop your own weahter maps and alerts. Which is a very cool script that will allow you pinpoint your location. I used Photoshop to create the base map from the layers. Once followed all the instructions, some things are not exactly clear at first, but if your familiar with perl reading the code sorts it all out. I setup the notify scripts to send the messages to growl via the growlnotify command.

Now once that was all setup I created a simply bash script that would delete the old Radar overlay, pull the current Radar overlay needed and run the perl weather scripts. I then stuck that script in my crontab. So if I’m at my computer I get notified and if i’m away from my computer i get a push notification to my phone. Very cool stuff. Of course I could just look outside to see if it is raining 🙂

Splunk on OSX

Another tool that I like use is Splunk. Now we use a different set of tools for log monitoring and management at work, but I enjoy using splunk at home.

The good thing about Splunk on OSX is that they provide you with a .dmg to download and .pkg to install. Takes longer to download than to install. Once the install is done just start it up and log in.


Next up for reinstall is OSSEC. OSSEC is an Open Source Host-basted Intrusion Detection System. I also had this installed before the i reinstalled OSX.

To install OSSEC just follow the default instructions and everything works out just fine. Note, you’ll have to start this manual after each reboot, I’m sure there is a way to add it to autostart, but I haven’t gotten there yet.

To install the OSSEC-WUI follow the instructions up to the point before running the script, it will not work on OSX (client anyway, not sure about server). All you need to do to get it working is first change the permission on the whole folder and files to _www. Then you need to add the _www user to the ossec group. That is done with the following command:
sudo dscl . -append /Groups/ossec GroupMembership _www

Thats it now its up and running and you have a nice interface for it.

Cacti on OSX

To continue on with monitoring my home network environment with the some of the tools I use to monitor my work environment I’m reinstalling Cacti. Now before the reload of my mac I had cacti running and graphs for at least 3 years. Now while I don’t mind losing that historical data i do mind loosing all the custom scripts that I had written to monitor so of the now SNMP devices on my network, I will probably pull that drive out and copy the data over soon. Note to self include all these config files in my future backup plan.

My first run at installing Cacti was via Macports, which I’ve never tried before. What I discovered is that, the version on macports wouldn’t install with the plugins support. So I did the way I normally do an installed from source. No special notes for osx here, it just works. Same goes for adding the plugin support, worked out of the box, following there install instructions.

So all I can recommend is following the install instructions and install from ports and you’ll be in business. The only thing that I think doesn’t work is the Localhost memory usage. But I’ll be digging into that soon and getting it sorted out with the mac version.