Uptime Up status for any status code

Hi,

I have configured heartbeat for multiple urls. Problem is that there are some urls which throws status codes as 405 or 403. However urls are reachable. Our aim is to consider any such ports as UP in uptime. Can we do it?

I have tried the following as such:
image

Regards,
Bryce Fernandes.

Hi @Bryce_Fernandes. Maybe share the entire config of your monitor, with any sensitive data removed? I have configured a test monitor with the following YAML, for an endpoint that returns a 403:

- type: http
  name: test-monitor
  schedule: "@every 7s"
  urls: ['http://localhost:12349/403']

This caused the monitor to show as down.

Modifying it to use:

- type: http
  name: test-monitor
  schedule: "@every 7s"
  urls: ['http://localhost:12349/403']
  check.response:
    status: [403, 405]

It now shows as up in the Uptime UI, and it worked still when I modified my test service to return status 405.

1 Like

Hi @jkambic ,

Issue was resolved, by the below hadn't worked, maybe some indentation error.
check.response.status: [403]

And with this I had typo so was fixed by correcting.

  urls: ['http://localhost:12349/403']
  check.response:

Thanks,
Bryce Fernandes.

1 Like

This topic was automatically closed 24 days after the last reply. New replies are no longer allowed.