Skip to content

Instantly share code, notes, and snippets.

@kujiy
Created March 1, 2017 00:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kujiy/843c7f878b80384b72e8868756245c0d to your computer and use it in GitHub Desktop.
Save kujiy/843c7f878b80384b72e8868756245c0d to your computer and use it in GitHub Desktop.
Zabbix external script with curl; monitoring external websites
# How to use
# Add an item on zabbix-web admin
# curl[example.com]
#
# Test command on zabbix-server
# [root@zabbix /]# zabbix_get -s 192.168.20.212 -k "curl[example.com]"
UserParameter=curl[*],curl -sI $1 | grep -q "HTTP/1.1 200 OK" && [[ $? == 0 ]] && echo 0 || echo 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment