[A l’attention des lecteurs francophones] Ce post sera en Anglais, car il est susceptible d’intéresser un lectorat international.
Yesterday, we’ve been playing with a newly released application for 3.0 Push-enabled iPhones. The name is Prowl, it’s Growl for your iPhone, And it’s a game changer.
It allows us to receive as push notifications our selection of message from twitter, mail, omnifocus, and realtime server alerts from our hosted servers (apache, memory and such alerts)
A bit of background
Growl is a widely used Mac OS X background service, that you can install and configure to display small notification bubbles in a corner of your screen whenever something happens. You can be notified of new mails, twitter notifications, new wifi networks network becoming available, a torrent download being completed…
In short, and thanks to many application's built-in support, command-line access, or extras, almost anything you would want to be notified unobtrusively about.
What Prowl offers you now is the possibility to push any of these Growl notification from your desktop as a push notification to your iPhone. As you can imagine, the ways you can use it are many, and are not limited to desktop notifications thanks to a few extras we’ll describe here. (Picture from Prowl website)
How to Setup
Here is what we have setup so far, to keep the service both relevant and useful.
You will then need to install the desktop part of Prowl, that exists as a growl plugin on Prowl's installation page
You could now setup Growl to display any notification using Prowl, but we think that would be a mistake.
Growl can be chatty, and you don’t want every single notification pushed to your phone.
In the Growl preference pane, under Applications, you will find a list of every application that has sent some notification to growl in the past. Choose the applications you would like to be notified of, and click Configure…
You can either forward all notification, by going to Application Setting, and choosing Display Style: Prowl, or go into even more detail by going into Notifications, and choosing what events to be Displayed as Prowl.
Now, go to Display Options, and configure Prowl with the username and password you’ve chosen on Prowl’s site.
You can also choose refine what to display, and if you want to also display Prowl notification on your desktop in this page.
You should be all setup for Prowl now, click Preview, and test…
You don’t want to receive notifications every time a new update from the people you follow is available. Chances are you are more interested by mentions and direct messages. That’s cool, because In Tweetie, our desktop client of choice, you are offered a fine setup allowing, you to be notified with just the type of events you’re interested in :
And if you use multiple accounts, you can even fine tune notifications for each of them.
Omnifocus for iPhone does not have Push notifications yet, but it does include Growl notifications for Due items, and that’s all we need for this setup.
— Server Monitoring
Here we used a rather convoluted setup to answer all of our needs.
First what we need to do is open up Growl’s preference pane again, and go to Network.
there you will activate “Listen for incoming notifications”, and “Allow remote application registration” and choose a password you’ll put also in your script.
Open up on your Growl server’s firewall the following ports:
TCP 23052 and UDP 9887, only for your server’s IP.
Yes we know that’s not quite secure yet, but we’re refining that also.
Then, on each of our Linux Hosted servers, we installed a ruby gem, "ruby-growl"
We then wrote a very simple notification script, shown just here :
#!/bin/env ruby require 'rubygems' require 'ruby-growl' growl_server = YOUR_GROWL_SERVER_HOSTNAME growl_password = YOUR_GROWL_SERVER_PASSWORD source = ARGV title = ARGV message = ARGV g = Growl.new growl_server, "Server monitoring", [source], nil, growl_password g.notify source, title, message
It’s quite quick and dirty, but it gets the job done, we’ll add verification and sanity checks in the coming days :)
Now you have to register the application to Growl, by using it at least once. name the file you created on your server notification.rb for example, and call it :
chmod +x notification.rb ./notification.rb "Apache monitor" "This is a test for apache monitor" "This is the message's content"
Test. The message should be displayed on your desktop. ain’t that cool.
Now, do not forget then to go back to Growl’s preference pane, in the Applications Tab and setup this newly created application (should be named “Server monitoring” as per the id given in the script)
Set it up with the “Prowl” display Style.
Test again. You should receive the notification. ain’t that even cooler.
An alternative would be to directly notify Prowl, using a script they’ve developed and made available, prow.pl.
But that would not display a notification on your desktop machine, as we want to, so that is a no go for us. The point in this setup is to have the server’s alerts displayed both on our iPhones, and all our macs.
That’s only the tip of the iceberg, and we only have used this amazing app for a day.
We will add more use cases as we think of them (or as you tell us your ideas !)