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

Userparameters that use PowerShell no longer work after upgrading to 7.0.12

XMLWordPrintable

    • Sprint candidates
    • 1

      Initial Setup

      Recently I implemented a UserParameter via PowerShell script to monitor Veeam Backup and Replication Job information, as a means to universally have this information in Zabbix (current Veeam API limitations meant that clients running Hyper-V could not be queried to the same extent as ESXI).

      The UserParemeter is defined in ./zabbix_conf.d/VBR-userparameters.conf:

      `UserParameter=veeam.jobs.powershell,powershell -ExecutionPolicy Bypass -File "C:\Scripts\VBR-GetJobInformation.ps1" $1`

      On machines running Zabbix Agent2 versions up to 7.0.11 this works fine and returns the correct information.

      Steps to reproduce:

      1. Update Agent2 to version 7.0.12
      2. Attempt to execute existing Userparameters that rely on PowerShell script (as described above)
      3. Error appears in logs, and checks time out in Zabbix Console

      Result:

      Zabbix Agent2 Logs:
      ```
      2025/04/23 13:51:26.376706 received passive check request: '{"request":"passive checks","data":[

      {"key":"veeam.jobs.powershell","timeout":30}

      ]}' from '10.42.10.36'
      2025/04/23 13:51:26.377225 [1] processing update request (1 requests)
      2025/04/23 13:51:26.378922 [1] adding new request for key: 'veeam.jobs.powershell'
      2025/04/23 13:51:26.379379 [1] created direct exporter task for plugin 'UserParameter' itemid:0 key 'veeam.jobs.powershell'
      2025/04/23 13:51:26.379379 executing direct exporter task for key 'veeam.jobs.powershell'
      2025/04/23 13:51:26.380013 [UserParameter] executing command:'powershell -ExecutionPolicy Bypass -File "C:\Scripts\test.ps1"'
      2025/04/23 13:51:26.432374 cannot assign process to a job: The handle is invalid.
      2025/04/23 13:51:26.433015 attempting to terminate process because normal processing was interrupted by error: The handle is invalid.
      ```

      Zabbix Get output:
      ```
      zabbix_get -s x.x.x.x -p 10050 -k veeam.jobs.powershell
      ZBX_NOTSUPPORTED: Timeout occurred while gathering data.

      ```

       

      Expected:
      JSON data to be returned to zabbix console

            esneiders Eriks Sneiders
            enigmaticaussie Adrian
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: