Components required for OpenShift monitoring using Prometheus

479 views
Skip to first unread message

Giles Ogram

unread,
Feb 22, 2018, 7:30:56 AM2/22/18
to Prometheus Users
Hi,
I am trying to understand the components needed to get Prometheus and Grafana collecting/displays data from our OpenShift Cluster.
(we have OpenShift Logging and Metrics already installed but would like dashboard based views)
Reading some of the great blogs out there, I am now too confused!
I currently have a vm running Prometheus & Grafana, together with node_exporter installed on each OpenShift nodes.
That is working in terms of I am getting data back about the nodes and the nodes are showing as "UP" in the Prometheus Targets menu.

I would like now to get containers metrics, and I think I need to deploy cAdvisor on each node too? Is this correct?

I think that I need to add the kubernetes_sd_config section within the prometheus.yml file (as per the example on prometheus.io)?

One final question, would running Prometheus & Grafana in containers on the OpenShift Cluster be a good/best option?

Thanks in advance
Giles
 

Simon Pasquier

unread,
Feb 22, 2018, 7:43:27 AM2/22/18
to Giles Ogram, Prometheus Users
On Thu, Feb 22, 2018 at 1:30 PM, Giles Ogram <gog...@gmail.com> wrote:
Hi,
I am trying to understand the components needed to get Prometheus and Grafana collecting/displays data from our OpenShift Cluster.
(we have OpenShift Logging and Metrics already installed but would like dashboard based views)
Reading some of the great blogs out there, I am now too confused!
I currently have a vm running Prometheus & Grafana, together with node_exporter installed on each OpenShift nodes.
That is working in terms of I am getting data back about the nodes and the nodes are showing as "UP" in the Prometheus Targets menu.

I would like now to get containers metrics, and I think I need to deploy cAdvisor on each node too? Is this correct?

cAdvisor metrics are already exposed by kubelet. You've got nothing else to deploy.
 

I think that I need to add the kubernetes_sd_config section within the prometheus.yml file (as per the example on prometheus.io)?

Just make sure to pick the branch that corresponds to your OpenShift release.
 

One final question, would running Prometheus & Grafana in containers on the OpenShift Cluster be a good/best option?

Yes. See the link above.
 

Thanks in advance
Giles
 

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f52f878d-66a6-4272-bd9f-8b0dcd93dd79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Stringer

unread,
Feb 22, 2018, 10:40:43 AM2/22/18
to Prometheus Users
Just to add another point to this, kubelet has the ability to publish cadvisor data. There is a parameter `--cadvisor-port` that is commonly set to 0, in which case it won't be bound and externally you wouldn't be able to pull container metrics.

I'm currently dealing with this particular issue on a separate project. It seems like if `--cadvisor-port=0` the best approach _may_ be to deploy cadvisor as a separate daemonset. I'm still proving this out, though.


On Thursday, February 22, 2018 at 7:43:27 AM UTC-5, Simon Pasquier wrote:
On Thu, Feb 22, 2018 at 1:30 PM, Giles Ogram <gog...@gmail.com> wrote:
Hi,
I am trying to understand the components needed to get Prometheus and Grafana collecting/displays data from our OpenShift Cluster.
(we have OpenShift Logging and Metrics already installed but would like dashboard based views)
Reading some of the great blogs out there, I am now too confused!
I currently have a vm running Prometheus & Grafana, together with node_exporter installed on each OpenShift nodes.
That is working in terms of I am getting data back about the nodes and the nodes are showing as "UP" in the Prometheus Targets menu.

I would like now to get containers metrics, and I think I need to deploy cAdvisor on each node too? Is this correct?

cAdvisor metrics are already exposed by kubelet. You've got nothing else to deploy.
 

I think that I need to add the kubernetes_sd_config section within the prometheus.yml file (as per the example on prometheus.io)?

Just make sure to pick the branch that corresponds to your OpenShift release.
 

One final question, would running Prometheus & Grafana in containers on the OpenShift Cluster be a good/best option?

Yes. See the link above.
 

Thanks in advance
Giles
 

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages