prowl-pusher
============
Command line tool for Prowl.
Installation
------------
```bash
npm install -g prowl-pusher
```
You also need to sett your API Key as an environment variable named `PROWL_KEY`.
Linux/Mac:
```bash
export PROWL_KEY=[YOUR_KEY]
```
You should set this in your `.bashrc/.profile` or even in `/etc/environments` if it's a production environment.
Windows users: [Try this article...](http://www.computerhope.com/issues/ch000549.htm)
Usage
-----
```bash
prowl EVENT DESCRIPTION [PRIORITY]
prowl "My event name" "My description text" 2
```
* `EVENT` The name of the event or subject of the notification. Max length `1024`.
* `DESCRIPTION` A description of the event, generally terse. Max length 10000.
* `PRIORITY` Default value of 0 if not provided. An integer value ranging [-2, 2] representing:
```
Priority values:
-2: Very Low
-1: Moderate
0: Normal
1: High
2: Emergency
```
Emergency priority messages may bypass quiet hours according to the user's settings.
> The application parameter is automaticly set to the hostname of the computer sending the message.
Ubuntu Upstart
--------------
I had some challenges getting this to work with Ubuntu Upstart. I had to read the variables in to the Upstart scripts, and pass them on to the prowl command like this:
```bash
pre-start script
. /etc/environment
PROWL_KEY=${PROWL_KEY} prowl Starting "MY APP NAME"
end script
post-stop script
. /etc/environment
PROWL_KEY=${PROWL_KEY} prowl Stoping "MY APP NAME"
end script
```
* * *
<https://www.npmjs.com/package/prowl-pusher>