[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pagerduty integration with M/Monit
From: |
Christopher Wood |
Subject: |
Re: pagerduty integration with M/Monit |
Date: |
Tue, 10 Feb 2015 16:12:47 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Maybe instead of using their wrapper, see how you can call the pagerduty
binary/script directly?
/usr/local/bin/pagerduty
https://github.com/pinterest/pagerduty-monit/blob/master/pagerduty-trigger
In that script:
/usr/local/bin/pagerduty -k "$PAGERDUTY_SERVICE_KEY" -i "$INCIDENT_KEY"
--description="$DESCRIPTION" trigger
The $DESCRIPTION is just
EVENT="$1"
HOST=`hostname -s`
DESCRIPTION="$EVENT failed on $HOST"
You can likely produce the message you want as long as you can pass the remote
hostname from mmonit. (As to how, sorry, only used monit itself.)
On Tue, Feb 10, 2015 at 01:01:41PM -0800, Paul Theodoropoulos wrote:
>
> On 2/10/15 12:51 PM, Paul Theodoropoulos wrote:
> >Thanks Christopher. It sort of works, like the other sort of works
> >- it generates the alert like this (no harm in exposing our
> >internal hostnames):
> >
> >cron_mia-web-a-pre failed on nuq-aws-netman-ng
> >
> >So. Sort of, again. Lists the process that failed, lists the host
> >- but since it's running locally, it reports the local name of the
> >monitoring server as where the failure occurred.
> >
> I'm not 100% certain, but it looks like using their API directly may
> be the way to go - I'm investigating that now...
>
> --
> Paul Theodoropoulos
> www.anastrophe.com
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general