Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make status monitor report 'out of date'. #151

Open
grke opened this issue Apr 26, 2013 · 6 comments
Open

Make status monitor report 'out of date'. #151

grke opened this issue Apr 26, 2013 · 6 comments

Comments

@grke
Copy link
Owner

grke commented Apr 26, 2013

I have this on a cron job:

0 6 * * * root /etc/burp/summary_script /etc/burp/burp-server.conf
keeling@spamcop.net 'burp summary' >/dev/null 2>&1

summary_script runs this and puts it in an email:
burp -c /etc/burp/burp-server.conf -a S

The output looks like this:

burp status 2013-04-26 20:52:33

windows idle last backup: 0000008 2013-04-09 01:54:41
grke.net idle last backup: 0000076 2013-04-26 00:02:31
space idle last backup: 0000011 2013-04-22 20:35:10
studio idle last backup: 0000002 2012-05-18 22:31:14
(etc)

All that needs to be added is an option in the conf file to tell it when a
client is to be considered out of date (overridable per client). It could then
put 'out of date' where 'idle' currently is, and summary_script could filter on
those lines.

@klamontagne
Copy link

At the moment I do something like this in a cron to see backups older than yesterday:

burp -a S -c /etc/burp/burp-server.conf | grep -v -e "$(date -d 'yesterday' +%F)" -e "$(date +%F)" -e "^[[:space:]]*$"

It needs better date/time parsing (this one doesn't take the overnight "day change" into account for nightly backups) but it's the same idea.

@pablodav
Copy link
Contributor

pablodav commented Apr 9, 2015

Thanks, this command is very useful.
I have used it to report also older than x days, example:

 burp -a S -c /etc/burp/burp-server.conf | grep -v -e "$(date -d '8 days ago' +%F)" -e "$(date +%F)" -e "^[[:space:]]*$"

I have found more useful information in:
https://www.gnu.org/software/coreutils/manual/html_node/Examples-of-date.html
https://www.gnu.org/software/coreutils/manual/html_node/Options-for-date.html#Options-for-date
http://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html

@pablodav
Copy link
Contributor

After some testing, that line didn't help. Its behaviour was a little bit strange, so I have been working with a friend on it:

Changing comment because I have added a pull request with improvements:
#283

It works to generate the correct list of "Out of date" or "outdated" backups.

Also you can pipe it to send email example:

Also sends email, change the variables to your own email addresses

@grke
Copy link
Owner Author

grke commented Apr 12, 2015

Hello,
Thanks for this, I have added the script to the next 2.0.x release, in configs/server/out_of_date_report_script.

@pablodav
Copy link
Contributor

Pleased to help!

The script doesn't creates: /var/log/burp-custom folder.
So a line for that could be needed too ;)

2015-04-12 8:23 GMT-03:00 grke notifications@github.com:

Hello,
Thanks for this, I have added the script to the next 2.0.x release, in
configs/server/out_of_date_report_script.


Reply to this email directly or view it on GitHub
#151 (comment).

Pablo Estigarribia.

@pablodav
Copy link
Contributor

Just added some changes in #283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants