Viewing Metric Data in AOM Using Grafana
Prerequisites
- You have purchased an ECS. For details, see Elastic Cloud Server Getting Started.
- You have purchased an EIP and bound it to the ECS. For details, see Elastic IP Getting Started.
Procedure
- Install and start Grafana. For details, see the Grafana official documentation.
- Add an AccessCode.
- Log in to the AOM console. In the navigation pane, choose Configuration Management > Access Management.
- On the Authentication Management tab page, click Add AccessCode. Figure 1 Clicking Add AccessCode
- You can create up to two AccessCodes for each project.
- An AccessCode is an identity credential for calling APIs. Keep your AccessCode secure.
- In the dialog box that is displayed, click OK to add the AccessCode. Figure 2 Adding an AccessCode
- After the AccessCode is added, click
to view the AccessCode on the Authentication Management tab page. To delete the AccessCode, click Delete in the Operation column. Deleted AccessCodes cannot be recovered. Exercise caution when performing this operation. Figure 3 Viewing the AccessCode
- Configure Grafana.
- Log in to Grafana.
- In the navigation pane, choose Configuration > Data Sources. Then, click Add data source. Figure 4 Configuring Grafana
- Click Prometheus to access the configuration page. Figure 5 Entering the Prometheus configuration page
- Set parameters according to the following figure.
- Password: AccessCode generated in 2
- User: aom_access_code
- URL: {URI-scheme}://{Endpoint}/v1/{project_id}
- URI-scheme: protocol used to transmit requests. Currently, all APIs use HTTPS.
- Endpoint: domain name or IP address of the server bearing the REST service. The endpoint varies according to services in different regions. It can be obtained from Regions and Endpoints. For example, the endpoint of AOM in CN North-Beijing1 is aom.cn-north-1.myhuaweicloud.com.
- project_id: project ID, which can be viewed in the project list on the My Credentials page.
- The Basic auth and Skip TLS Verity options under Auth must be enabled.
- AccessCodes correspond to project IDs. Confirm their mapping when entering information.
Figure 6 Configuring 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 7 Checking whether the configuration is successful
Last Article: Reporting Prometheus Data to AOM
Next Article: Log Configuration
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.