Closed awahab07 closed 2 years ago
When monitor configurations are pushed to Synthetics Service, enabled key is dropped from payload for disabled monitors (enabled: false).
enabled
enabled: false
For example the following payload is pushed for an example enabled monitor:
{ monitors: [ { type: 'http', locations: [Array], enabled: true, schedule: '@every 3m', timeout: '16s', name: 'Disabled LATAM Monitor', urls: 'https://disabled-example.com', max_redirects: '0', 'response.include_body': 'on_error', 'response.include_headers': true, 'check.request.method': 'GET', id: 'ab45ccc0-5e6c-11ec-b6b6-19f2ac56f0b7' } ], output: { hosts: [ 'https://localhost:9200' ], api_key: 'bvKDuH0BXEsoI3O2v6zx:RZHMhLChSNaXruM5HDaTaQ' } }
When the same monitor is edited with it's Enabled field toggled off, the following payload is sent:
{ monitors: [ { type: 'http', locations: [Array], schedule: '@every 3m', timeout: '16s', name: 'Disabled LATAM Monitor', urls: 'https://disabled-example.com', max_redirects: '0', 'response.include_body': 'on_error', 'response.include_headers': true, 'check.request.method': 'GET', id: 'ab45ccc0-5e6c-11ec-b6b6-19f2ac56f0b7' } ], output: { hosts: [ 'https://localhost:9200' ], api_key: 'bvKDuH0BXEsoI3O2v6zx:RZHMhLChSNaXruM5HDaTaQ' } }
Notice that enabled key is dropped from the payload. And the monitor will not be disabled by the Synthetics Service.
Expected: When a monitor is disabled, payload should contain enabled: false for that monitor.
When monitor configurations are pushed to Synthetics Service,
enabled
key is dropped from payload for disabled monitors (enabled: false
).For example the following payload is pushed for an example enabled monitor:
When the same monitor is edited with it's Enabled field toggled off, the following payload is sent:
Notice that
enabled
key is dropped from the payload. And the monitor will not be disabled by the Synthetics Service.Expected: When a monitor is disabled, payload should contain
enabled: false
for that monitor.