Configuring Monit to alert via Prowl

An iPhone client for Growl available on the App Store.
gsterndale
Harmless
Posts: 2
Joined: Thu Dec 17, 2009 2:44 pm

Configuring Monit to alert via Prowl

Postby gsterndale » Thu Dec 17, 2009 2:52 pm

I have a machine that monitors itself with Monit. I'd like to have a notification pushed to my phone if ever there's a problem. Prowl seems like a great way to do so. Has anyone else done this?

FYI, it's an Ubuntu slice on Slicehost, nice choice Prowl!

gsterndale
Harmless
Posts: 2
Joined: Thu Dec 17, 2009 2:44 pm

Re: Configuring Monit to alert via Prowl

Postby gsterndale » Fri Dec 18, 2009 4:09 am

Thanks to Prowl's API, I was able to create a shell script (that probably leaves something to be desired) and run that from monit to send my alerts.

Script: http://pastie.org/748269

Code: Select all

$ ./prowl.sh 'Mainframe' 'gots problems' 'foobard' '1'


The monit config looks something like this:

Code: Select all

check process my_app_server3000
    if cpu usage > 90% for 2 cycles then exec "/path/to/my/prowl.sh 'My App Server' 'CPU Usage Exceeded' 'Restart likely' '2'"


Thanks Prowl!


Return to “Prowl”

Who is online

Users browsing this forum: No registered users