Bacula-users

Re: [Bacula-users] Nagios Plungin to check mount requests

2012-08-02 22:59:05
Subject: Re: [Bacula-users] Nagios Plungin to check mount requests
From: "Ken Barclay" <ken.barclay AT qbmore DOT com>
To: "'John Drescher'" <drescherjm AT gmail DOT com>
Date: Fri, 3 Aug 2012 09:31:35 +0700
Hi John,

You requested the same thing two years ago!
This was my response on 3 June 2010.  Works fine for me.


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.

Regards,
Ken Barclay


-----Original Message-----
From: John Drescher [mailto:drescherjm AT gmail DOT com] 
Sent: Thursday, August 02, 2012 10:09 PM
To: bacula-users
Subject: [Bacula-users] Nagios Plungin to check mount requests

Does anyone have a nagios plugin that checks if bacula is waiting for a
mount request? I have seen ones that check if jobs fail or check if the
daemons are running but not one that checks if bacula is waiting on a mount.
Sometimes bacula wants a tape that is not in my 24 slot autochanger and that
puts jobs on hold until I notice that. I need this because my linux network
is not permitted to be connected to the internet so I can not receive emails
from bacula however all clients have dual networks so I can monitor status
using nagios on my desktop.

--
John M. Drescher

----------------------------------------------------------------------------
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users