View Full Version : WEB monitoring howto ?
Philippe
02-07-2007, 15:18
hello,
i have zabbix 1.4.1 with WEB monitoring enabled.
the only thing is that i don't know how it works...
how can i monitor a static site ? let's say google to test ?
in web application ==> just write something like web ?
name ==> internet ?
agent ==> which one do i have to choose ??
steps
==> name ==> google
url ==> www.google.com
and that's it ?
should it work like that ?
doesn't work for me but i am probably doing things wrong.
could someone send me on the right track please ?
thnx,
Ph.
unilogic
02-07-2007, 19:27
Pretty much how it works. You do need to put in a respone code typically (200 is OK) to check that the page loaded correctly if thats what you're trying todo.
I'd love to know what the Required field is used for though. It'd be great if the manual actually had a how-to on this section.
I'm hoping I can match a string in the middle of the page that is a result of a search. Anyone know if this is possible with web monitoring.
Thanks,
Ben
Philippe
03-07-2007, 08:42
in my test i get the message:
Failed on "www.google.be" [1 of 1] Error: couldn't resolve host name
in the logging i get:
Error doing curl_easy_perform [couldn't resolve host name]
my zabbix installation command was:
./configure --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl
any idea ?
thnx.
unilogic
03-07-2007, 08:51
Can the server resolve www.google.be normally? i.e. try pinging it. Does Zabbix by chance need you to put http:// in the link?
Philippe
03-07-2007, 08:59
we are behind a firewall but my zabbix server can access internet completely.
a ping is not allowed but i didn't thought that it was done with a ping ?.
i added
-x 10.10.10.10:80 (not real address)
in /root/.librc and with that i could perform the following:
curl www.google.com
and i received a lot of data on the screen so this shows that it works with the proxy ?
in zabbix log file i still get:
Error doing curl_easy_perform [couldn't resolve host name]
If the Required string in non empty, than ZABBIX checks if a retrieved page contains it. It won't process further steps if content of the page has no this string.
Hi Alexei,
Does the Required string accept regular expressions?
Thanks,
Justin.
Yes, it does accept Posix style regular expression!
Fantastic, thanks very much Alexei.
bbrendon
07-07-2007, 21:41
What about referrers? Can this be added to make it seem more like a real browser?
Hi,
I'm trying to make a scenario, but I'm getting an error !
server log :
Error doing curl_easy_perform [couldn't connect]
config of the scenario on Zabbix_server:
application = general
name = relou
agent = mozilla 1.5 on Linux (the version of the browser is important ?)
status = active
variable = none
steps :
name = google_fr
URL = http://www.google.fr
post = none
timeout = 15
required = none
code = 200
Thank's in advance !
in case you still have the problem its because of the http:// at the start of the URL. I've just recreated it here, and removing the HTTP:// fixes the problem.
Just to add to the question, is there a way I can display this on a screen. Say I have 100 web sites to monitor, is it possible to have a display that will say x number of sites down or something along those lines?
in case you still have the problem its because of the http:// at the start of the URL. I've just recreated it here, and removing the HTTP:// fixes the problem.
Thanks for your answer !
I removed "http://" but I always have the same error :
In web interface = Failed on "test_google" [1 of 1] Error: couldn't connect
in server log = Error doing curl_easy_perform [couldn't connect]
In steps part, what 'status code' do it means ?
Can you put a complete configuration (like I do) which it is working for you ?
Thanks in advance.
In steps part, what 'status code' do it means ?
Expected HTTP/HTTPS status returned. 2xx are generally successes, 4xx are various errors like File not Found (404) or authentication problems (403 Forbidden), 5xx are server errors (500 Internal Server Error).
What the status is saying is if you get this return (200) everything is good, if not raise an alarm.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
I donwloaded updated ZABBIX Manual 1.4 Rev 10. It has a chapter on WEB monitoring. Please let me know in case of any errors or missing information.