Hi Raghav, It works for me, could you share which Prometheus version you are running? And are there any errors in the log output of Prometheus itself? Although Prometheus should not even start if that file cannot get created...
Btw., your pasted YAML doesn't seem to be indented correctly, at least starting at the "alerting" section, but I bet that's just a copy&paste issue. Regards, Julius On Mon, Feb 22, 2021 at 3:41 PM Chari <[email protected]> wrote: > Hi All, > > We have below prometheus.yaml config for enabling query_log_file > > global: > scrape_interval: 1m > scrape_timeout: 10s > evaluation_interval: 2m > query_log_file: /prometheus/query.log > external_labels: > prometheus: monitoring/k8s > prometheus_replica: prometheus-k8s-0 > alerting: > alert_relabel_configs: > - separator: ; > regex: prometheus_replica > replacement: $1 > action: labeldrop > remote_read: > - url: http://i > <http://data-influxdb.tick:8086/api/v1/prom/read?db=monitoringdb&rp=shortterm&u=opsuser&p=Rafay!176>nflux.db?user=user&pwd=pwd > read_recent: true > remote_timeout: 1m > > But no file with name `/prometheus/query.log` is created. > > Prometheus has write permission to this directory. Pls let me know what else > I have to do to get query logs written to the configured file. > > Regards, > Raghav > > -- > 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/CADAB8wgJEBFcYe1y6pNRPN3W%2BVUbsm0isjqV%3DCO-7DnEhZmfWg%40mail.gmail.com > <https://groups.google.com/d/msgid/prometheus-users/CADAB8wgJEBFcYe1y6pNRPN3W%2BVUbsm0isjqV%3DCO-7DnEhZmfWg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- 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/CAObpH5wEKxXMeJiQrupJ4W_cpy2RLmo5P5tCOUg%3D7YeyvbUZ6w%40mail.gmail.com.

