How do I specify multiple success response codes for an Elastic Heartbeat monitor?
We have an application for which
http.response.code: 200 and
http.response.code: 403 are both considered successful.
However, in the
heartbeat.yml file, it's only possible to specify a single success code for
This response to another question references using
processors for this purpose, but there appear to be two issues with this:
Processors don't appear to be intended for this purpose. According to the processor documentation:
You can use processors to filter and enhance data before sending it to the configured output.
It doesn't work, when I specify it as below.
I've attached my
What am I missing? Is there detailed documentation for the
check.response... section of the YAML?
- type: http # monitor type `http`. Connect via HTTP an optionally verify response # Monitor name used for job name and document type name: my-app # Enable/Disable monitor enabled: true # Configure task schedule schedule: '@every 30s' # every 5 seconds from start of beat # Configure URLs to ping urls: - http://my-app.example.com # Configure IP protocol types to ping on if hostnames are configured. # Ping all resolvable IPs if `mode` is `all`, or only one IP if `mode` is `any`. ipv4: true ipv6: true mode: any # Expected response settings # check: # response: # # Expected status code. If not configured or set to 0 any status code not # # being 404 is accepted. # status: 200 processors: - or: - equals: http.response.code: 200 - equals: http.response.code: 403