Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Help with ResponseValidationError: Response did not contain the expected string



Hi I am completely new to NewRelic. I’m trying to set up my first monitor and it gives an error: ResponseValidationError: Response did not contain the expected string - i set up my monitor to find a string in my page. Apparently it does not find it, although I see it clearly when I browse to the page. Can someone help me out; I can’t find any info on this error…


Hi @harry104 - I have found that if the string is in parts across elements, such as <p>start <span>of paragraph</span></p> where you are looking for “start of paragraph” as the string; then it may not be found. Try smaller parts of the string being looked for which is unique enough to validate the page.


Thanks stefan_garnham!

With my monitor, I’m looking for the text: Examples of work, and in code it looks like this:

Examples of work

And in the Response Validation field, I only entered the text: Examples of work, directly copied from the source. Still, it fails! Any other tips?


Sorry, without viewing the page I am not sure what additional information I can provide.


Hi stefan_garnham,

I’m not allowed to add links in the thread apparently, but the page is: staging dot designbro dot com and I’m trying to monitor the ‘Examples of work’ section


Having looked at the page and viewing the source, I can see that the majority of the page content is not in the page’s <html>. The only item that you will find will be the Designbro title.


Hi Harry,

Is check being performed by a ping monitor? If so, the request performed is a basic HTTP GET request which means there is no browser rendering. Doing a curl -XGET to the address you shared, I can see that the string you mentioned is not in the content of the response, and that this string along with the web app’s content, would only be rendered in a browser context.


I’m faced with a similar issue where the Ping monitor fails with error “ResponseValidationError: Response did not contain the expected string ‘{ “status” : “UP”, “LDAPHealth” : { “status” : “UP” …’”
I ran a curl command and the output matches my response validation -
“status” : “UP”,
“LDAPHealth” : {
“status” : “UP”
“db” : {
“status” : “UP”,
“database” : “PostgreSQL”,
“hello” : 1
Is the formatting of this output (above) the issue why Ping monitor complains?


Hi @priyadarshini.r.kolw, the response from the cURL is actually in JSON format so would not be a string. The String Validation actually applies to the HTML source code of the target page, and the string must be in the first 1mb of data. Hope this helps :slight_smile: