Search
j0ke.net Open Build Service
>
Projects
>
internetx
>
nagios-plugins-automysqlbackup
> check_automysqlbackup
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File check_automysqlbackup of Package nagios-plugins-automysqlbackup
#!/bin/bash BASEPATH="/backup/mysql/localhost/daily/" [ -f /etc/nagios/check_automysqlbackup.conf ] && . /etc/nagios/check_automysqlbackup.conf count=$( find ${BASEPATH}. -type f -name '*.bz2' -o -name '*.gz' -o -name '*.sql' -mtime 0 | wc -l ) if [ $count -gt 0 ] ; then echo "OK: found $count table backup files" exit 0 else echo "ERROR: Latest MySQL backup is older than 24 hours, please check!" exit 2 fi echo "UNKOWN" exit 3