Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1101

Windows Agent User Parameter Powershell variant

    XMLWordPrintable

Details

    Description

      Currently, it is possible to lauch powershell scripts using the User Parameter feature of a Windows agent. However, this works in a limited fashion since some parameters cannot be correctly passed through ??%systemroot%\system32\windowspowershell\v1.0\powershell.exe. For example, if we launch a script which requires a * somewhere in the parameters, it generates an error.

      For example the user parameter would be:
      UserParameter=oracle.10g.query[*],%systemroot%\system32\windowspowershell\v1.0\powershell.exe -nologo C:\Zabbix\Scripts\Zabbix_Oracle10gQuery.ps1 -TNS $1 -User $2 -Password $3 -IntegratedSecurity $4 -Query $5
      The query parameter would be "SELECT COUNT FROM someTable". Although the script works fine directly called in a PS environment. It breaks when called through the CMD.EXE environment.

      If we could have, say a User Parameter that uses the cmd.exe like we have now, AND a PSUser Parameter that directly invokes PS commands. This would be alot more powerful and would be much more geared towards the futur Windows environments.

      Thank you alot for you time and all your efforts.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              qwerty_logic Pierre-Emmanuel Turcotte
              Votes:
              15 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: