pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgBadger: Cannot find any log entries from systemd-journald
5+ messages / 3 participants
[nested] [flat]

* pgBadger: Cannot find any log entries from systemd-journald
@ 2024-03-05 08:13  Frank Lanitz <frank@frank.uvena.de>
  0 siblings, 2 replies; 5+ messages in thread

From: Frank Lanitz @ 2024-03-05 08:13 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Hello,

I think I just might did a small configuration issue, but somehow I cannot figure it out by myself.

I want to let pgbadger directly fetch data from journald -- so I was using with a unexpected outcome:

$ pgbadger --journalctl "journalctl -u postgresql.service"
LOG: Ok, generating html report...s: 0, events: 0

Having a look into the journal there is a lot of

---cut----
Mar 05 09:06:23 myhost postgres[441820]: 2024-03-05 08:06:23 GMT [441820]: user=[unknown],db=[unknown],app=[unknown],client=xxx LOCATION:  BackendInitialize, postmaster.c:4373
Mar 05 09:06:23 myhost postgres[441820]: 2024-03-05 08:06:23 GMT [441820]: user=[unknown],db=[unknown],app=[unknown],client=xxx LOG:  00000: connection received: host=xxx port=34574
Mar 05 09:06:10 myhost postgres[441805]: 2024-03-05 08:06:10 GMT [441805]: user=postgres,db=xxx,app=psql,client=[local] LOCATION:  log_disconnections, postgres.c:4722
Mar 05 09:06:10 myhost postgres[441805]: 2024-03-05 08:06:10 GMT [441805]: user=postgres,db=xxx,app=psql,client=[local] LOG:  00000: disconnection: session time: 0:00:00.016 user=postgres database=xxx host=[local]
Mar 05 09:06:10 myhost postgres[441805]: 2024-03-05 08:06:10 GMT [441805]: user=postgres,db=xxx,app=[unknown],client=[local] LOCATION:  PerformAuthentication, postinit.c:292
Mar 05 09:06:10 myhost postgres[441805]: 2024-03-05 08:06:10 GMT [441805]: user=postgres,db=xxx,app=[unknown],client=[local] LOG:  00000: connection authorized: user=postgres database=xxx application_name=psql
---cut---

My psotgresql.conf looks like:
---cut----
log_autovacuum_min_duration = 0
log_checkpoints = yes
log_connections = yes
log_destination = 'stderr'
log_disconnections = yes
log_error_verbosity = 'verbose'
log_line_prefix = '%t [%p]: user=%u,db=%d,app=%a,client=%h '
log_lock_waits = yes
log_min_duration_statement = 100
log_temp_files = 0
---cut----

Any idea what I missed or did wrong?

Cheers,
Frank





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgBadger: Cannot find any log entries from systemd-journald
@ 2024-03-05 18:21  grimy.outshine830@aceecat.org
  parent: Frank Lanitz <frank@frank.uvena.de>
  1 sibling, 1 reply; 5+ messages in thread

From: grimy.outshine830@aceecat.org @ 2024-03-05 18:21 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On Tue, Mar 05, 2024 at 09:13:48AM +0100, Frank Lanitz wrote:

I don't actually know pgbadger, but:

> $ pgbadger --journalctl "journalctl -u postgresql.service"
> LOG: Ok, generating html report...s: 0, events: 0

Try as root? Or is pgbadger a setuid program?

-- 
Ian





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgBadger: Cannot find any log entries from systemd-journald
@ 2024-03-06 10:39  Frank Lanitz <frank@frank.uvena.de>
  parent: grimy.outshine830@aceecat.org
  0 siblings, 0 replies; 5+ messages in thread

From: Frank Lanitz @ 2024-03-06 10:39 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hello,

Am 05.03.24 um 19:21 schrieb grimy.outshine830@aceecat.org:
> On Tue, Mar 05, 2024 at 09:13:48AM +0100, Frank Lanitz wrote:
>
> I don't actually know pgbadger, but:
>
>> $ pgbadger --journalctl "journalctl -u postgresql.service"
>> LOG: Ok, generating html report...s: 0, events: 0
>
> Try as root? Or is pgbadger a setuid program?

No difference. The user executed under is having also rights to see the journal.

Cheers,
Frank





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgBadger: Cannot find any log entries from systemd-journald
@ 2024-03-06 15:40  Greg Sabino Mullane <htamfids@gmail.com>
  parent: Frank Lanitz <frank@frank.uvena.de>
  1 sibling, 1 reply; 5+ messages in thread

From: Greg Sabino Mullane @ 2024-03-06 15:40 UTC (permalink / raw)
  To: Frank Lanitz <frank@frank.uvena.de>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Tue, Mar 5, 2024 at 3:14 AM Frank Lanitz <frank@frank.uvena.de> wrote:

> $ pgbadger --journalctl "journalctl -u postgresql.service"
>

You could try adding --verbose to see if it gives more clues.


> Having a look into the journal there is a lot of
>

None of the snippets from journald you showed were actually things pgbadger
cares about, FWIW. You can get an idea of what is actually parsed by
running "journalctl -u postgresql --output=short-iso"

log_error_verbosity = 'verbose'
>

This is probably not needed, and there is a finite chance that the extra
context is confusing pgbadger.

Cheers,
Greg

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: pgBadger: Cannot find any log entries from systemd-journald
@ 2024-03-12 07:53  Frank Lanitz <frank@frank.uvena.de>
  parent: Greg Sabino Mullane <htamfids@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Frank Lanitz @ 2024-03-12 07:53 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hello,

Sorry for the late response.

Am 06.03.24 um 16:40 schrieb Greg Sabino Mullane:
> On Tue, Mar 5, 2024 at 3:14 AM Frank Lanitz <frank@frank.uvena.de <mailto:frank@frank.uvena.de>> wrote:
> 
>     $ pgbadger --journalctl "journalctl -u postgresql.service"
> 
> 
> You could try adding --verbose to see if it gives more clues.

No, unfortunately not. Though, it adds some more nice information in general, but none that actually helped me.

>     Having a look into the journal there is a lot of
> 
> 
> None of the snippets from journald you showed were actually things pgbadger cares about, FWIW. 

It was just an random pick to show there is a bunch of logging -- I also can see checkpoints and vacuum etc. I just didn't want to paste 1GB of log ;)

You can get an idea of what is actually parsed by running "journalctl -u postgresql --output=short-iso"

Looks good to me.

>     log_error_verbosity = 'verbose'
> 
> 
> This is probably not needed, and there is a finite chance that the extra context is confusing pgbadger.

I tried to change it, but in my case no difference.

Cheers,
Frank





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2024-03-12 07:53 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 08:13 pgBadger: Cannot find any log entries from systemd-journald Frank Lanitz <frank@frank.uvena.de>
2024-03-05 18:21 ` grimy.outshine830@aceecat.org
2024-03-06 10:39   ` Frank Lanitz <frank@frank.uvena.de>
2024-03-06 15:40 ` Greg Sabino Mullane <htamfids@gmail.com>
2024-03-12 07:53   ` Frank Lanitz <frank@frank.uvena.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox