Ingesting Prometheus Monitoring Data to Local Grafana
After cloud service or CCE cluster metrics are ingested to a Prometheus instance, you can use local Grafana to view the metric data in AOM.
Scenario
Ingesting Prometheus monitoring data to local Grafana can greatly improve the visualization effect. More flexible analysis tools are provided and multiple data sources are integrated. These enhance team collaboration and enable effective system monitoring and O&M.
Creating a Prometheus Instance
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Prometheus Monitoring > Instances.
- Click Add Prometheus Instance. Table 1 describes the parameters.
Table 1 Parameters for creating a Prometheus instance Parameter
Example Value
Description
Instance Name
aom-hc
Name of a Prometheus instance. Enter up to 100 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Do not start or end with an underscore or hyphen.
Enterprise Project
default
Enterprise project.
- If Enterprise Project is set to All on the global settings page, select an enterprise project from the drop-down list here.
- If you have already selected an enterprise project on the global settings page, this option will be grayed and cannot be changed.
Instance Type
Common instance
Type of the Prometheus instance.
Description
-
Description of the Prometheus instance. Enter up to 1,024 characters. This parameter is optional.
Tag
-
Click Add and enter a tag key and value to add a tag. This parameter is optional.
- Max.: 20 tags.
- A tag key can contain letters, digits, spaces, and special characters (_.:=+-@), but cannot start or end with a space or start with _sys_.
- A tag value can contain letters, digits, spaces, and special characters (_.:/=+-@).
- Click OK. A common Prometheus instance will then be created.
Obtaining the Grafana Data Source Configuration Code
- Add an access code. (If you already have an access code, skip this step.)
- Log in to the AOM 2.0 console.
- In the navigation pane on the left, choose Settings > Global Settings.
- 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 five access codes can be created for each project. Keep them secure.
- Obtain the Grafana data source configuration code.
- In the navigation pane on the left, choose Prometheus Monitoring > Instances.
- Click the name of the Prometheus instance created in Creating a Prometheus Instance. The instance details page is displayed.
- In the navigation pane on the left, choose Settings. On the displayed page, obtain the Grafana data source configuration. Figure 1 Grafana data source configuration
Checking Prometheus Instance Data Through Grafana
- Install and start Grafana. For details, see the Grafana official documentation.
- 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 2.c.
- User: username obtained in 2.c.
- Password: password obtained in 2.c.
- The Basic auth and Skip TLS Verify options under Auth must be enabled.
Figure 3 Setting parameters
If your version supports the configuration of performance parameters under Advanced settings, set Prometheus type to Cortex and Cortex version to 1.0.0.
Figure 4 Other 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