2

I enabled monitoring for my project in Rancher UI, and it installed succesfully. But when I click "Go to grafana" at my workload (such as nginx), it moves to Grafana dashboard, but Grafana show nothing: 0 CPU, 0 memory, 0 networking ,...

  • Why doesn't it have data ?
  • And how I can know consumed quota of my resource (workload, service, pod)?

Please see my screenshots:

enter image description here enter image description here Many thanks

Andrew Regan
  • 5,087
  • 6
  • 37
  • 73
taibc
  • 897
  • 2
  • 15
  • 39

1 Answers1

1

Prometheus is necessary component for using Grafana.

You can check this blogpost:

Kubernetes Monitoring with Prometheus, Grafana and Rancher

Prometheus is an open-source application for monitoring systems and generating alerts. ... Prometheus will scrape targets at designated intervals and store the information in a time-series database.

Grafana is also open source and runs as a web application. ... Grafana makes it easy to create graphs and assemble those graphs into dashboards.

Check, if check if Prometheus is turned on and whether it is configured correctly:

Configuring Project Monitoring

From the Global view, navigate to the project that you want to configure project monitoring.

  • Select Tools > Monitoring in the navigation bar.

  • Select Enable to show the Prometheus configuration options. Enter in your desired configuration options.

  • Click Save.

Also check these settings:

Prometheus Configuration

  • Enable Persistent Storage for Prometheus Whether or not to configure storage for Prometheus so that metrics can be retained even if the Prometheus pod fails.

  • Enable Persistent Storage for Grafana Whether or not to configure storage for Grafana so that the Grafana dashboards and configuration can be retained even if the Grafana pod fails.

Yasen
  • 4,241
  • 1
  • 16
  • 25
  • Thank you. I forgot installing Prometheus catalog. So, I installed it, and I got below error: Failed to install app myprometheus-p-lggjt. Error: release myprometheus-p-lggjt failed: podsecuritypolicies.extensions is forbidden: User "u-noxcbyk7pz" cannot create resource "podsecuritypolicies" in API group "extensions" at the cluster scope – taibc Sep 22 '19 at 22:22