Hi guys,
Since a few weeks I've been testing NagiosXI and it works great. However, we want to monitor websites because we are a webdesign company including our own hosting service. I know I can monitor websites on words that should be on the websites. But I want to monitor on words that should not be on the website, the so called forbidden words like: porn, sex or hacked. How can I monitor that with NagiosXI? Can I do that with the standard check_http or check_http_content or is there a plugin that I've missed in my search quest?
Thanks in advance!
Pepijn
[Website] Forbidden words
Re: [Website] Forbidden words
Most of the check plugins check for expected content, however, you might want to check the nagios exchange (exchange.nagios.org) and see if someone has already written a plugin like this. If not, you would probably modify a copy of one of the existing plugins so that the state return warning and critical instead of OK when certain strings are found.
-
PepijnBosgoed
- Posts: 3
- Joined: Mon Feb 21, 2011 3:47 am
Re: [Website] Forbidden words
@ mguthrie: I've already checked exchange, nagiosplugins.org and nagios.org/download/plugins. But unfortunately I can´t found a plugin which can monitor on the forbidden words. I will try to adjust a normal check, but if anyone can help me by providing such a plugin, I would really appreciate it
Pepijn
Pepijn
Re: [Website] Forbidden words
Here's the pseudo code if you know anyone who's decent at scripting in a particular language.
$arg = <your url>
$contents = fetch text contents of ($url)
process $contents line by line
if there is a regular expression match from the following list (spam and swear words)
print "bad words found!"
exit(2)
else
print "all good"
exit(0)
$arg = <your url>
$contents = fetch text contents of ($url)
process $contents line by line
if there is a regular expression match from the following list (spam and swear words)
print "bad words found!"
exit(2)
else
print "all good"
exit(0)