Score:0

Sending InfluxDB2 Logs to dedicated Logfile

ps flag

On Debian, my Influxdb2 v2.6 instance runs with systemd and writes the logs to stdout. But I want to send the logs to a dedicated logfile like /path/to/influxdb.log.

How can I change this behavior? The Docs says, I have to change the startup parameter to influxd 1> /path/to/influxdb.log. But where is this config located? I assume somewhere inside the /usr/lib/influxdb/scripts/influxd-systemd-start.sh file.

Score:0
ps flag

I have found the solution!

First, create an empty Logfile with proper Permissions:

touch /path/to/influxdb.log
chown influxdb /path/to/influxdb.log

Second, modify the the startup script. Inside the file /usr/lib/influxdb/scripts/influxd-systemd-start.sh the first line has to change to:

/usr/bin/influxd 1> /path/to/influxdb.log &

Furthermore, it should be ensured that the following entries are present in /etc/influxdb/config.toml:

log-level = "info"

After restarting the service, the logs are where they should be.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.