Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Synchronizing Elasticsearch Alerts to Prometheus

Updated on 2025-01-23 GMT+08:00

Make necessary configurations in Kibana to synchronize Elasticsearch alerts to Prometheus so you can use Prometheus to monitor and analyze key performance metrics for Elasticsearch clusters in real time.

Prometheus is an open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.

Constraints

Only Elasticsearch 7.10.2 clusters (with an image version 7.10.2_24.3.3_* or later) support alert synchronization to Prometheus.

Prerequisites

  • The Prometheus monitor server is ready, and the Pushgateway address has been obtained. Prometheus and Elasticsearch must be connected. Otherwise, alerts cannot be sent.
  • The Elasticsearch cluster is available.

Configuring Alert Synchronization

  1. Log in to the CSS management console.
  2. Choose Clusters > Elasticsearch, select the target cluster and click Access Kibana in the Operation column.
  3. On the Kibana page, choose Open Distro for Elasticsearch > Alerting in the navigation pane on the left.
  4. Create a Prometheus destination to send alert messages.
    1. On the Alerting page, click the Destinations tab, and click Add destination to configure destination information.
      Table 1 Destinations parameters

      Parameter

      Description

      Name

      User-defined destination name

      Type

      Select PROMETHEUS.

      Settings

      Enter the Pushgateway address of the Prometheus monitor server.

      • Currently, only Prometheus Gauge dashboards can be added or deleted. Metrics are queried using specific statements and numeric values are synchronized to Pushgateway for monitoring via Prometheus.
      • Two types of Pushgateway addresses are supported: HTTP and HTTPS.
      Figure 1 Add destination
    2. Click Create to return to the Destinations list. The created Prometheus destination is displayed in the list.
      Figure 2 Destinations list
  5. Create a monitoring task to configure the alert triggering conditions and monitoring interval.
    1. Click the Monitors tab on the Alerting page, and click Create monitors to configure monitoring information.
      Table 2 Monitor parameters

      Parameter

      Description

      Monitor name

      User-defined monitor name

      Monitor state

      Monitoring status. You are advised to keep this function enabled.

      Method of definition

      Select a method to define monitoring. You are advised to use Define using extraction query.

      • Define using visual graph: use visualized query statement
      • Define using extraction query: use specific query statement

      Index

      Index to be monitored

      Time field

      When Define using visual graph is selected, select a time field and define counting parameters such as count.

      Frequency

      Select the monitoring frequency and set the monitoring interval. The options include:

      • By interval
      • Daily
      • Weekly
      • Monthly
      • Custom cron expression
    2. Click Create. The Create trigger page is displayed.
    3. On the Create trigger page, set the alert triggering conditions and the actions to be triggered.
      Table 3 Trigger parameters

      Parameter

      Description

      Define trigger

      Trigger name

      User-defined trigger name.

      Severity level

      Sensitivity of the trigger, that is, how many alerts need to be triggered before an alert is actually sent. 1 indicates the highest sensitivity.

      Trigger condition

      Trigger condition. An alert is triggered when the trigger condition is met.

      NOTE:

      You are advised to set a trigger condition that can almost always be triggered so that the queried metrics will always be synchronized to the Pushgateway.

      Configure actions

      Action name

      Name of the triggered action.

      Destination

      Select the destination created in 4.

      Message

      Defines the body of the message to be published. See the following for an example.

      {
       "metricsName":"hits_total_value", //Prometheus metric name
       "metricsLabel": {"label_key1":"label_value1","label_key2":"label_value2"}, //Prometheus labels
       "metricsValue":{{ctx.results.0.hits.total.value}}, //Prometheus metric values
       "jobName":"job_name" //Prometheus monitor task name
      "metricsHelp":"***" //Metric explanation. Optional.
      }

      Action throttling

      Message sending interval. It limits the number of notification messages that can be sent over a specified period.

      For example, if this parameter is set to 10 minutes, Prometheus sends only one alert notification in the next 10 minutes even if the trigger condition is met multiple times. After 10 minutes, Prometheus sends another alert notification if the trigger condition is met again.

    4. Click Send test message to send a test message to Prometheus to check whether the trigger is set successfully.
      Figure 3 Sending a test message

      As shown in Figure 4, Prometheus can receive a triggered message, meaning the trigger is set successfully.

      Figure 4 Message received successfully
    5. Click Create to return to the Monitor details page.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback