Questions tagged [systemd-journald]

89 questions
1
vote
1 answer

How to forward logs from docker containers to host journald/syslog service?

I want to send all logs from docker postgresql container to my host journald service. i.e. I want to be able to read docker container logs at host machine using tail -f /var/logs/messages or journald -f here is my docker-compose config: …
Vlad
  • 947
  • 1
  • 10
  • 24
1
vote
0 answers

Docker use journald to collect log but can not remove old log file

I'm using journald to collect docker's file. Journald conf: [Journal] Storage=auto ForwardToSyslog=no ForwardToWall=no SystemMaxUse=100G So I want to delete files larger than 100g. In fact, journald had deleted those files. But I found the Disk…
Wu xiaoyi
  • 11
  • 1
1
vote
1 answer

sd_journal_sendv writing BLOB instead of string

Can please some one explain me how to use sd_journal_sendv system call? I tried to use with below code snippet but input strings are interpreted as BLOB by journald. #include #include #include #include…
rakesh.sahu
  • 465
  • 8
  • 18
1
vote
0 answers

Prevent syslog() messages from going to journal daemon

My application uses syslog() for generating logs that go into specific log files based on rules in rsyslog.conf. Since migrating to Ubuntu 16.04, these logs have also started appearing in journalctl output and the system CPU utilisation of the…
user1474341
  • 125
  • 1
  • 12
0
votes
1 answer

Web.stdout logs stopping randomly on Amazon linux

My EC2 insurance is started by beanstalk and my logging just stops randomly after successfully loghing for a few minutes. But I know my app is still running due to database entries. I restarted journald using systemctl restart systemd-journald and…
0
votes
1 answer

Output bash script to both the journal and console

I'm trying to write a script that will output the results of a command to both the console and journal, while keeping the stderr set at a higher priority than stdout. systemd-cat does it, but it doesn't log the results to the console. I tried using…
Edward
  • 1,407
  • 2
  • 10
  • 15
0
votes
0 answers

How to use the timestamp from the systemd-journal with promtail / loki instead of the generated one?

I use promtail to scrape my systemd journal and sent it to a Grafana Loki server. My problem is, that on busy systems the timestamp is quiet a bit off (between the timestamp shown in the journal on the host and the timestamp shown in…
Brutus
  • 7,139
  • 7
  • 36
  • 41
0
votes
0 answers

How to enable debug level log under OpenBMC using phosphor-logging

I'm bringup up an OpenBMC and modifying an application in it. I added a debug level log but those are not printed though I changed log level using "systemctl log-level debug". For example, Code: } jsonObject["ControllerInfo"] =…
GT Lee
  • 1
  • 1
0
votes
0 answers

Is there a way to keep a file stream entierly in memory?

I want to extract logs from journald on a embedded device running a yocto build. My current solution is using the sd-journal api to iteratively fetch all journal entries and sticking them into a fstream object. This object is then compressed using…
Anders
  • 403
  • 3
  • 17
0
votes
0 answers

Concatenate docker partial logs with journald and Fluentd

I my setup, docker uses journald as a log driver. Fluentd reads logs from journal and pushes to Elasticsearch. Some of logs are even 500k chars long, so docker obviously splits them when they are bigger than 16kB.…
jvr3k5
  • 1
  • 2
0
votes
0 answers

What does this reflexive typedef mean?

I was browsing the Systemd / Journald header files, and in /usr/include/systemd/sd-journal.h, I noticed this line of code: typedef struct sd_journal sd_journal; It seems that the struct sd_journal is defined as... sd_journal. What does this…
Jonathan Wilbur
  • 1,057
  • 10
  • 19
0
votes
0 answers

How to record catalina.out logs in journald?

I have seen a lot of guides with a problem where tomcat does not write logs to catalina.out but writes to journal, but my problem is exactly the opposite, I need logs to be written to catalina.out and journald. I will answer right away why I need…
0
votes
0 answers

How to log kernel messages to /var/log/messages on Yocto system with systemd?

We have a fairly standard Yocto system with Busybox and systemd. We have noticed that kernel messages (visible with dmesg etc) are not logged to /var/log/messages, but are only visible with "journalctl". The system runs all of these: /sbin/klogd…
astrand
  • 1
  • 2
0
votes
1 answer

How to make containerd forward logs to journald

I am using k8s where I am using containerd as CRI. How to make containerd forward logs to journald ? Which and what configuration i must do ?
karlos
  • 807
  • 1
  • 8
  • 38
0
votes
0 answers

Forward journald logs to splunk

We are using the splunk forwarder that runs inside a docker container. We want to use it to forward journal logs to splunk. Here is how our inputs.conf file looks…
ffff
  • 2,853
  • 1
  • 25
  • 44