0

I have one central cluster on which my promethus and grafana Dashboard are configured. The idea is to use this central cluster and export metrics from different clusters and view it on central cluster. Each application has its own grafana dashboard. So my idea is to install kube-state-metrics and node_exporter on my kubernetes clusters and export in metrics using ingress controller.

And i am able to do it if i use one exporter at a time. But my idea to use both exporter. The problem is Kube state metrics service exposes all the metrics on /metrics URI and node_exporter also exposes all the metrics on /metrics URI.

Now is the an way in which i can customize kube-state-metrics endpoint to use it in my ingress controller.

E.G.

    http:
        paths:
          - path: /kube/metric/metrics
            backend:
              serviceName: kube-state-metrics
              servicePort: 8080
          - path: /metrics
            backend:
              serviceName: node-exporter
              servicePort: 9100
Vikram Pathania
  • 873
  • 2
  • 8
  • 15
  • A few questions to better understand the setup. 1) am I right that you have multiple k8sclusters? What is the "one central cluster"? 2) what do you mean by "Export Metrics from different clusters" ? As far as I know Prometheus _scrapes_ (imports) data exposed by targets (so we talk about _Import_ here) and exposes them (as well as `kube-state-metrics` does) As `kube-state-metrics` exposes metrics on :8080 and `node_exporter` exposes on :9090 ... Do you merely need help with writing an yaml for ingress that will serve both `fqdn:8080/metrics` and `fqdn:9100/metrics` ? – Nick Jun 16 '20 at 12:25
  • Hi Nick, I am using NetworlLoadBlanacer which talks to Ngnix Ingress Controller on secured port. Then we have configured Ingress this means that in my case url is always , fqdn_nlb:Port/metrics. And then it goes to ingress configuration to call right service. paths: - path: /kube/metrics backend: serviceName: kube-state-metrics servicePort: 8080 - path: /metrics backend: serviceName: node-exporter servicePort: 9100 – Vikram Pathania Jun 17 '20 at 06:26
  • Guys, Just to add to this i am using Network Load balancer as host and that cannot be changed. – Vikram Pathania Jun 17 '20 at 07:32
  • is it still actual? Did you find the solution? – Nick Aug 05 '20 at 14:26

0 Answers0