Unable to configure logging #12464
Replies: 4 comments
-
Prometheus logs everything into one stream, you are correct. In general, it's best to have the context of a log message and I don't think splitting them into multiple streams would be beneficial. |
Beta Was this translation helpful? Give feedback.
-
Hi Julien, |
Beta Was this translation helpful? Give feedback.
-
@roidelapluie |
Beta Was this translation helpful? Give feedback.
-
In general you could do the splitting with a wrapper script:
|
Beta Was this translation helpful? Give feedback.
-
What did you do?
Set up /etc/prometheus/prometheus.yml and configured /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Restart=always
Type=simple
ExecStart=/usr/local/bin/prometheus
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/var/lib/prometheus/
--storage.tsdb.retention.time=7d
--web.console.templates=/etc/prometheus/consoles
--web.console.libraries=/etc/prometheus/console_libraries
--web.listen-address=0.0.0.0:8095
--log.level=debug \
[Install]
WantedBy=multi-user.target
What did you expect to see?
Want the Debug/Error/Info logs to be saved to separate files.
What did you see instead? Under which circumstances?
As of now I can see all logs going to /var/log/syslog
System information
Linux 5.15.0-1031-aws x86_64
Prometheus version
Prometheus configuration file
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
Beta Was this translation helpful? Give feedback.
All reactions