Send Prowl notifications from op5 Monitor or Nagios

Install the Prowl iPhone app and register for an API-key so you can associate your push-notifications to your phone.

Create a new contact (example):

define contact{
 contact_name <Your-name>-push
 alias <Your-name> push notifications
 service_notification_period 24x7
 host_notification_period 24x7
 service_notification_options w,u,c,r
 host_notification_options d,u,r
 service_notification_commands notify-service-by-prowl
 host_notification_commands notify-host-by-prowl
 _prowl_apikey <Your API key>
 }

Add following notification commands:

define command{
 command_name host-notify-by-prowl
 command_line /usr/bin/perl -w /usr/local/bin/prowl.pl -apikey="$_CONTACTPROWL_APIKEY$" -priority=1 -application="Nagios-RPI" -event="$HOSTNAME$ is $HOSTSTATE$" -notification="Status: $HOSTOUTPUT$"
 }
define command{
 command_name service-notify-by-prowl
 command_line /usr/bin/perl -w /usr/local/bin/prowl.pl -apikey="$_CONTACTPROWL_APIKEY$" -priority=1 -application="Nagios-RPI" -event="$SERVICEDESC$ on $HOSTNAME$ is $SERVICESTATE$" -notification="Status: $SERVICEOUTPUT$"
 }

And install the perl push-notification plugin from prowlapp.com https://www.prowlapp.com/static/prowl.pl

If you like me run Nagios on a Raspberry Pi and wish to avoid to execute perl-code to save resources there are a C version as well which more or less don’t have much overhead.

Not very detailed instructions but the main parts are there so good luck!

/Christian

One thought on “Send Prowl notifications from op5 Monitor or Nagios”

  1. May I just say what a comfort to discover someone that genuinely knows what they’re talking about over the internet.

    You definitely understand how to bring a problem to light and
    make it important. A lot more people have to read this and understand this
    side of the story. I was surprised that you’re not more
    popular because you definitely have the gift.

Leave a Reply

Your email address will not be published. Required fields are marked *