On 24 Feb 14:26, rs vas wrote: > Thanks Chris, > it is like configure as part of the service configuration? > > StandardOutput=/var/log/log1.log > StandardError=/var/log/log2.log
It would be better to use journald, as the StandardError= might end up in an ever growing file that would be erased on each service restart. Prometheus does not use StandardOutput for its logs. > > > On Monday, February 24, 2020 at 3:20:33 PM UTC-7, rs vas wrote: > > > > using systemd as a service. > > > > On Monday, February 24, 2020 at 3:12:41 PM UTC-7, Christian Hoffmann wrote: > >> > >> Hi, > >> > >> On 2/24/20 11:02 PM, rs vas wrote: > >> > How to configure Prometheus and Alertmanager write logs into a file? > >> > > >> > I could not find any thing as argument to pass > >> > > >> https://github.com/prometheus/alertmanager/blob/master/cmd/alertmanager/main.go#L186 > >> > >> Those binaries log to stderr, as do many other modern services. > >> > >> The usual setup consists of running Prometheus via some service > >> supervisor (e.g. systemd) or container runtime (Docker). > >> Those systems usually support a way to capture those standardized logs > >> and forward them to some place of your liking (e.g. systemd's journald, > >> syslog, etc.). > >> > >> How is Prometheus started in your case? > >> > >> Kind regards, > >> Christian > >> > > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/85aac663-04d6-4d19-909b-7a76ae78de0f%40googlegroups.com. -- (o- Julien Pivotto //\ Open-Source Consultant V_/_ Inuits - https://www.inuits.eu -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/20200224222919.GA31717%40oxygen.
signature.asc
Description: PGP signature

