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

Zabbix Agent active remote command execution in an action

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.13, 7.2.7
    • Agent2 (G), Server (S)
    • None

      Steps to reproduce:

      1. Create a host
      2. Create an item (zabbix trapper) and a trigger
      3. Alerts->Scripts->Create Script
        Scope: action operation
        Type: Script
        Execute on: Zabbix Agent
        Commands: echo $(date) >> /tmp/out.expl
      4. Create an action to respond to the trigger event
        Operation: Choose the created script
        Steps: 1-0
        Step duration: 1m
        Target list: Current host checked
      5. Trigger the trigger

      Result:

      The script fails with a time out message, sometimes succeeding

      Expected:
      Always succeed

       

      One of the implementations configuration

      Agent2
      podman run --name zabbix-agent2 -e ZBX_SERVER_HOST="127.0.0.1,localhost" -e ZBX_HOSTNAME="Host A" -e ZBX_ALLOWKEY="system.run[*]" -e ZBX_REFRESHACTIVECHECKS=2 --restart=always --pod=zabbix72 -d docker.io/zabbix/zabbix-agent2:alpine-7.2-latest

      MySQL Server
      podman run --name mysql-server -t -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix_pwd" -e MYSQL_ROOT_PASSWORD="root_pwd" -v ./mysql/:/var/lib/mysql/:Z --restart=always --pod=zabbix72 -d docker.io/library/mysql:8.0 --character-set-server=utf8 --collation-server=utf8_bin --default-authentication-plugin=mysql_native_password

      Zabbix Server
      podman run --name zabbix-server-mysql -t -e ZBX_TIMEOUT=30 -e DB_SERVER_HOST="127.0.0.1" -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix_pwd" -e MYSQL_ROOT_PASSWORD="root_pwd" --restart=always --pod=zabbix72 -d docker.io/zabbix/zabbix-server-mysql:alpine-7.2-latest

      Frontend
      podman run --name zabbix-web-mysql -t -e ZBX_SERVER_HOST="127.0.0.1" -e DB_SERVER_HOST="127.0.0.1" -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="zabbix_pwd" -e MYSQL_ROOT_PASSWORD="root_pwd" --restart=always --pod=zabbix72 -d docker.io/zabbix/zabbix-web-nginx-mysql:alpine-7.2-latest

       

      Also tested in VMs

            zabbix.support Zabbix Support Team
            gustavo.guido@custos.uy Gustavo Guido
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: