On 2/10/15 12:30 PM, Christopher Wood wrote:
On Tue, Feb 10, 2015 at 12:19:16PM -0800, Paul Theodoropoulos wrote:
I'm trying to use pagerduty for alerting. I use M/Monit as the
one-stop gateway for all alert management. Since I'd rather not have
to modify several hundred monitoring rules across many servers, I've
tried using the 'execute program' action in M/Monit to trigger
alerts via the pagerduty API. It works - sort of. If I use
"/usr/local/bin/pagerduty-trigger $MONIT_SERVICE", it'll send me an
alert if I kill off crond for example. But...it reports that crond
failed...on my M/Monit server, rather than the source server. If I
use $MONIT_HOST - well, then it reports "localhost failed on (my
monit server)".
Concatenation?

/usr/local/bin/pagerduty-trigger "${MONIT_SERVICE}__${MONIT_HOST}"

There, single param.
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.

--
Paul Theodoropoulos
www.anastrophe.com


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to