Question about regex in configuration


I have currently a problem with my icinga2 configuration (version: 2.13.2-1). I want to configure a check to call an api. If I call the api with curl, I will get “USER:NO”

And then I have configured it for icinga and it works.
check_command = “http”
vars.http_vhost =
vars.http_uri = “/api/xxx/xxx/check/”
vars.http_ssl = true
vars.http_string = “"USER":"NO"”

Then I think, maybe I can add a regex in “http_string”, for example if there is one or more spaces between “USER” and “NO”.
vars.http_string = “"USER":\s*"NO"”

From Icinga web I have seen the configuration, but I am not sure if it’s right.
http_string “USER”:\s*“NO”

But the check doesn’t work any more. And now I have a question, is the configuration incorrect or I need to enable sth. in icinga to get the regex work?


I have found a solution - replace http_string with http_expect_body_regex. With http_expect_body_regex I am able to use regex.