# http text validation check fails

**URL:** <https://community.dynatrace.com/t/http-text-validation-check-fails/32437>\
**Category:** Synthetic Monitoring\
**Tags:** http-monitor\
**Created:** [August 18, 2021, 3:52pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437 "2021-08-18T15:52:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 18, 2021, 3:52pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/1 "2021-08-18T15:52:36Z")

</div>

Hi guys

We have private location site and an http check running on it with no problems.

Once we added a validation text

 ![Yosi_Neuman_1-1629301528725.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/6/e6292611130eb530a07db287b3e841127c2e6e62.png)

as can be seen from postman running on the same machine

 ![Yosi_Neuman_0-1629301430010.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/9aa05b752ff4cb119c4098a233e7fb7ae37ccc73.png)

test is falling on this&nbsp; validation.

This script is running with credentials so when looking on successful test&nbsp; response body is missing

 ![Yosi_Neuman_2-1629301652558.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/1f851383f0e52190c09df36599526ebf64e355fa.png)

Can it be that the response body is empty for validation text?

We have tried to print in the post exestuation step the response body

 ![Yosi_Neuman_3-1629301851347.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/16777c9a33c5d14e4fca0ace91d72e48ae1f8497.png)

but we didn’t find it in any of the logs on this AG.

Any suggestion will be more than appreciated here

Thanks in advance and stay safe

Yos

---

<div class="post-metadata">

**Author:** ![ryan\_ott](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ryan_ott/32/15818_2.png) [@ryan\_ott](https://community.dynatrace.com/u/ryan_ott)\
**Post date:** [August 18, 2021, 5:55pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/2 "2021-08-18T17:55:31Z")

</div>

Hello,

The response validation does search for the text within the response body - so if the response body isn’t returning anything then that would be why. Are you able to double check that the HTTP Request is correct and should return a response body?

More information can be found here:&nbsp;[Configure HTTP monitors in Classic — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/http-monitors-config#anchor-http-additional-options)

 ![ryan_ott_0-1629309325249.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/7/470b559a844c52944c4cab558c7301cf0e8cfdbc.png)

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 18, 2021, 6:18pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/3 "2021-08-18T18:18:31Z")

</div>

Hi&nbsp;[@ryan\_ott](https://community.dynatrace.com/user/7888)&nbsp;,thanks for your reply!

Yep we already check documentation regarding http text validation and know that it checking the response body, that’s the reason we have opened this thread.

From postman its look like the response body do present.

From dynatrace UI the response body shows as “” because this http check runs with credentials.

 ![Yosi_Neuman_0-1629310446571.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/9/d9ca66b2bebbefb241fe5c8215cd8a8115975787.png)

So question here if that is an issue with the credential or some other issue.

Unfurtantlly we cannot run this check without credentials.

We have tried to print the value of the body in post exaction phase we didn’t find it in any log.

Yos

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [August 20, 2021, 7:35am UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/4 "2021-08-20T07:35:42Z")

</div>

Hi Yos,

I tested using credentials in an HTTP Monitor and then using text validation on the response and was able to confirm that this does work in a simple example. I also piped the the responseBody to the vuc-http-custom.log using&nbsp; api.info in the post-execution script like this:

var responseBod = response.getResponseBody();

api.info("responseBody: " + responseBod);

Best wishes, Hannah

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 21, 2021, 7:20am UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/5 "2021-08-21T07:20:36Z")

</div>

Hi&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)&nbsp;Thanks for your tests and update

I also&nbsp;was able to succeed and use the text validation with credentials vault in test env.

Will give it another try with in customer env next week, and will update.

Thanks for pointing where to look for the output of&nbsp;api.info - it will be good to add this information to documentation.

All the best and stay safe

Yos

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 23, 2021, 12:44pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/6 "2021-08-23T12:44:23Z")

</div>

Hi&nbsp;[@HannahM](https://community.dynatrace.com/user/1433)

Now that I found in&nbsp; **vuc-http-custom.log** &nbsp;the&nbsp;api.info() messages I was able to discovered&nbsp;why the validation was failing in the first place.

Thanks a lot

Yos

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [August 23, 2021, 12:45pm UTC](https://community.dynatrace.com/t/http-text-validation-check-fails/32437/7 "2021-08-23T12:45:40Z")

</div>

That’s excellent news. We’ll make sure the docs get updated. Thanks for the prompt.
