0
votes

We are using Prometheus to monitor our kubernetes. I was going through kubernetes dashboard code. API's are there to access heapster(Being removed soon) metrics. I am wondering, is there any way we can integrate prometheus data into kubernetes dashboard? I am thinking we need to write new API's to access prometheus data and return them in same format as kubernetes dashboard expects.(i.e heapster API's format).

Please suggest if any other better approaches available to integrate.

PS: Not interested in hosting grafana dashboard to access premethus data.

2

2 Answers

1
votes

For now the answer is no.

This was already asked on GitHub will dashboar support prometheus?.

@floreks wrote:

It was planned at some point, but we do not have enough devs and time to work on such integrations right now. It will be added at some point for sure. I'd love to only use kubernetes metrics API and get rid of heapster/prometheus hard dependencies. I'll have to investigate if this is possible.

You need a way of storing the values somehow, as right now you are getting once current value:

http://10.110.17.88:8080/apis/metrics.k8s.io/v1beta1/nodes/node2 response is:

{ "kind": "NodeMetrics", "apiVersion": "metrics.k8s.io/v1beta1", "metadata": { "name": "node2", "selfLink": "/apis/metrics.k8s.io/v1beta1/nodes/node2", "creationTimestamp": "2017-11-10T09:57:48Z" }, "timestamp": "2017-11-10T09:57:00Z", "window": "1m0s", "usage": { "cpu": "185m", "memory": "2471876Ki" } }
0
votes

I think you need to write your own parser for Prometheus data to use it with kubernetes dashboard, but what about metrics-server, I guess it is a solution you are looking for, but please also check rancher.