Http_Check pattern/string search

Hi all,

I want to monitor on a website with Icinga and on the website should be twice Status:RUNNING and if that is not found or found only once then a Critical should be displayed.

I already tried with regex, but it will not be critical if it is found even once.

.*RUNNING.RUNNING. or (.*RUNNING|.*RUNNING)

does anyone have an idea how i can solve it?

yes, but please post upload a txt doc with exactly the content of the page you want to parse.
what you insert here is regex.

it can be any websites.

For example, on Google.com “Google Search” and “I’m Feeling Lucky” should both be present. If only one of them is found then Critical should appear.

i told you what I need …

Sorry but I am not allowed to share the content therefore the example with Google… Would be nice if you could still help me because it is about word search on web page.

Can you tell me if this is feasible with regex? I could create two checks and search both on a word but would be clever if it was feasible with one check.

The important thing is that both words should exist on the website and if one or both of them is not findable anymore then a critical message should appear.

I would be very grateful for your help.

sorry pal, too much effort to do something that most likely won’t work because there are some strange artefacts on the page or some id/names with running that causes false positives.

ok, I see. Thank you very much.

Can we possibly check the other way around because if there is no running then “Stopped” is displayed. Can I configure the check so if the word “Stopped” is found then a critical message is given, would that be possible?

yes you can try so search for “Stopped” but if stopped is somewhere else in your html page you get false positives.

there is no knowing without trying :slight_smile:

1 Like