[Box Backup] monitoring bbackupd

Scott McNee boxbackup@fluffy.co.uk
Fri, 26 Aug 2005 09:34:33 +1000


Thankyou.

Scott McNee

=20


-----Original Message-----
From: boxbackup-admin@fluffy.co.uk [mailto:boxbackup-admin@fluffy.co.uk] =
On
Behalf Of Martin Ebourne
Sent: Friday, 26 August 2005 9:32 AM
To: boxbackup@fluffy.co.uk
Subject: RE: [Box Backup] monitoring bbackupd


On Fri, 2005-08-26 at 08:49 +1000, Scott McNee wrote:
> Hi Martin,
> 		Any chance of saving some work and getting a copy of the
script?

I put restart_service (attached) in /etc/nagios/eventhandlers. It's a
generic service restart script, so can be used for anything including
bbstored and bbackupd.

In misccommands.cfg I have:

define command {
  command_name restart_service
  command_line $USER6$/restart_service "$SERVICESTATE$" "$STATETYPE$"
"$SERVICEATTEMPT$" "$SERVICEDESC$" >> /var/log/nagios/event_handler.log =
2>&1
}

You'll need to make sure $USER6$ is set for the restart_service script
location, or hard-code it.

I then have the following in services.cfg:

define service {
  use                           generic-service
  host_name                     hordein
  service_description           bbackupd
  check_command                 check_service!bbackupd
  event_handler                 restart_service
}

define service {
  use                           generic-service
  host_name                     hordein
  service_description           bbstored
  check_command                 check_service!bbstored
  event_handler                 restart_service
}

You'll need a suitable generic-service set up.

If you want to get a central machine to monitor remote ones then use the
same script on the remote machine and set up nrpe. If you need help with
that then I think the nagios lists would be more appropriate.

One day I'll write one that uses bbackupquery to log in and check the =
store
out, free space etc.

This is all on Fedora Core. YMMV.

Cheers,

Martin.