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

Add Agent item for WMI discovery

XMLWordPrintable

    • Sprint 56 (Sep 2019), Sprint 57 (Oct 2019)
    • 2.5

      Would be useful to have functionality where WMI query could be converted to JSON that can be supplied for LLD. The item syntax could be the same as for wmi.get[].

      Currently the work around is to use system.run or UserParameters utilizing powershell, but that requires at least Windows 2012 or Windows Management Framework with ConvertTo-Json command and You also have to convert all property names before piping array of hashes to ConvertTo-Json. Additionally this creates administrative overhead for distributing helper scripts to agents.

      snip from PS code to convert object property names to LLD macros
              $obj | Get-Member | % {
                  $PropertyName=$_.Name
                  $Value=$obj.$PropertyName
                  $HashName="{#" + $PropertyName.ToUpper() + "}"
                  if ($_.MemberType -ne "Method" -and $_.MemberType -ne "ScriptMethod" ) {
                      $hash.Add($HashName, $Value)
                      if ($PropertyName -like "*Time") {
                          if (($obj | Get-Member -MemberType "ScriptMethod" -Name ConvertToDateTime) -ne $null) {
                              Write-Debug "Converting $PropertyName($Value) to unix timestamp"
                              $hash[$HashName]=$($obj.ConvertToDateTime($Value)) | ConvertTo-UnixTimestamp
                          }
                      }
                  }
              }
      

        1. image-2019-10-03-11-02-57-867.png
          29 kB
          Vitaly Zhuravlev
        2. lld.xsl
          2 kB
          Evgeny Kravchenko
        3. Screenshot from 2019-09-13 09-39-57.png
          43 kB
          Michael Veksler

            MVekslers Michael Veksler
            marcis Mārcis Lielturks
            Team A
            Votes:
            10 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: