When you use Alibaba Cloud Elasticsearch, the advanced monitoring and alert service is automatically enabled. Your existing and new Elasticsearch instances are added to this service. This topic describes how to view and configure visual monitoring, and how to configure log alert rules and metric alert rules.
Background information
The advanced monitoring and alert service provides comprehensive metric and log monitoring and analysis for your Elasticsearch clusters across all regions. In the Grafana provided by the platform, view visual monitoring data for dimensions such as clusters, nodes, indexes, and machine resources. Perform cluster log analysis for anomalies. Customize monitoring dashboards and alert rules as needed. For more information about advanced monitoring and alerts, see Advanced monitoring and alert overview.
Prerequisites
An Alibaba Cloud Elasticsearch instance is created in a region that supports the advanced monitoring and alert service.
The advanced monitoring and alert service is available in the following regions: Hangzhou, Beijing, Shanghai, Shenzhen, Qingdao, Zhangjiakou, Chengdu, Guangzhou, Ulanqab, Beijing Finance Cloud, US (Virginia), US (Silicon Valley), Japan (Tokyo), Indonesia (Jakarta), and China (Hong Kong). The regions available in the console are definitive.
For more information about how to create an instance, see Create an Alibaba Cloud Elasticsearch instance.
Learn how to use Grafana monitoring dashboards. For more information, see Grafana dashboards.
Limits
The advanced monitoring and alert feature provides monitoring and alerts for infrastructure metrics, engine metrics, and log data. Only Elasticsearch 6.7.0 or 7.10.0 with a kernel version later than 1.2.0 supports engine metric monitoring. To upgrade the kernel version, see Upgrade versions.
You cannot access the advanced monitoring and alert service when you use a RAM role for single sign-on (SSO) to the Alibaba Cloud Management Console. For more information, see Log on to the Alibaba Cloud Management Console using a RAM role for SSO. To access the service, use a Resource Access Management (RAM) user for SSO to the Alibaba Cloud Management Console. For more information, see Log on to the Alibaba Cloud Management Console using a RAM user for SSO.
Procedure
Video tutorial
Step 1: View and configure visual monitoring
Log on to the Alibaba Cloud Elasticsearch console.
In the navigation pane on the left, click Advanced Monitoring and Alerts.
By default, all existing and new Elasticsearch instances under your account are added to the monitoring and alert service.
When you use the monitoring dashboard for the first time, authorize the application.
If you are using an Alibaba Cloud account, select the following three authorization options and click Authorize to complete the emon_grafana application authorization.
Option
Description
Obtain the basic information of the logon user (default authorization scope, cannot be removed)
This option is selected by default. Obtains basic information of the logon user from the current Alibaba Cloud account, such as the token expiration timestamp, token entity, token recipient, and issuer.
Unique user identifier issued by Alibaba Cloud
Select this option manually. This obtains the UID of the current Alibaba Cloud account to prevent multiple RAM users from being authorized repeatedly.
User's name and other personal information
Select this option manually. This obtains information about the username of the current cloud account, which can be an Alibaba Cloud account or a RAM user. The information includes the user's display name and logon name. After authorization, the user can see the name of the currently logged-on account.
If you are a RAM user, wait for the Alibaba Cloud account to complete the initial logon authorization. Then, you can use the advanced monitoring and alert feature. Alternatively, perform manual authorization:
Grant permissions to your RAM user from an Alibaba Cloud account. The authorization policy is as follows. Replace
<yourAccountId>with your RAM user ID. For more information, see Create a custom permission policy in script mode.{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": "ims:*", "Resource": "acs:ims::<yourAccountId>:application/*" } ] }Authorize the monitoring dashboard as a RAM user. The policy is as follows. For more information, see Create a custom permission policy in script mode.
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "cms:DescribeActiveMetricRuleList", "cms:ListAlarm", "cms:QueryMetricList", "cms:QueryMetricLast" ], "Resource": "*" } ] }cms:DescribeActiveMetricRuleList: Grants the permission to call Cloud Monitor emon_grafana. If this permission is not added, an error message appears on the page."cms:ListAlarm", "cms:QueryMetricList", "cms:QueryMetricLast": Grants the permission to view the Default Infrastructure Monitoring page. If these permissions are not added, you cannot view the default infrastructure monitoring page.
NoteIf an authorization error occurs, resolve it by re-authorizing.
On the Advanced Monitoring and Alerts page, view the default monitoring data.
In the navigation pane on the left, choose to view the metric monitoring data of the connected instances.
For more information about metric monitoring, see Infrastructure metrics and Engine metrics.
In the navigation pane on the left, choose to view the log monitoring data of the connected instances.
For more information about log monitoring, see Log Monitoring.
In the navigation pane on the left of the Advanced Monitoring and Alerts page, choose to configure and view custom monitoring data.
For more information, see Configure a custom monitoring dashboard.
(Optional) Step 2: Configure log alert rules
To receive alert notifications based on log monitoring, perform the following steps:
In the navigation pane on the left of the Advanced Monitoring and Alerts page, choose .
On the Default Log Metrics tab, click Configure Log Alerts on the right.
Configure or customize log alert rules based on the alert templates provided by the system.
For more information, see Log alerts.
(Optional) Step 3: Configure metric alert rules
To receive alert notifications based on monitoring metrics, perform the following steps in the navigation pane on the left of the Advanced Monitoring and Alerts page:
Choose . On the Overview page, view the notification records and alert events for all alert contact groups.
For more information, see View alert notification records and events.
Choose to create an alert contact group and add alert rules.
For more information, see Create an alert contact group and Configure alert rules.
View the notification records and alert events for a single alert contact group. For more information, see View notification records and View alert events.
Choose to add a contact or contact group for metric alert notifications.
For more information, see Add a contact and Add a contact group.
FAQ
Q: Why is the data from advanced monitoring inconsistent with the data from Kibana monitoring for the same instance during the same period?
A: The advanced monitoring for Alibaba Cloud Elasticsearch is an internally developed monitoring service. The data from this service may differ from other monitoring services for the following reasons:
Differences in sampling period: The data collection period is different from that of Kibana or third-party monitoring services. This results in different data being collected, which causes discrepancies.
Differences in query algorithms: For example, data collection for both advanced monitoring and Kibana monitoring is affected by cluster stability. The QPS metric in advanced monitoring may show sudden spikes, negative values, or no data due to cluster jitter. In contrast, Kibana monitoring may show empty values.
NoteIf advanced monitoring provides more metrics than Kibana monitoring, use both services together to analyze cluster monitoring details.
Differences in collection APIs: Kibana monitoring metrics rely on Elasticsearch APIs. However, some node-level metrics in advanced monitoring, such as CPU usage, load_1m, and disk usage, call the underlying system APIs of Alibaba Cloud Elasticsearch. Therefore, the monitoring data includes resource usage at the system level in addition to the Elasticsearch process.