# Uptime Up status for any status code

**URL:** https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446
**Category:** Synthetics
**Created:** [June 30, 2021, 10:26am UTC](https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446 "2021-06-30T10:26:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bryce\_Fernandes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_fernandes/32/71166_2.png) [@Bryce\_Fernandes](https://discuss.elastic.co/u/Bryce_Fernandes)
#### Post date: [June 30, 2021, 10:26am UTC](https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446/1 "2021-06-30T10:26:34Z")

</div>

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](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c749ec62a20ce2d51b0e1e7b45a3a9c1b434ddf7.png)

Regards,  
Bryce Fernandes.

---

<div class="post-metadata">

### Author: ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)
#### Post date: [July 8, 2021, 7:23pm UTC](https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446/2 "2021-07-08T19:23:45Z")

</div>

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:

```auto
- 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:

```auto
- 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.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/3/23ad4b8ce0efe317e59432a810ae218ef8b436e4.png)

---

<div class="post-metadata">

### Author: ![Bryce\_Fernandes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_fernandes/32/71166_2.png) [@Bryce\_Fernandes](https://discuss.elastic.co/u/Bryce_Fernandes)
#### Post date: [July 9, 2021, 3:52am UTC](https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446/3 "2021-07-09T03:52:57Z")

</div>

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.

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

```

Thanks,  
Bryce Fernandes.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 2, 2021, 3:53am UTC](https://discuss.elastic.co/t/uptime-up-status-for-any-status-code/277446/4 "2021-08-02T03:53:54Z")

</div>

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