Hi Team, We are currently looking to fetch Rancher...
# rancher-setup
d
Hi Team, We are currently looking to fetch Rancher metrics to list all available clusters along with their status (Active/Inactive, etc.), similar to what is visible in the Rancher UI. At the moment, we are unable to find a suitable Prometheus exporter that provides: • Cluster listing from Rancher • Cluster health/status information Since some exporters (like the Rancher Prometheus exporter) are now deprecated/archived, we are exploring alternative approaches. If anyone has experience or suggestions on: • Fetching cluster details via Rancher API • Any custom exporter / workaround • Existing monitoring integrations for this use case please share your inputs.
h
we ended up deploying monitoring app on each cluster local and downstream and then on each cluster expose prometheus endpoint that get added as datasource in centralized grafana.
t
Does the monitoring app query rancher APIs to get latest clusters status and parse to prometheus ? Can you share details on how is this done?
d
Can you please share details on how is this done?
h
In Rancher UI, under Apps there is an option for Monitoring, deploy that app once it is deployed, create an Ingress, I think the service runs on port 9090 then add that ingress URL as datasource in your Grafana
d
Yes, I can see the Prometheus components under the Monitoring app. So just to confirm — did you deploy a custom setup to fetch cluster status and push those metrics to Grafana?
h
nope, just this app
with monitoring app, you have an option to deploy grafana I exported those grafana dashboards and imported them into centralized grafana
d
Got it. However, our setup is a bit different. We already have a Prometheus agent deployed in each cluster, and we’re using Thanos as a centralized layer for aggregation and visualization. What we’re specifically looking for is a metric (via Prometheus/Thanos or Rancher) that can reliably indicate: • Cluster availability status (active/inactive / reachable vs unreachable) • Critical health conditions (e.g., memory pressure, node not ready, etc.) In our current workflow, developers download the kubeconfig from Rancher UI to access clusters. If a cluster goes down, they won’t be able to connect — but by the time they report it, it’s already reactive. We want to shift this to a proactive approach by setting up alerts (via Thanos or Rancher) to notify us immediately when: • A cluster becomes unreachable • Control plane or nodes go into unhealthy states Please let me know if there are any existing metrics, exporters, or recommended approaches to achieve this.
h
I do not use Thanos In Grafana there is an alerting option which is what I use to alert on Slack when such events occur In monitoring app, there is also an option to deploy alert manager - granted this is not exactly what you are looking for, but you will have to figure out how to do that with Thanos
d
Understood. But our requirement is slightly different. This is not specific to Thanos or Grafana, since both ultimately rely on Prometheus for scraping metrics. What we are specifically looking for is Rancher-related metrics exposed via Prometheus. Currently, we already have Prometheus agents scraping cluster-level metrics, but we are unable to find any exporter or native metrics endpoint from Rancher that provides: • Cluster registration/status (active/inactive) • Rancher-managed cluster health visibility It seems there are no maintained Prometheus exporters for Rancher at the moment. We are exploring if there is any supported approach (native metrics, API-based exporter, or integration) to expose Rancher cluster state into Prometheus.
Please let us know if you’ve come across any such solution.
https://github.com/David-VTUK/prometheus-rancher-exporter one example but this repo is deprecated
Any idea from anyone?