query_log_file config is not effective

40 views
Skip to first unread message

Chari

unread,
Feb 22, 2021, 9:41:38 AM2/22/21
to promethe...@googlegroups.com
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://influx.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

Julius Volz

unread,
Feb 23, 2021, 4:52:55 AM2/23/21
to Chari, Prometheus Users
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

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CADAB8wgJEBFcYe1y6pNRPN3W%2BVUbsm0isjqV%3DCO-7DnEhZmfWg%40mail.gmail.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages