[DRBD-user] Fwd: DRBD check script

Poyner, Brandon bpoyner at ccac.edu
Mon Mar 2 15:39:40 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


You could try putting something like this in cron:

message=$(/usr/lib/nagios/plugins/check_drbd); if [ $? -ne 0 ]; then
echo "$message" | mail -s "drbd problem" root; fi

The check_drbd plugin will have an exit status of 0 if the status is OK,
and another value >0 if a problem is found.

Of course doing this in a cron could be very noisy.  

Brandon Poyner
Network Engineer III
CCAC - College Office
412-237-3086
> -----Original Message-----
> From: drbd-user-bounces at lists.linbit.com [mailto:drbd-user-
> bounces at lists.linbit.com] On Behalf Of Martin Gombac
> Sent: Monday, March 02, 2009 6:23 AM
> To: drbd-user at lists.linbit.com
> Subject: Re: [DRBD-user] Fwd: DRBD check script
> 
> Yeah, that's one option and really good one.
> But unfortunately i don't have nagios available everywhere, so i'm
> still looking for a simple bash script. :-)
> Regards,
> M.
> 
> On 2, Mar2009, at 12:04 PM, Luca Lesinigo wrote:
> 
> > Il giorno 02/mar/09, alle ore 10:42, Martin Gombac ha scritto:
> >>> before i write my own, has anyone already written the script that
> >>> checks status of drbd devices (connected/consistent status) which
> >>> does an action (sends mail?) upplon inconsistent/disconnected
> >>> filesystem/node?
> >>> If so would he share it with the rest of us?
> >
> > Nagios includes a plugin to check DRBD status:
> >> srv1 ~ # /usr/local/bin/check_drbd -d All
> >> DRBD OK: Device 1 Secondary Connected UpToDate
> > Of course it just follows nagios plugin's interface and will report
> > stuff on stdout.
> >
> > Depending on your situation, you could think about installing a
full-
> > fledged monitoring system (like nagios) or write your own cron job
> > that will send an email if the plugin spits out anything that
doesn't
> > start with "DRBD OK".
> >
> > The check_drbd script itself is written in Perl and is under the GPL
> > license.
> >
> > --
> > Luca Lesinigo
> > LM Networks S.r.l.
> >
> >
> > _______________________________________________
> > drbd-user mailing list
> > drbd-user at lists.linbit.com
> > http://lists.linbit.com/mailman/listinfo/drbd-user
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user



More information about the drbd-user mailing list