Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25953

UserParameter with curl causes Items timeout

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.9
    • Agent (G)
    • 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. 

            zabbix.dev Zabbix Development Team
            mbuz Maksym Buz
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: