Skip to main content

OpenSearch

The OpenSearch check runs a query against an OpenSearch index and verifies that the hit count equals results.

opensearch.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: opensearch-pass
labels:
canary: opensearch
spec:
schedule: "@every 30s"
opensearch:
- name: opensearch_pass
description: OpenSearch checker
url: http://opensearch.canaries.svc.cluster.local:9200
index: index
query: |
{
"query": {
"term": {
"system.version": "v1.0"
}
}
}
results: 1
FieldDescriptionScheme
index*

OpenSearch index to query

string

name*

Name of the check, must be unique within the canary

string

query*

OpenSearch query body

JSON

connection

Connection reference or URL to use. Inline username and password can supply credentials when the check supports them

Connection

password

EnvVar

results

Expected hit count. Defaults to 0. The check fails unless the hit count equals this value.

integer

url

OpenSearch URL. Required unless connection supplies the URL

string

username

EnvVar

dependsOn

Checks that must complete before this check runs

[]string

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]

markFailOnEmpty

If a transformation or datasource returns empty results, the check should fail

boolean

metrics

Metrics to export from

[]Metrics

namespace

Namespace to insert the check result into when it differs from the canary namespace

string

relationships

Relationships that link check results to components or configs

Relationship

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

transformDeleteStrategy

Status to apply to transformed checks when the source check no longer returns them

string