question about notifications

gregborbonus at gmail.com gregborbonus at gmail.com
Mon Aug 9 20:24:21 CEST 2010


Are the command arguments passed in a scope?

Such as check_groovy!WARN!CRIT

If so, you could do arg1 and arg2

The best solution is to code the output of the service check. The above will not work for all checks as some do reverse, and others have different arguments.

I am simply presenting a different point of view.
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Jim Avery <jim at jimavery.me.uk>
Date: Mon, 9 Aug 2010 19:12:11 
To: Nagios Users List<nagios-users at lists.sourceforge.net>
Reply-To: Nagios Users List <nagios-users at lists.sourceforge.net>
Subject: Re: [Nagios-users] question about notifications

On 9 August 2010 18:31, Joel Brooks <jbrooks at oddelement.com> wrote:
> hey all,
>
> is there a way to include the WARNING and CRITICAL thresholds in a
> notification (without including the perfdata)?
>
> There doesn't seem to be a macro for this.
>
> i.e., i'd like my notification to show something like:
>
> <body of email notification>
> $SERVICEDESC$ is in $SERVICESTATE$ condition.
>
> $SERVICEOUTPUT$
> Current: $SERVICEVAL$ (Warning: $SERVICEWARNING$, Critical:
> $SERVICECRITICAL$)
>
> is there a way to do something like that?


If only ...

Seriously though, a warning or critical state in Nagios isn't
necessarily anything to do with a threshold.  For example, you could
have a check_groovy plugin which warns if the colour is silver or
white and is critical if the colour is navy or grey.  There's no
threshold so nothing to store in a macro.

If you want to output both warning and critical values, you will need
to re-write the plugin to show them explicitly.  So, for example if
you have a check_mydisk plugin which outputs "warning: disk is 82%
(>80%)"  you will need to re-code it to say "warning: disk is 82% (>
80% < 90%)" or somesuch instead.  Most people who write plugins prefer
brevity so you'll rarely see a plugin which (except in the performance
data) outputs both.

Push comes to shove you could write a wrapper script around an
existing plugin which scrapes the warning and critical thresholds from
the performance data, but personally I think that would be overkill.

hth,

Jim

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list