Refine your search:

Thanks For Downloading!

Review the documentation below and follow any custom installation steps. If no install steps are listed, most Splunk Apps and Add-ons can be installed as follows:

Windows: Decompress the downloaded file using a tool like 7-Zip and place the resulting folder into %PROGRAMFILES%\Splunk\etc\apps. Then restart Splunk using the splunk restart command or the GUI.

Unix/Linux: Decompress the downloaded file using a tool like tar -xvf and place the resulting folder into $SPLUNK_HOME/etc/apps. Then restart Splunk using the splunk restart command or the GUI.

Description

This package includes a simple alert script that sends Splunk alerts as notifications to a Growl deamon over network (UDP).

Growl is a notification utiliy for Mac OS X that displays notification from various applications. For more information about Growl and to download it visit <http://growl.info/>

Feedback

Please send your feedback to splunk at spp.at.

If you have questions/issues/ideas don't hesitate to ask them on Splunk Answers: <http://answers.splunk.com/questions/tagged/app-growl-spp>

Prerequisites:

- Growl has to be installed on your Mac OS X client machine.
- Your client machine has to be reachable on UDP Port 9887 for the Splunk Server (ie. not blocked by a firewall)

Installation:

On your client machine:

Setup growl to listen on the network for incoming notifications and enter a password to allow remote application registration. To do so go to System Preferences on your Mac > Growl > Network - See <http://dl.dropbox.com/u/1160714/screens/growl_config_screen.png>

On the Splunk Server:

Copy the growlnotify.py form the package to the following folder on your Splunk Server:

$SPLUNK_HOME/bin/scripts

Make sure the script is executable:

$ chmod a+x $SPLUNK_HOME/bin/scripts/growlnotify.py

Edit the growlnotify.py and enter the values for the following variables:

GROWL_HOST - Enter the IP Address of the client machine running Growl (eg. GROWL_HOST = &quot;192.168.0.33&quot;)
GROWL_REGISTRATION_PASSWORD - Enter the password you've set in the Growl Preferences (eg. GROWL_REGISTRATION_PASSWORD=&quot;changeme&quot;)

Excute the growlnotify.py with \--register as argument. The script will send a registrations packet to the Growl daemon.

$ splunk cmd python growlnotify.py --register

You will get an entry in Growl > Applications where you can configure how Splunk notifications should look like.

Basic Usage

Set up a scheduled search and enter as alert action "Trigger shell script" and fill in growlnotify.py as the "Filename of shell script to execute". See <http://dl.dropbox.com/u/1160714/screens/save_search_dialog.png>

When the search is executed and the conditions match, the growlnotify script will be invoked which will send a notification to the Growl host using the saved search name as a title and the number of events as the message.

Advanced Usage

If you want to customize the message that is displayed within the Growl notification, you'll have to customize the search. Once the saved search name ends with "--inline", then the growlnotify script will take a look at each result of the search if it contains a field called "growl_msg" and will send a notification with the value of this field.

Example search:

sourcetype=access_combined | stats count by uri,host | where count&gt;1000 | eval growl_msg=&quot;Frequently accessed URI: &quot;.uri.&quot; has been hit &quot;.tostring(count).&quot; times in the last hour on host &quot;.host

Save this search with the search name "Website Notification--inline" and configure it to execute the grownotify.py script.
This will produce notification messages like "Frequently accessed URI: /products/product1 has been hit 3805 times in the last hour on host webserver1" with the notification title "Web Notification"

Versions and Release Notes

Version 1.0 (current version - updated Sep 24, 2010)

posted 24 Sep '10, 14:57

ziegfried's gravatar image

ziegfried ♦
10.1k1618
accept rate: 52%

new version 24 Sep '10, 07:57


2 Reviews:
2 reviews, 0 ratings, average 0.0

Would be really cool if you could update this script to use the new GNTP communication protocol for Growl as they have removed the UDP communication stack from the latest version.

http://growl.info/documentation/developer/gntp.php

comments (0)

reviewed 27 Mar, 23:24

mhedhli's gravatar image

mhedhli
211
accept rate: 0%

Note: This will not work with Growl later than 1.2.2; the UDP support was removed after this version and this script does not support TCP.

comments (0)

reviewed 18 Jun '12, 11:50

siegejackson's gravatar image

siegejackson
211
accept rate: 0%

Your review

Did you find this app useful?

Preview toggle preview

Price: Free
Author: ziegfried
Version: 1.0
Splunk compatibility: 4.3, 4.2, 4.1, 4.x, 5.x
Updated:
License: Creative Commons BY-NC-SA 2.5

This app is not covered by any support agreements in place with Splunk. If you have questions about the installation or operation of this app, please contact the author.

Follow this app

Log In to enable email subscriptions

RSS:

Reviews

Reviews + Comments

Copyright © 2005-2012 Splunk Inc. All rights reserved.