Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upprometheus could not log to syslog #4420
Comments
This comment has been minimized.
This comment has been minimized.
|
Which was the last version this worked on? |
This comment has been minimized.
This comment has been minimized.
|
Cannot remember exact version ( |
This comment has been minimized.
This comment has been minimized.
|
The flag has been dropped since 2.0.0 (see #3219). There's prometheus/common#136 to add JSON logging to the common log library and eventually to Prometheus. Once that's in, it might be possible to enable back Syslog (no commitment though). |
This comment has been minimized.
This comment has been minimized.
|
JSON would be nice too, but it is syslog that I miss. For systemd-based Linux that is less of an issue, but for other platforms there is no options to catch Prometheus messages except redirecting stdout to a file, which is a bit less flexible than standard syslog. |
This comment has been minimized.
This comment has been minimized.
Agreed. What I wanted to say is that adding JSON logging will bring back the |
This comment has been minimized.
This comment has been minimized.
|
The decision thus far is that supporting stdout is sufficient, as the user can then hook that in however they like whether that be syslog or something else. |
This comment has been minimized.
This comment has been minimized.
ramato-procon
commented
Jul 31, 2018
•
|
currently logs are written to a log file in /tmp folder additionally. Writing logs to /tmp in a docker container is an antipattern IMHO. Therefore there should be an option to disable file logging at all. |
This comment has been minimized.
This comment has been minimized.
|
Prometheus does not write logs to a file, only to stdout. It is something in your setup that is doing that. |
This comment has been minimized.
This comment has been minimized.
ramato-procon
commented
Aug 1, 2018
•
|
Yes, you're right. The logs were created by OpenShift. Excuse me. Nevertheless JSON logging is needed for ELK. |
simonpasquier
added
the
kind/enhancement
label
Aug 7, 2018
This comment has been minimized.
This comment has been minimized.
ntindall
commented
Aug 9, 2018
|
I wrote this to convert logfmt to json .... https://github.com/ntindall/logfmt2json |
This comment has been minimized.
This comment has been minimized.
dlazerka
commented
Sep 25, 2018
•
Actually, prometheus 2.2.1 writes to STDERR, not STDOUT. How to make it write to stdout when I don't have shell access? E.g. I'm running official vanilla |
veksh commentedJul 25, 2018
Prometheus 2.3.2 lost an option for syslog logging (it was looking like
--log.format=logger:syslog?appname=prometheus&local=5), and now has only--log.leveland stderr logging.