Elasticsearch
The Elasticsearch check connects to an Elasticsearch database, runs a query, and verifies the result count.
To connect to OpenSearch, use the opensearch field instead of elasticsearch.
elasticsearch.yamlapiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: elasticsearch-pass
spec:
schedule: "@every 5m"
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
| Field | Description | Scheme |
|---|---|---|
name* | Name of the check, must be unique within the canary |
|
connection | Connection reference or URL to use. Inline username and password can supply credentials when the check supports them | |
index | Index to query | |
password | ||
query | Query that needs to be executed on the server | JSON |
results | Expected hit count. Defaults to |
|
url | Elasticsearch URL. Required unless connection supplies the URL | |
username | ||
dependsOn | Checks that must complete before this check runs |
|
description | Description for the check |
|
display | Expression to change the formatting of the display | |
icon | Icon for overwriting default icon on the dashboard | |
labels | Labels for check |
|
markFailOnEmpty | If a transformation or datasource returns empty results, the check should fail |
|
metrics | Metrics to export from | |
namespace | Namespace to insert the check result into when it differs from the canary namespace |
|
relationships | Relationships that link check results to components or configs | Relationship |
test | Evaluate whether a check is healthy | |
transform | Transform data from a check into multiple individual checks | |
transformDeleteStrategy | Status to apply to transformed checks when the source check no longer returns them |
|