Rancher Cluster Monitoring + Prometheus Operator?

9/3/2019

I'm managing several k8s clusters with Rancher. I've setup most of them with cluster monitoring apps from Rancher (so graphs and grafana links show up in rancher under workload monitoring, etc etc).

Question: Is there a way to configure Rancher to pull metrics/graphs from prometheus-operator instead?

I've asked this in Slack, and have not gotten an answer or response at all.

Reason: seems I can configure/add additional configurations (configmaps) to prometheus-operator, that I cannot add to prometheus installed through Rancher's cluster monitoring app.

Rancher installed prometheus-operator, but in the app says to not touch it (screenshot) enter image description here

Edit:

This is what I was after all along:

additionalScrapeConfigs:[]

https://github.com/rancher/system-charts/blob/dev/charts/rancher-monitoring/v0.0.3/charts/prometheus/values.yaml#L61

and

storageSpec: {}

https://github.com/rancher/system-charts/blob/dev/charts/rancher-monitoring/v0.0.3/charts/prometheus/values.yaml#L35

Unlike in coreos/prometheus-operator chart: answer for rancher-monitoring app should be:

prometheus:
  additionalScrapeConfigs: []
# - job_name: "prometheus"
#   static_configs:
#   - targets:
#     - "localhost:9090"
  remoteWrite: []
# - url: http://remote1/push
-- i5okie
kubernetes
prometheus-operator
rancher

0 Answers