Checking Prometheus Instance Data Through Grafana
After connecting a cloud service or CCE cluster to a Prometheus instance, you can use Grafana to view the metrics of the cloud service or cluster.
Prerequisites
- You have purchased an ECS.
- You have purchased an EIP and bound it to the purchased ECS. For details, see Elastic IP (EIP) Getting Started.
- Your service has been connected for Prometheus monitoring. For details, see Managing Prometheus Instances.
Procedure
- Install and start Grafana. For details, see the Grafana official documentation.
- Add an access code.
- Log in to the AOM 2.0 console.
- In the navigation pane, choose Settings > Global Settings. The Global Settings page is displayed.
- On the displayed page, choose Authentication in the navigation pane. Click Add Access Code.
- In the dialog box that is displayed, click OK. The system then automatically generates an access code.
An access code is an identity credential for calling APIs. A maximum of two access codes can be created for each project. Keep them secure.
- Obtain the Grafana data source configuration code.
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Prometheus Monitoring > Instances. In the instance list, click the name of the target Prometheus instance.
- On the displayed page, choose Settings in the navigation pane and obtain the Grafana data source information from the Grafana Data Source Info area.
Figure 1 Grafana data source information
- Configure Grafana.
- Log in to Grafana.
- In the navigation pane, choose Connections > Data Sources. Then click Add data source.
(Configuration parameters may vary depending on the Grafana version. Configure the parameters based on site requirements.)
- Click Prometheus to access the configuration page.
Figure 2 Prometheus configuration page
- Set Grafana data source parameters.
- Prometheus server URL: HTTP URL obtained in 3.c.
- User: username obtained in 3.c.
- Password: password obtained in 3.c.
The Basic auth and Skip TLS Verify options under Auth must be enabled.
Figure 3 Setting parametersIf the current version supports the configuration of performance parameters under Advanced settings, set Prometheus type to Cortex and Cortex version to 1.0.0.
- Click Save&Test to check whether the configuration is successful.
If the configuration is successful, you can use Grafana to configure dashboards and view metric data.
Figure 4 Checking whether the configuration is successful
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot