Logging Configuration

1,874 views
Skip to first unread message

ron...@gmail.com

unread,
Jun 28, 2017, 7:05:47 AM6/28/17
to Prometheus Users
I have several questions regarding logs - specifically using a file:

1. Is there an easy way to prevent it from filling the disk e.g. rolling file?
2. Could I set a log level via configuration file and not only by CLI?
3. Is there another way to use a link mount file besides the Linux pipeline i.e. /bin/prometheus > /log/log file 2>&1

I have read the documentation and found only this:

$ prometheus -h
...
 
== LOG ==
 
   
-log.format "\"logger:stderr\""
     
Set the log target and format. Example:
     
"logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"

Are those the only two options - stderr and syslog?

Thanks in advance.

Matthias Rampke

unread,
Jun 29, 2017, 3:16:12 AM6/29/17
to ron...@gmail.com, Prometheus Users

1. logrotate, or see 3.
2. no
3. you could use svlogd (from the runit package), it also handles rotation for you. Or, on systemd based systems, just let journald handle everything for you.

/MR


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/6f6161fa-e878-4681-8e71-84840f465ce4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages