Config modification at Prometheus in Openshift cluster

26 views
Skip to first unread message

Andy Andy

unread,
Jul 13, 2021, 7:08:41 AM7/13/21
to Prometheus Users
Hi everyone. Well, i deploy Prometheus on my Openshift cluster, but now I don't know how can i modify config file. Prometheus.yaml and prometheus.env.yaml is read-only and mounted as volume. And i try to look events at config reloaded and i got this: 
     command:
- /bin/prometheus-config-reloader
args:
- '--listen-address=localhost:8080'
- '--reload-url=http://localhost:9090/-/reload'
- '--config-file=/etc/prometheus/config/prometheus.yaml.gz'
- >-
--config-envsubst-file=/etc/prometheus/config_out/prometheus.env.yaml
- '--watched-dir=/etc/prometheus/rules/prometheus-k8s-rulefiles-0'

And i dont know what i should do. Can someone help? Thank a lot. 

Ian Billett

unread,
Jul 13, 2021, 10:44:22 AM7/13/21
to Andy Andy, Prometheus Users
Hey Andy,

I'm going to assume that you are deploying Prometheus via the prometheus-operator? If so, you shouldn't need to modify the configuration file directly, as this will be managed via the Prometheus operator CRDs themselves (i.e. Prometheus, ServiceMonitor etc.)

For Prometheus-operator questions, please reach out to that community directly.

Best,

Ian

--
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/4f56e2b4-bb77-4fe1-a162-cd77915f9d30n%40googlegroups.com.

Andy Andy

unread,
Jul 13, 2021, 3:44:01 PM7/13/21
to Prometheus Users
Thanks a lot for answer. Yes, prometheus operator. But how i can modify that and add targets? I mean i try to edit oc edit servicemonitor prometheus -n openshift-monitoring, but i cant see targets section. Documentation describe many different ways like edit secret, edit basic config file, edit servicemonitor and etc. and i just try to find my initial config. 

вторник, 13 июля 2021 г. в 17:44:22 UTC+3, ibil...@redhat.com:
Reply all
Reply to author
Forward
0 new messages