We are trying to substitute the prometheus.yaml
in /etc/metrics/conf
as it hosts older rules. We try to copy new rules file:
RUN mkdir -p /etc/metrics/conf
COPY conf/prometheus.yaml /etc/metrics/conf/prometheus.yaml
But the rules are not picked up and prometheus still ignores the new metrics.
Sad truth is that in fact the folder and file is alredy there (looks like a symlink to /etc/metrics/conf/..data/prometheus.yaml
location).
We had to work it around with
copying files to new location
COPY conf/prometheus.yaml /etc/metrics/conf2/prometheus.yaml
add configFile parameter to the helm chart:
configFile: "/etc/metrics/conf2/prometheus.yaml"
That causes javaagent's properties passed to jmx-exporter to use this new prometheus.yaml
location