Questions tagged [systemd-journald]

89 questions
2
votes
2 answers

Get ISOString in microseconds from unix timestamp

I have a epoch/unix timestamp which I have, which I get after running the journalctl -o json-pretty -f command. So I get my "__REALTIME_TIMESTAMP" : "1576681153604871" value from a given log. I want to convert this to an ISOString format, so I use…
Abbas
  • 3,144
  • 2
  • 25
  • 45
2
votes
1 answer

systemd-journald log location

I am asking what may be a simple question before diving into the source code to see if the answer is out there: Is the /var/log/journal location for systemd journal files hard-coded into the binaries? By that, I do not mean "is it the default?" I…
infopig
  • 33
  • 3
2
votes
1 answer

How to filter journalctl logs for Errors for ASPNET core application hosted on Linux

I have a website built using ASP.NET core 2.0.7 and it is hosted on Ubuntu 16.04. I have done like this https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.0&tabs=aspnetcore2x I use systemd to make it start…
mattias
  • 870
  • 5
  • 18
2
votes
1 answer

How to guarantee the stdout buffer between systemd and journald is flushed when program quits?

The simplified example that demonstrates a problem is #include int main(void) { printf("foo\n"); fflush(stdout); getchar(); return 0; } (it's not programming language specific though - the original application I…
zerkms
  • 249,484
  • 69
  • 436
  • 539
1
vote
0 answers

How to read journal logs from within a service

I have a bluetooth service written in go, let's call it ble-service. I want to add a characteristic to stream logs from the service over bluetooth. My plan is to use "github.com/coreos/go-systemd/v22/sdjournal" to access the local journal from…
1
vote
0 answers

Is journald replacing or adding to syslogd

My /var/log/syslog is containing, that's at least my feeling, the same data as journalctl shows. Is there anything that is solely logged in one of both and is it advisable to remove one of them then in order to safe some space?
ataraxis
  • 1,257
  • 1
  • 15
  • 30
1
vote
1 answer

how to log to journal with mqtt mosquitto

Mosquitto has an extensive logging mechanism. But it seems it only can log against syslog. Is there a way to get logs captured in the systemd's jounal without running it as a service? Note: mosquito runs inside a docker container mosquitto.conf…
woodz
  • 737
  • 6
  • 13
1
vote
1 answer

Query python systemd.journal like journalctl -b and journalctl --list-boots for entries related to last boots

I'm looking for a way to query the information provided by journalctl -b and journalctl --list-boots through python systemd module. I've written a workaround which runs journalctl as a subprocess and parses the output. Maybe there's some more…
c.holtermann
  • 113
  • 1
  • 9
1
vote
3 answers

Why Syslogs from a program is watched from the journal command?

I am working on a program that sends logs with syslog(). Then I configured rsyslog service to save logs in a file under Linux. Most of the time this process works normally. But sometimes, some of the logs are not sent to rsyslog. Instead, I can…
hpirlo
  • 133
  • 1
  • 12
1
vote
1 answer

GUI for JournalCTL

Is there any application/saas solution with a GUI to read/manage and filter logs from journalctl? I am open for a native solution (osx preferred) as well for something running in the browser.
Silicium
  • 435
  • 8
  • 18
1
vote
1 answer

How to filter Journald PRIORITY in Vector?

I'm trying to limit the journald logs my vector config picks up but it appears not to work. There are no error messages. Vector is sending all logs to loki. The vector version is 0.22.2. Here is my vector.toml…
markhorrocks
  • 1,199
  • 19
  • 82
  • 151
1
vote
0 answers

Send all journal logs to server

I can view journal logs with journalctl How can I configure that all this log will send to my simple TCP server? I didn't find any configuration in journald.conf
1
vote
1 answer

QNX Slogger2 Vs Syslog

What is the difference between Slogger2 (System Logger) and Linux based syslog? I understand the difference between journald and syslog. Slogger2 also gives a way to redirect syslog messages to slogger2. Is it QNX's version of syslog as it deals…
TonyParker
  • 2,024
  • 5
  • 18
  • 27
1
vote
1 answer

Exporting logs using journald / rsyslogd

I am trying to export kernel logs (/var/log/messages) to remote Syslog servers. Till now, most of the system logs are stored in journald currently and rsyslogd is disabled. So, I am planning to use rsyslogd to export logs (By configuring the…
1
vote
1 answer

Is systemctl edit systemd-journald a proper way to configure systemd-jounald.service?

I started to learn Linux not long ago and have read some instructions about systemd and journald. My question is: Is systemctl edit systemd-journald a proper way to configure systemd-journald.service? According to the man page of journald.conf.d, we…
krave
  • 1,629
  • 4
  • 17
  • 36