Hello Elastic Community,
I Need to create a hierarchical tree structure for monitoring uptime across three servers, labeled A, B, and C. I want to have a main monitor, and when all three servers are running, the main monitor should display an "UP" status. However, if any of the servers (A, B, or C) goes down, the main monitor should show a "DOWN" status.
This is the below code i tried for this in heartbeat but when i m runnig hearteat beat i m getting 3 differnt monitors for all 3 servers each instaed of i want only 1 monitor that will show the status up or down of all 3 server can any one pls give the solution or suggection how can i do it
- type: http
enabled: true
id: MAIN Server
name: MAIN_Server
service.name: main server
hosts:
- "http://123.123.123.123:5001/actuator/health" # Server A
- "http://123.123.123.124:5002/actuator/health" # Server B
- "http://123.123.123.125:5003/actuator/health" # Server c
ipv4: true
mode: all
timeout: 50m
check.request.method: GET
check.response:
status: [200]
json:
- description: Server A status
expression: '$.status == "UP"' # Check Server A status
- description: Server B status
expression: '$.status == "UP"' # Check Server B status
- description: Server C status
expression: '$.status == "UP"' # Check Server C status
response.include_body: always
schedule: '@every 60s'
tags: ["Health"]