hi experts, i'm new to zabbix but i knew that with external link i can monitor api rest aps
so i want to start simple and get something basic like http code with a python scripts
import requests
try:
r = requests.head("http://show.cl")
print(r.status_code)
codigo_http = r.status_code
if codigo_http == 200:
print("1")
else:
print("0")
# prints the int of the status code. Find more at httpstatusrappers.com
except requests.ConnectionError:
print("failed to connect")
i read this https://www.zabbix.com/documentation...types/external but is not a howto, can you help me to connect the dots
after this, create a host
host > items : external check and key the name of the script
admin > scripts > and i added this get_test Script Agent usr/lib/zabbix/externalscripts/test.sh
now i'm i dont know if can i use a python or bash?
when you running i think in the background the user zabbix runs it ans get the exit code of the script and decide if it's ok or not?
or print in the if 1 or 0 it's works? or i have to create a bash scrip and get: echo $?
so i want to start simple and get something basic like http code with a python scripts
import requests
try:
r = requests.head("http://show.cl")
print(r.status_code)
codigo_http = r.status_code
if codigo_http == 200:
print("1")
else:
print("0")
# prints the int of the status code. Find more at httpstatusrappers.com

except requests.ConnectionError:
print("failed to connect")
i read this https://www.zabbix.com/documentation...types/external but is not a howto, can you help me to connect the dots
after this, create a host
host > items : external check and key the name of the script
admin > scripts > and i added this get_test Script Agent usr/lib/zabbix/externalscripts/test.sh
now i'm i dont know if can i use a python or bash?
when you running i think in the background the user zabbix runs it ans get the exit code of the script and decide if it's ok or not?
or print in the if 1 or 0 it's works? or i have to create a bash scrip and get: echo $?
Comment