Skip to main content

ElasticSearch

This check connects to a specified ElasticSearch database, run a query against it and verify the results.

Opensearch

To connect to Opensearch use opensearch field instead of elasticsearch

elasticsearch.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: elasticsearch-pass
spec:
interval: 30
elasticsearch:
- url: http://elasticsearch.canaries.svc.cluster.local:9200
description: Elasticsearch checker
index: index
query: |
{
"query": {
"term": {
"system.role": "api"
}
}
}
results: 1
name: elasticsearch_pass
FieldDescriptionScheme
index*

Index against which query should be ran

name*

Name of the check, must be unique within the canary

string

query*

Query that needs to be executed on the server

JSON

url*

Elasticsearch URL

results

Number of expected hits

integer

description

Description for the check

string

display

Expression to change the formatting of the display

Expression

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

map[string]string

metrics

Metrics to export from

[]Metrics

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

username

EnvVar

password

EnvVar