Ad Widget

Collapse

Running VB Scripts (Windows Agent)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rogerlawrence
    Junior Member
    • Aug 2014
    • 6

    #1

    Running VB Scripts (Windows Agent)

    Zabbix Agent : 2.2.5
    Zabbix Server OS: Centos 6.5
    Zabbix Server Version 2.2.5
    Agent Host OS: Windows 8 x64

    Trying to Accomplish:
    Monitoring Windows Updates as per online instructions. Technically I'm just using this example so that I can figure out how this works.

    Steps Taken:

    1: Created vbs script on Windows 8 Machine with the following contents:

    Set updateSession = CreateObject("Microsoft.Update.Session")
    Set updateSearcher = updateSession.CreateupdateSearcher()
    Set searchResult = updateSearcher.Search("")
    wscript.echo searchResult.Updates.Count

    2: I can run the vbs script and it returns 4.

    3: Added the following line to zabbix_agentd.conf:

    UserParameter=wua.getnumupdates,%systemroot%\syste m32\cscript.exe /nologo d:\Program Files\Zabbix Agent\getnumupdates.vbs

    4: Created Discovery Rule:

    Name: Windows Updates
    Type: Zabbix agent
    Key: (Tried 2 different Keys) :
    Key 1: wua.getnumupdates[]
    Key 1 Result : Error Not Supported by Zabbix Agent

    Key 2: wua.getnumupdates
    Key 2: Result : Value should be a json object

    Any help would be appreciated! Thank you in advance.
  • Gsmith
    Member
    • Mar 2015
    • 56

    #2
    rogerlawrence,
    Did you ever find out how to get it to work??
    I kind interested in that also, same problem here.

    Comment

    • Gsmith
      Member
      • Mar 2015
      • 56

      #3
      Originally posted by rogerlawrence
      Zabbix Agent : 2.2.5
      Zabbix Server OS: Centos 6.5
      Zabbix Server Version 2.2.5
      Agent Host OS: Windows 8 x64

      Trying to Accomplish:
      Monitoring Windows Updates as per online instructions. Technically I'm just using this example so that I can figure out how this works.

      Steps Taken:

      1: Created vbs script on Windows 8 Machine with the following contents:

      Set updateSession = CreateObject("Microsoft.Update.Session")
      Set updateSearcher = updateSession.CreateupdateSearcher()
      Set searchResult = updateSearcher.Search("")
      wscript.echo searchResult.Updates.Count

      2: I can run the vbs script and it returns 4.

      3: Added the following line to zabbix_agentd.conf:

      UserParameter=wua.getnumupdates,%systemroot%\syste m32\cscript.exe /nologo d:\Program Files\Zabbix Agent\getnumupdates.vbs

      4: Created Discovery Rule:

      Name: Windows Updates
      Type: Zabbix agent
      Key: (Tried 2 different Keys) :
      Key 1: wua.getnumupdates[]
      Key 1 Result : Error Not Supported by Zabbix Agent

      Key 2: wua.getnumupdates
      Key 2: Result : Value should be a json object

      Any help would be appreciated! Thank you in advance.
      I found this very helpful.
      Join the friendly and open Zabbix community on our forums and social media platforms.

      Comment

      Working...