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 to be notified when our proxy server goes down. Currently I have a bash script that tests the proxy functionality:

CHECKRESULT=(curl -s --proxy | awk '{print $6}' | sed 's/<\/body><\/html>\r//g';)

if [ "$CHECKRESULT" != "" ]
                                echo "FAILED: proxy returned \" $CHECKRESULT\""

I'm just getting started with Zabbix and would like to use it to run a similar check, but how?

share|improve this question
up vote 3 down vote accepted

Zabbix, when compiled with CURL support, can directly monitor web services including complex more steps scenarios. You can setup triggers on HTTP return code, returned data, response time...

Documentation here.

share|improve this answer
If I'm not mistaken Web items are run from the Zabbix server, not the Zabbix agent. – Red Tux Aug 15 '12 at 7:52
Yes, complex scenarios are run from Zabbix server, but since 2.0 there are* items in Zabbix agent, which can do simple checks. – nudzo Aug 15 '12 at 20:00
Thanks! This is perfect, from the doc: "To use HTTP proxy, set the http_proxy environment variable for Zabbix server user. For example, http_proxy=proxy_ip:proxy_port."; Exactly what I need. – Antonius Bloch Aug 16 '12 at 19:26

Assuming your existing script works well and does what you need, what you want to setup is an external check as described at

Your script goes in the directory specified in your zabbix configuration for ExternalScripts - likely something like /etc/zabbix/externalscripts. Make sure it has appropriate permissions for the zabbix user to be able to execute it.

In the template or host, create a new item, and set the type to external check, and set the key to the name of your script.

Then create a trigger that looks for the "FAILED" line and alerts you.

share|improve this answer
Thanks. I'm going to go with the "web monitoring" solution baked into Zabbix, but I know I'm going to end up using this as well. Great info for a Zabbix noob. – Antonius Bloch Aug 16 '12 at 19:34

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.