On 2/6/07, Hubbard, Greg L <user-d970b5e56ec9@xymon.invalid> wrote:
I think all you need is a Perl script to prompt for the start time, then
have it read the notification log, skipping everything that is older
than the entered time. You will have to parse each notification entry
for the notification time, convert it to an internal format, and then
compare to the time you get from the form.
You might be able to do it in shell, but I am not sure what could be
used to convert times into something that can be compared.
If you're on a system with the GNU 'date' program, you can feed it a
date and use the format string to get seconds-since-the-epoch:
e.g. date +%s --date="2/6/2007 14:00"
give you: 1170792000
Then you can do math on that using expr.
I'm using that for tracking SSL cert expiry.
Ralph Mitchell