-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.9
-
None
-
Support backlog
Steps to reproduce:
Create UserParameter. Additional parameters passed via frontend:
UserParameter=custom.url.status[*],/etc/zabbix/userparameters/scripts/linux_url_status.sh $1 $2
linux_url_status.sh is a simple script, which returns status 0 if url is available or 1, if not.
expected_output=$1 current_status=$(curl -sLk --max-time 10 $2 | tr '><[]' ' ' | egrep -i "$expected_output")if [ -n "$current_status" ];then echo "0" else echo "1" fi
Add some non working URLs
Result:
See screenshot...
Some of the items are returning 1, as expected, some - failing with Timeout error. In case of having a lot of such checks - other agent items may falling too.
Timeout set to 20 seconds. --max-time for curl set to 10 seconds.