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

tail_n_mail searches old logs, but only once per day? #27

Open
dtseiler opened this issue Feb 26, 2018 · 0 comments
Open

tail_n_mail searches old logs, but only once per day? #27

dtseiler opened this issue Feb 26, 2018 · 0 comments

Comments

@dtseiler
Copy link

Using version 1.31.3

$ ./tail_n_mail --version
./tail_n_mail version 1.31.3

Configured to just use the latest log file:

FILE1: /var/lib/pgsql/9.6/data/pg_log/LATEST
LASTFILE1: /var/lib/pgsql/9.6/data/pg_log/postgresql-2018-02-26_000000.log
OFFSET1: 2551862

Scheduled to run every 5 minutes:
*/5 * * * * /var/lib/pgsql/dba/bin/tail_n_mail /var/lib/pgsql/dba/etc/tnm.conf

However, at 00:05 (12:05 AM) every day, I get one report that lists errors in log files from many days ago. For example, the past 4 days, I've gotten alerts from maintenance work that was done on Feb 22:

Total matches: 25
Matches from [A] /var/lib/pgsql/9.6/data/pg_log/postgresql-2018-02-22_000000.log: 20
Matches from [B] /var/lib/pgsql/9.6/data/pg_log/postgresql-2018-02-22_101921.log:  3
Matches from [C] /var/lib/pgsql/9.6/data/pg_log/postgresql-2018-02-22_102154.log:  2

I'm curious as to the following:

  • Why am I getting these after that event has long passed and it isn't in the LASTFILE1? Why is tail_n_mail even looking in those 2018-02-22 log files?
  • Why do I get these alerts only at 12:05 AM? tail_n_mail runs every 5 minutes throughout the day, and tnm.conf gets updated every time.

Regardless it seems like a bug. I don't have tail_n_mail scheduled to run from anywhere else.

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

No branches or pull requests

1 participant