Ad Widget

Collapse

Wrong host information detected by Zabbix Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brian
    Member
    • Dec 2009
    • 45

    #1

    Wrong host information detected by Zabbix Agent

    On a Windows Vista and Windows 2008 hosts the Agent (v1.8) reports wrong host information:

    Windows Vista:
    Windows COMPUTERNAME 6.0.6002 Windows Server 2008 Service Pack 2 Intel IA-32

    Windows 2008 SP2 domain controller:
    Windows SERVERNAME 6.0.6002 Windows NT 6.0 Service Pack 2 Intel IA-32

    We have another Win2008 domain controller, which returns correct host information:

    Windows SERVERNAME 6.0.6002 Windows Server 2008 Service Pack 2 Intel IA-32


    Anyone else noticed this?
    I use the host information for auto-discovery scripts, so the words "XP", "SERVER" "2008" are important for me.
  • sbsjclark
    Junior Member
    • Nov 2011
    • 14

    #2
    Same Problem

    Yes. I experince the same issue.

    Comment

    • brian
      Member
      • Dec 2009
      • 45

      #3
      Solution...

      Create a vbscript file, I named it chk_winver.vbs

      Code:
      Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime")
      strComputer = "."
      Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
      Set oss = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
      
      For Each os in oss
          Wscript.Echo os.Caption & os.Version
      Next
      I placed the above file to Zabbix install dir.

      Add the following line your zabbix_agentd.conf:

      Code:
      UserParameter=WindowsVersion,cscript.exe /nologo "c:\Program Files\Zabbix Agent\chk_winver.vbs"
      Create an item in Zabbix in you Windows template(s)
      Key: WindowsVersion
      type: Character

      You should see values like this:
      Microsoft Windows Server 2008 R2 Standard 6.1.7601
      Microsoft Windows 7 Professional 6.1.7601

      no you can use this item to separate Windows 7 and Windows 2008 computers

      As I am distributing and updating Zabbix via logon scripts it was no problem distributing the vbs file into Zabbix directory on every computer.

      Comment

      Working...