You need to enable JavaScript to run this app.
Volcengine Managed Service for Prometheus

Volcengine Managed Service for Prometheus

Copy page
Download PDF
Exporter integration
Elasticsearch exporter integration
Copy page
Download PDF
Elasticsearch exporter integration
VMP monitors the operational status of Elasticsearch by using the exporter. This topic describes how to deploy elasticsearch-exporter in a cluster and how to monitor Elasticsearch.​
Prerequisites​
  • VMP​
  • VKE​
  • A Volcano Engine root user has been created, and VKE has been activated.​
  • The VKE cluster has been integrated with VMP. For details, see VKE integration.​
  • Grafana has been deployed and integrated with the workspace.​
Procedure​
Step 1: Use a secret to configure the Elasticsearch connection string​
  1. Log in to the VKE console.​
  1. Click Cluster in the left navigation pane.​
  1. On the cluster list page, click the name of the cluster that you want to configure.​
  1. In the left navigation pane of the cluster details page, click Configurations > Secret. On the page that appears, click Create with Yaml to configure a secret.​
​
apiVersion: v1​
kind: Secret​
metadata:​
name: es-secret-demo # Specify the secret name.​
namespace: volcano-metrics # Specify the namespace of the secret.​
type: Opaque​
stringData:​
esURI: <proto>://<user>:<password>@<es-address>:<port> # Configure the link of Elasticsearch, which consists of the username, password, address, and port number.​
​
Step 2: Deploy elasticsearch-exporter​
  1. In the left navigation pane of the cluster details page, click Workload > Deployment.​
  1. Click Create with Yaml to deploy elasticsearch-exporter.​
​
apiVersion: apps/v1​
kind: Deployment​
metadata:​
name: es-exporter # Specify the name of the exporter.​
namespace: volcano-metrics # Specify the namespace of the exporter.​
labels: ​
app-name: es-exporter # Configure the labels of the exporter.​
spec:​
replicas: 1 # Specify the number of replicas for the exporter.​
selector:​
matchLabels:​
app-name: es-exporter # Change the name based on your business requirements. It is recommended to add information about the Elasticsearch instance.​
template:​
metadata:​
labels:​
app-name: es-exporter # Change the name based on your business requirements. It is recommended to add information about the Elasticsearch instance.​
spec:​
containers:​
- env:​
- name: ES-URI # Use a secret to specify the address information of the Elasticsearch instance.​
valueFrom: ​
secretKeyRef:​
name: es-secret-demo​
key: esURI​
- name: ES-ALL # Specify whether to collect all metrics of Elasticsearch.​
value: "ture"​
image: bitnami/elasticsearch-exporter:latest # Pull the exporter image from Docker Hub.​
imagePullPolicy: IfNotPresent​
name: es-exporter # Specify the container name.​
ports:​
- containerPort: 9114 # Specify the container port number.​
name: metric-port # Specify the container port name.​
dnsPolicy: ClusterFirst​
restartPolicy: Always​
terminationGracePeriodSeconds: 30​
​
tip​
In this example, ES-ALL is used to collect all metrics of Elasticsearch. You can also adjust the collection scope by specifying the appropriate parameters. For details, see elasticsearch_exporter.​
Step 3: Configure a collection rule​
  1. In the left navigation pane of the cluster details page, click Workload > Resource Explorer.​
  1. Click Create with Yaml to configure a collection rule by using PodMonitor.​
  • Select Custom from the Type list.​
  • Enter the YAML configuration in the Yaml field.​
​
apiVersion: monitoring.coreos.com/v1​
kind: PodMonitor​
metadata:​
name: es-exporter # Specify the name of PodMonitor.​
namespace: volcano-metrics # Specify the namespace of PodMonitor.​
labels: ​
volcengine.vmp: "true" # Configure the labels for PodMonitor to allow the labels to be identified by prometheus-agent.​
spec:​
podMetricsEndpoints:​
- interval: 30s​
port: metric-port # Specify the container port name of the exporter.​
path: /metrics # Specify the URI path for metric exposure. The value is /metrics by default if it is not specified.​
relabelings: # Configure metric relabeling. If this parameter is not required, it can be omitted.​
- action: replace​
sourceLabels:​
- instance​
regex: (.*)​
targetLabel: instance​
replacement: 'ES-xxxxxx' # Specify the ID of the Elasticsearch instance.​
namespaceSelector:​
matchNames: ​
- volcano-metrics # Specify the namespace of the exporter.​
selector: ​
matchLabels:​
app-name: es-exporter # Specify the label value of the exporter to locate and select the target pod.​
​
Validate results​
  1. Execute the following command to configure Grafana port forwarding:​
​
kubectl port-forward service/grafana 3000:3000 -n volcano-metrics​
​
  1. Open a browser in your local environment (Linux/Mac), enter localhost:3000 into the address bar to go to the Grafana login interface. Use the default username admin, with the password admin, to log in.​
  • ​alt​​
  1. After you log in to Grafana, you can create a dashboard to view the metric information of Elasticsearch.​
  • ​​​
tip​
For detailed parameters of elasticsearch-exporter, refer to elasticsearch_exporter.​
​
Last updated: 2026.10.10 10:16:50