cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

http text validation check fails

Yosi_Neuman
DynaMight Guru
DynaMight Guru

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

 

as can be seen from postman running on the same machine

Yosi_Neuman_0-1629301430010.png

test is falling on this  validation.

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

Yosi_Neuman_2-1629301652558.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

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   

 

 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel
6 REPLIES 6

ryan_ott
Dynatrace Mentor
Dynatrace Mentor

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: https://www.dynatrace.com/support/help/shortlink/http-monitors-config#anchor-http-additional-options 

ryan_ott_0-1629309325249.png

 

ACE Consultant, Dynatrace Services
Dynatrace Certified Professional

Hi @ryan_ott ,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

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

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

HannahM
Dynatrace Leader
Dynatrace Leader

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  api.info in the post-execution script like this:

var responseBod = response.getResponseBody();

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

 

Best wishes, Hannah

Synthetic SME and community advocate.

Hi @HannahM Thanks for your tests and update

I also 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 api.info - it will be good to add this information to documentation.

All the best and stay safe

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Hi @HannahM 

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

Thanks a lot 

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

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

 

Synthetic SME and community advocate.

Featured Posts