# Invoke-icingacheckhttpstatus - unknown

**URL:** <https://community.icinga.com/t/invoke-icingacheckhttpstatus-unknown/9281>\
**Category:** Service Monitoring\
**Tags:** windows, icinga-for-windows\
**Created:** [February 21, 2022, 9:57pm UTC](https://community.icinga.com/t/invoke-icingacheckhttpstatus-unknown/9281 "2022-02-21T21:57:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayt](https://community.icinga.com/user_avatar/community.icinga.com/hayt/32/7508_2.png) [@hayt](https://community.icinga.com/u/hayt)\
**Post date:** [February 21, 2022, 9:57pm UTC](https://community.icinga.com/t/invoke-icingacheckhttpstatus-unknown/9281/1 "2022-02-21T21:57:43Z")

</div>

hello,

testing with curl gives me http 200.  
[![image](https://community.icinga.com/uploads/default/original/2X/2/2b61672f4b83ab1dcfdfe5a933c6caa9f2c150b1.png)](https://user-images.githubusercontent.com/79607995/155030229-77673034-57a6-4d2d-814d-c911b24daf65.png)

using Invoke-icingacheckhttpstatus gives me an unknown for response time.  
[![image](https://community.icinga.com/uploads/default/original/2X/1/165e0658ab76e06425b4171fe1f01b6c54d5139f.png)](https://user-images.githubusercontent.com/79607995/155030541-cdb7be40-0736-4197-af0a-bf38605442ed.png)

any idea how to approach this issue.

tested locally

 ![image](https://community.icinga.com/uploads/default/original/2X/4/4821432a03740a85dd7a13d7502a59e8e738b553.png)

 ![image](https://community.icinga.com/uploads/default/original/2X/4/4826cb66d1aff577943a6861a8a37bdd6ca8dfad.png)

![image](https://community.icinga.com/uploads/default/original/2X/c/cb47ded8985ad86a6e5605a5836efc56e28a7b95.png)

mj

---

<div class="post-metadata">

**Author:** ![stevie-sy](https://community.icinga.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@stevie-sy](https://community.icinga.com/u/stevie-sy)\
**Post date:** [February 22, 2022, 8:46am UTC](https://community.icinga.com/t/invoke-icingacheckhttpstatus-unknown/9281/2 "2022-02-22T08:46:20Z")

</div>

Hi,

it looks like on your system the check can’t messure the time of the webrequest to the passed website. From the output I think you set verbose to 3. What happens if you set verbose to 1?

A look into the code of the check looks like the problem cause this if state

```auto
# Response Time
if ($HTTPData.$SingleUrl['RequestTime'] -eq $null) {
     $HTTPResponseTimeCheck = New-IcingaCheck -Name "HTTP Response Time" -Value 0 -LabelName ([string]::Format('{0}.http_response_time', $TransformedUrl)) -Unit 's' -Hidden;
      $HTTPResponseTimeCheck.SetUnknown() | Out-Null;
 } else {

```

That means the result of

```auto
$HTTPData.$SingleUrl['RequestTime']

```

is empty.

The question is now: why?

what we can also see if dig deeper in the code, the check calls the sub routine `Get-IcingaCheckHTTPQuery` which is calling another routine for meassure the time `Start-IcingaTimer`. The routine to get the time `Get-IcingaTimer` is only triggerd if there is a content.

---

<div class="post-metadata">

**Author:** ![cstein](https://community.icinga.com/user_avatar/community.icinga.com/cstein/32/7745_2.png) [@cstein](https://community.icinga.com/u/cstein)\
**Post date:** [February 22, 2022, 12:48pm UTC](https://community.icinga.com/t/invoke-icingacheckhttpstatus-unknown/9281/3 "2022-02-22T12:48:07Z")

</div>

Thank you. I just created the PR and fixed this issue: [Fix: Invoke-IcingaCheckHTTPStatus RequestTime return value by LordHepipud · Pull Request #287 · Icinga/icinga-powershell-plugins (github.com)](https://github.com/Icinga/icinga-powershell-plugins/pull/287)

It will be resolved with the v1.9.0 release in May or maybe sooner, depending if there are other issues in the meantime we can resolve.
