Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a plugin that allows me to nagios looking for a well-defined text in the content of my web page. if the text is found I would ok sion error who can help me please

share|improve this question

The standard plugin check_http can do this:

check_http -H [hostname] -I [ip address] -u [url] -R [text to match]

The check will fail for the usual reasons, but also if the text (or regular expression) is not found in the returned page.

If you want to fail if the text is found, add the option --invert-regex.

share|improve this answer
thanks you very much – user165158 Mar 18 '13 at 10:58
I have HTTP CRITICAL: HTTP/1.1 400 Bad Request - pattern not found - 1270 bytes in 0,069 second response time |time=0,068840s;;;0,000000 size=1270B;;;0 – user165158 Mar 18 '13 at 13:11
Strange that you got a 400. What was the full command line you used? – Flup Mar 18 '13 at 13:36
check_http -H chourouk1 -I @IP -u -R "Site web réalisé par" – user165158 Mar 18 '13 at 13:42
The argument for -u should be the path part of the URL. Try -u /. You might also have to do -H if your host has more than one virtual host. – Flup Mar 18 '13 at 13:58

Flup's answer seems great for a simple page.

If you want to do something similar but need to navigate through a set of login pages, we make use of which allows a test to fill in forms etc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.