From the above out i want to monitor that word RUNNING appears twice = ok
RUNNING appears once = critical or warning
RUNNING does not appear = critical.
Below is what i tried but am not satisfied with what its doing,
You can use a regex to check it .*(RUNNING).*(RUNNING).*, this would check both of them.
As soon it doesnt match you, the service should go into non ok state.
Doesn’t seem to be working, I also tried playing around with wildcards but still not working says string not found…
check_http -H my.website -u “my.path/path/status” -S -s ".(RUNNING).(RUNNING)."
HTTP CRITICAL: HTTP/1.1 200 OK - string '.(RUNNING).(RUNNING).’ not found on ‘https://my.website:443/path’
I would like to ask you to mark the answer that solved your issue as the solution, as it helps others find it quicker and tells people that your problem has already been dealt with
I see your problem, you only set the http_address (-I on commandline) and not the http_vhost (-H on commandline). Set bot in your case to $host.address$ or if different to the same IPs.
This time it says; HTTP CRITICAL: HTTP/1.1 400 Bad Request - pattern not found
in the commandline
root@server:~# ‘/usr/lib64/nagios/plugins/check_http’ ‘-H’ ‘mysite.name.com’ ‘-I’ ‘10.x.x.10’ ‘-p’ ‘443’ ‘-u’ ‘/mypath/online/status’ ‘-r’ ‘.(RUNNING).(RUNNING).*’
HTTP CRITICAL: HTTP/1.1 400 Bad Request - pattern not found
Now you can add a -vvv to the command line to see what you get from the webserver.
I think you have to add the bolean var http_ssl to the service. The Director sadly fails to create those wars while importing commands with a set_if in the argument.
Every time i add (vars.http_ssl = true) to the services.conf and i restart icinga2 the settings disappears;
May be am adding in a wrong place, Please check the screenshot.
If you use Director you should never edit config files manulay that are created by director. Add the variable to the command and the service with director and it should stay there.
Here is how my template looks like
Thats a bug from director, director cant automaticly import arguemnts/fields that are bolean.
Just add them manualy and add them to the command or at the service template.