Hi there,
I am trying to use check_xi_service_http to search for:
"sealed":false
However the " marks are removed during the parse time. How do I force these to be searched for by the command?
HTTP Content - String containing quotation marks
Re: HTTP Content - String containing quotation marks
Hello @danallery
Thanks for reaching out; understand that you want to check for "text".
I am thinking that we may require the quotes around the complete search, even though it is searching for "sealed":false (will need to test).
Thanks,
Perry
Thanks for reaching out; understand that you want to check for "text".
Code: Select all
./check_http -H www.yourwebsite.com -s ""sealed":false"Thanks,
Perry
Re: HTTP Content - String containing quotation marks
Thanks for the reply, Perry. I did initially try that method, however it would seem that any " quotation marks are ignored that sit within the first and last quotation mark.
I have read this...
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
and found this:
Note that certain special characters need to be escaped. For instance, the < should be replaced with \x3C so
as not to interfere with the XML. Within POST data URL escapes are used, so for instance @ becomes %40.
The problem is I do not know how to format the string, utilizing the scape characters... or what the escape character for " is!
I have read this...
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
and found this:
Note that certain special characters need to be escaped. For instance, the < should be replaced with \x3C so
as not to interfere with the XML. Within POST data URL escapes are used, so for instance @ becomes %40.
The problem is I do not know how to format the string, utilizing the scape characters... or what the escape character for " is!
Re: HTTP Content - String containing quotation marks
I resolved this by using the check_Json function in the end. The page I was monitoring was JSON attribute output, so worked fine.
Re: HTTP Content - String containing quotation marks
Hello @danallery
Thanks for following up and providing the plugin that worked for your use case, this will help others as well. I will go ahead and lock this.
Thanks for following up and providing the plugin that worked for your use case, this will help others as well. I will go ahead and lock this.