COPYRIGHT

 
This software is Copyright (c) 2009 NETWAYS GmbH, William Preston
                               <support@netways.de>

(Except where explicitly superseded by other copyright notices)


LICENSE

This work is made available to you under the terms of Version 2 of the GNU General Public License. A copy of that license should have been provided with this software, but in any event can be snarfed from http://www.fsf.org.

This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 or visit their web page on the internet at http://www.fsf.org.

CONTRIBUTION SUBMISSION POLICY:

(The following paragraph is not intended to limit the rights granted to you to modify and distribute this software under the terms of the GNU General Public License and is only of importance to you if you choose to contribute your changes and enhancements to the community by submitting them to NETWAYS GmbH.)

By intentionally submitting any modifications, corrections or derivatives to this work, or any other work intended for use with this Software, to NETWAYS GmbH, you confirm that you are the copyright holder for those contributions and you grant NETWAYS GmbH a nonexclusive, worldwide, irrevocable, royalty-free, perpetual, license to use, copy, create derivative works based on those contributions, and sublicense and distribute those contributions and any derivatives thereof.

Nagios and the Nagios logo are registered trademarks of Ethan Galstad.


NAME

check_sepsesam


SYNOPSIS

Shows the status of backup jobs


OPTIONS

check_sepsesam [options]

--warning

warning level - if there are less than this number of successful backups then warn

--critical

critical level - if there are less than this number of successful backups then return critical

--anyerror

return critical if any backup was not successful (overrides warning/critical values)

--noperfdata

disable performance data (if graphing is not required)

--lastcheck

The time of the last check in seconds since 1 Jan 1970 (unixtime)

--until

Ignores any backups COMPLETED after this date (in the same format as lastcheck)

--host

The hostname to check. Multiple values may be separated by commas

--task

The task name to check. Multiple values may be separated by commas


DESCRIPTION

This plugin checks the status of backups in the SEP Sesam Database.

It requires that the Sesam init script has been sourced; e.g. add the following line to /etc/init.d/nagios . /var/opt/sesam/var/ini/sesam2000.profile

The plugin checks the status of all backups which match the Host / Task that have been completed since the last check and delivers the data in multi-line format.

It is possible to separate multiple hosts and/or tasks with commas.

Backups that are still running will not be included in the results.


EXAMPLES

check_sepsesam.pl -H host1 -T testbackup -l $LASTSERVICECHECK$

- checks all backups with name testbackup on host1 since the last check; always returns OK

check_sepsesam.pl -H host1,host2,host3 -T testbackup,fullbackup -l $LASTSERVICECHECK$ -w 2 -c 1

- checks various tasks on host1, host2 and host3. Returns a warning if less than 2 were successful. Returns a critical if less than 1 was successful

check_sepsesam.pl -H host1,host2,host3 -T backup -l $LASTSERVICECHECK$ --anyerror

- returns a critical if any of the matching backups failed

check_sepsesam.pl --lastcheck `date -d ``yesterday 08:00'' +%s` --until `date -d ``today 08:00'' +%s` --anyerror

- checks all hosts between two dates