Viewing 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 Cloud Server (ECS) Getting Started.
- Your service has been connected for Prometheus monitoring. For more details, see:
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. The Global Configuration page is displayed.
- In the navigation pane on the left, choose Authentication. Click Add Access Code.
- In the dialog box that is displayed, click OK. The system then automatically generates an access code.
- You can create up to two access codes for each project.
- An access code is an identity credential for calling APIs. Keep your access code 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 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 Configuration > Data Sources. Then click Add data source.
Figure 2 Configuring Grafana
- Click Prometheus to access the configuration page.
Figure 3 Prometheus configuration page
- Set Grafana data source parameters.
The Basic auth and Skip TLS Verify options under Auth must be enabled.
Figure 4 Setting parameters
- 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 5 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