Closed kevser2761 closed 2 years ago
Could be similar to #723 , try adding -r machine_ip
to your pgbadger invocation.
This could cause the log to be read from the very beginning, but seems to work with version 11.7 and 11.6.
@kevser2761 , as Luca mention this could be related to #723. I have just published a fix, please give a try to latest development code and confirm if it solves your issue.
Commit 6a4750b fixes this issue.
hi, ı tried with -r optıon and my pgbadger verison is 11.7 but ı stıll taking this error code in below and there are new data my log file
no new entries in your log(s) since last run.
The issue should have been fixed, so it is worth getting the latest code out of the git repository and try it. Otherwise, please ensure you command line is like:
/usr/bin/pgbadger -v -r machine_ip --retention 2 -I $LOG_DIR/$LOG_FILE -O $OUTDIR -f stderr --prefix "[%m pid=%p] app=%a user=%u db=%d host=%h sessid=%c txid=%x" --rebuild
and post the output if there are still problems. However, I encourage you to check out HEAD
.
Hi Darold
I am trying to parse and monitor logs from a remote server to a central pg_badger server with pg_badger as follows. However, after the first log file is read, new data added to the log file is not parsed by pg_badger.
pgBadger version 11.7
!/bin/bash
LOG_DIR=/data/dbcluster_name/11/data/log LOG_FILE=postgresql-
(date +'%a')
.log REMOTE_PG=ssh://postgres@machine_ip:22 OUTDIR=/var/www/html/pg_reports_cluster_name/ /usr/bin/pgbadger -v --retention 2 -I -q $REMOTE_PG/$LOG_DIR/$LOG_FILE -O $OUTDIR -f stderr --prefix "[%m pid=%p] app=%a user=%u db=%d host=%h sessid=%c txid=%x" --rebuildcrontab-e 58 /2 /usr/bin/sh /var/lib/pgsql/badgersh/badger_cluster_name.sh >> /var/lib/pgsql/badgersh/badgerout.log 2>&1