Hi,
We are using heartbeat v6.7.1 on a windows server.
We have a heartbeat request to a login page; which will depending on its cluster state provide a different response code.
if the cluster state for the url is primary then the login url returns a status code 200 and if its not the primary it returns a 503 or 502.
We want to define all the known response codes for what we consider to be “up” (200,502,503) .
Every other response code we want to therefore be “down”.
But the documentation is a bit confusing when it comes to the “check” conditions. We obviously need it to be an OR condition.
I have tried various check condition formats and only success has been when defining a single statuscode check.
The HTTP Check
-
type: http
name: aemauthor
enabled: true
schedule: '@every 60s' # every 60 seconds from start of beat
ipv4: true
ipv6: false
mode: any
method: "GET"
timeout: 15s
Which format for the “check” conditions
or:
- equals:
http.response.code: 200
- equals:
http.response.code: 502
- equals:
http.response.code: 503
check.response.status: 200
check.response.status: 502
check.response.status: 503
There doesnt appear to be a way to provide multiple codes like this.( not an integer i know)
check.response.status: 200,502,503
Note : we dont want to be changing the yml everytime someone changes the cluster nodes around.