Bacula-users

Re: [Bacula-users] Nagios Plugins

2010-06-02 23:39:12
Subject: Re: [Bacula-users] Nagios Plugins
From: John Drescher <drescherjm AT gmail DOT com>
To: Ken <ken.barclay AT qbmore DOT com>
Date: Wed, 2 Jun 2010 23:36:40 -0400
On Wed, Jun 2, 2010 at 10:17 PM, Ken <ken.barclay AT qbmore DOT com> wrote:
> Hi John,
>
> I don't use Nagios, I use Zabbix, but getting alerts for mount requests is
> fairly simple.
> I receive alerts for the following type of Bacula messages:
>
> 09-Apr 04:35 Test-sd JobId 6900: Job Example.2009-04-08_22.15.26 waiting.
> Cannot find any appendable volumes.
>
> 02-Mar 08:43 Test-sd JobId 19295: Please mount Volume "000011L3" for:
>
> How to:
> In your messages resource
>
> operatorcommand = "/etc/bacula/mountrequest.sh"
> operator = nms.example.local = mount
>
> The operator command calls my script mountrequest.sh, and the $message is
> forwarded to Zabbix.  Here is the guts of the script, you will need to do
> whatever to send the output to nagios.
>
> data=`cat`
>
> error1=`echo "$data" | grep "Please mount" | awk -F" " '{ print $6,$7,$8,$9;
> }'`
>
> error2=`echo "$data" | grep appendable | awk -F" " '{ print
> $9,$10,$11,$12,$13; }'`
>
>   if [[ "$error1" == "" ]]; then {
>
>      message=$error2
>   }
>      else {
>
>      message=$error1
>   }
>   fi
>
> Hope that is of some help to you.
>

Thanks. I think that will help.

John

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>