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

Response from Ping monitor


I’m faced with an 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: I suspect that Synthetics is doing an exact string comparison. The response contains newline characters, while your validation string does not.


Thank you for the reply @philweber. Can the response validation contain newline characters or any workarounds?
I tried a couple of, but none worked -

{\r\n “status” : “UP”,\r\n “LDAPHealth” : {\r\n “status” : “UP”\r\n },\r\n “db” : {\r\n “status” : “UP”,\r\n “database” : “PostgreSQL”,\r\n “hello” : 1\r\n }\r\n}


Hi, @priyadarshini.r.kolw: It looks like Ping monitors are designed to validate simple (single-line) strings in the response, such as {"status":"UP"}. I have not been able to get a Ping monitor to recognize a multi-line validation string.

To validate more complex responses, you may use an API Test monitor (which is, unfortunately, not free).


Thanks for your reply @philweber. I think I’ll go the API route.