ByCloud Docs
GuidesCLIAPISDK

Create health monitor

bycloud load-balancers health-monitors --pool_id <pool_id> --type <type> [flags]

Create a new health monitor for a pool

Options

--output

(-o)

stringoptional

Output format: text, json, or yaml

Values: "text", "json", "yaml"

Default: "text"

Body Options

--delay

integerrequired

--max_retries

integerrequired

--pool_id

stringrequired

--timeout

integerrequired

--type

stringrequired

Values: "HTTP", "HTTPS", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT", "SCTP"

--admin_state_up

booleanoptional

Default: true

--expected_codes

stringoptional

Default: "200"

--http_method

stringoptional

Values: "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH"

--max_retries_down

integeroptional

--name

stringoptional

--tags

arrayoptional

--url_path

stringoptional

Default: "/"

Command

bycloud load-balancers health-monitors \
--pool_id "abc-123" \
--type HTTP \
--delay 1

Output

ID 550e8400-e29b-41d4-a716-446655440000
CRN crn:spo1:loadbalancer:health-monitor:550e8400-e29b-41d4-a716-446655440000
NAME http-monitor
PROVISIONING_STATUS ACTIVE
OPERATING_STATUS ONLINE
ADMIN_STATE_UP true
TYPE HTTP
DELAY 5
TIMEOUT 3
MAX_RETRIES 3
MAX_RETRIES_DOWN 3
HTTP_METHOD GET
URL_PATH /health
EXPECTED_CODES 200
POOL_ID 550e8400-e29b-41d4-a716-446655440000
TAGS web, frontend
PROJECT_ID 550e8400-e29b-41d4-a716-446655440000
CREATED_AT 2024-01-15T10:30:00Z
UPDATED_AT 2024-01-15T10:30:00Z