Ad Widget

Collapse

Script VBS não funciona

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fabiano
    Junior Member
    • Jun 2015
    • 4

    #1

    Script VBS não funciona

    tenho um script que baixei para pegar o numero de updates do windows, esta funcionando perfeitamente quando executo manualmente, porem quando executado pelo zabbix ele retorna vazio.

    fiz um teste colocando a saida por um txt.

    script abaixo:

    Set updateSession = CreateObject("Microsoft.Update.Session")
    Set updateSearcher = updateSession.CreateupdateSearcher()
    Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")
    WScript.Echo searchResult.Updates.Count


    alterações no conf:

    EnableRemoteCommands=1

    UserParameters=1

    UserParameter = wu.all,%systemroot%\system32\cscript.exe /nologo /T:30 "C:\Agent\scripts\zabbix_wus_update_all.vbs"
  • Fabiano
    Junior Member
    • Jun 2015
    • 4

    #2
    Alguem mnitora os updates de forma diferente?

    Porque não há o que faça funcionar dessa forma.

    Detalhe: monitoro servidores Windows Server 2012 geralmente


    agora quando executo a linha assim:

    UserParameter = wu.all,%systemroot%\system32\cscript.exe /nologo /T:30 C:\Agent\scripts\zabbix_wus_update_all.vbs > c:\tmp\log\zb.log

    dentro do log ele esta conseguindo colocar a quantidade de updates, o meu problema acredito que esteja nessa expressão dentro da Trigger:

    {ZBX-WINDOWS-ENVMON:wu.all.last(0)}>0

    estou "comendo bola" em algo?

    Comment

    Working...