Ad Widget

Collapse

Host inventory as it should be (cpuz integration)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HDR
    Junior Member
    • Feb 2013
    • 3

    #46
    Dear mmarkwitzz. Thant you for this great add-on!

    I using INV inventory for a few windows servers, based on virtual mashines, some of them works pretty good, some not.

    My investigations shows, that only keys "name", returns results to frontend, "OS", "network", "oop", "style" return some data only in command prompt run, for. ex.:
    c:\zabbix>cscript "C:\zabbix\zabbix_inv_inventory.vbs" //Nologo "oop" "" ""
    3/20/2013 5:38:31 PM

    Keys "software" and "hardware" returns nothing at all.

    zabbix_agentd.log in verbose mode:
    "request":"active checks",
    "host":"AlteilgameWin2k802"}]
    3808:20130320:081001.764 Before read
    3808:20130320:081001.764 Got [{
    "response":"success",
    "data":[]}]
    (between [] returns many data at the working machines)

    Zabbix_inv_inventory.log is absent.

    Tables is absent at all.

    Can you explain, whats wrong?
    Last edited by HDR; 21-03-2013, 10:56.

    Comment

    • zabbn00b
      Member
      • May 2012
      • 40

      #47
      Thought i'd provide some feedback, awesome work!

      I've made some changes that others might like.

      I use the dark grey orange theme so i've updated the CSS to reflect that...now it looks like:


      Edit the zabbix_inv_inventory.vbs style section with the following:
      Check out the attached txt file, i couldn't paste the css in here for some reason.

      Also i've added an asset table, i know this seems dumb with the mb info but for me it stands out better and its the info i need. Also it grabs the part number and serial number accurately for 2003.

      Add the following function to the zabbix_inv_inventory.vbs
      Code:
      'GET ASSET INFORMATION
      Function GetAsset
       'wscript.echo "In Asset"
       'GET MOTHERBOARDS
       Set colModels = objWMI.ExecQuery("Select * from Win32_ComputerSystem")
       'GET BIOS
       Set colBIOSs = objWMI.ExecQuery("Select * from Win32_BIOS") 
       
       'SET TABLE
       Dim arrTable()
       ReDim arrTable(4 - 1, colModels.Count)
       'SET HEADER
       Dim arrHeader
       ReDim arrHeader(4 - 1)
       
       'HEADER
       arrHeader(0) = "Manufacturer"
       arrHeader(1) = "Model"
       arrHeader(2) = "Part Number"
       arrHeader(3) = "Serial Number"
       
       'EACH MOTHERBOARD
       c = 0
       On Error Resume Next
       For Each objModel In colModels
        'MANUFACTURER
        arrTable(0, c) = objModel.Manufacturer
        'MODEL
        If (Len(objModel.Model) > 0) Then
         arrTable(1, c) = objModel.Model
        Else
         arrTable(1, c) = objModel.Product  
        End If
        'PART NUMBER
        If (Len(objModel.PartNumber) > 0) Then
          PartNo = Split(objModel.OEMStringArray(1), "Product ID: ")
          arrTable(2, c) = PartNo(1)
        Else
         arrTable(2, c) = objModel.PartNumber
        End If
        'INC
        c = c + 1
       Next 
       
       'EACH BIOS
       For Each objBIOS In colBIOSs
        'Serial
        arrTable(3, 0) =  objBIOS.SerialNumber
       
       Next
       If (c = 0) Then c = 1
       'RESULT
       GetAsset = "Asset:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c) & "<br>"
      End Function
      Edit the GetMotherBoard function line:
      Code:
      GetMotherBoard = "Motherboard:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c)
      
      TO
      
      GetMotherBoard = GetAsset & " Motherboard:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c)
      Thanks again.
      Attached Files

      Comment

      • sccuser
        Member
        • May 2013
        • 77

        #48
        Originally posted by HullZabbix
        Great idea using cpuz. I wish I thought of this before writing customised vbs scripts!

        I made a post in this thread with my way of doing it:


        The only advantage my way has, is that the host inventory overview screen is quite clear.



        Though I did need to edit the inventory php to customise the columns. (got rid of mac address etc.)

        I'm curious as to how it will look with your method.

        I did write several vbs scripts to get specific info if anyone is interested

        BIOS:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colBIOSItems = objWMIService.ExecQuery("Select * from Win32_BIOS")
        
        For Each objItem in colBIOSItems
        	stringBIOS = objItem.Manufacturer & vbcrlf & "Name: " & objItem.Name & vbcrlf
        	Next
        	
        Wscript.Echo stringBIOS
        CPU:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colCPUItems = objWMIService.ExecQuery("Select * from Win32_Processor")
        
        For Each objItem in colCPUItems
        	StringCPU = objItem.Name & vbcrlf & "Socket Designation: " & objItem.SocketDesignation & vbcrlf & "Current Clock Speed: " & objItem.CurrentClockSpeed & vbcrlf & "L2 Cache Size: " & objItem.L2CacheSize & vbcrlf & "Ext Clock: " & objItem.ExtClock & vbcrlf
        	Next
        	
        Wscript.Echo stringCPU
        GFX:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colGFXItems = objWMIService.ExecQuery("Select * from Win32_VideoController")
        
        For Each objItem in colGFXItems
        	stringGFX = objItem.Description & vbcrlf & "Adapter RAM: " & (objItem.AdapterRAM / 1048576) & "MB" & vbcrlf & "Driver Date: " & objItem.DriverDate & vbcrlf & "Driver Version: " & objItem.DriverVersion & vbcrlf & "Video Mode Description: " & objItem.VideoModeDescription & vbcrlf
        	Next
        	
        Wscript.Echo stringGFX
        HD:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colHDItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
        
        numberOfDisks = -1
        For Each objItem in ColHDItems
        	numberOfDisks = numberOfDisks + 1
        	Next
        Dim myArray()
        reDim myArray(numberOfDisks)
        j = 0
        
        For Each objItem in colHDItems
        	myArray(j) = "HD" & j & "" & vbcrlf & objItem.Model & vbcrlf & "Size: " & FormatNumber((objItem.Size/1000000000), 0) & "GB" & vbcrlf & "Interface: " & objItem.InterfaceType & vbcrlf & "Media Type: " & objItem.MediaType & vbcrlf & "Partitions: " & objItem.Partitions & vbcrlf
        	j = j + 1
        	Next
        	
        Wscript.Echo Join(myArray,vbcrfl)
        MB:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colMBItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
        
        For Each objItem in colMBItems
        	stringMB = objItem.Manufacturer & vbcrlf & "Model: " & objItem.Model & vbcrlf & "Part Number: " & objItem.PartNumber & vbcrlf & "Product: " & objItem.Product & vbcrlf & "Serial Number: " & objItem.SerialNumber & vbcrlf & "Version: " & objItem.Version & vbcrlf
        	Next
        	
        Wscript.Echo stringMB
        OS:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colOSItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
        
        Set WshShell = WScript.CreateObject("WScript.Shell")
        Architecture = WshShell.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")
        
        If Architecture = "AMD64" Then
           OSArchitecture = "64-bit"
        ElseIf Architecture = "x86" Then
           OSArchitecture =  "32-bit"
        End If
        
        For Each objItem in colOSItems
        	stringOS = objItem.Caption & " " & objItem.Version & " " & OSArchitecture
        	Next	
        
        Wscript.Echo stringOS
        RAM:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        set colMEMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")
        Set colMEMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")
        
        memType = array("Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM","RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR","DDR-2")
        memForm = array("Unknown","Other","SIP","DIP","ZIP","SOJ","Proprietary","SIMM","DIMM","TSOP","PGA","RIMM","SODIMM","SRIMM","SMD","SSMP","QFP","TQFP","SOIC","LCC","PLCC","BGA", "FPBGA","LGA")
        
        strMemory = ""
        i = 1
        For Each objItem In colMEMItems
        	if strMemory <> "" then strMemory = strMemory & vbcrlf
        	strMemory = strMemory &  "Bank" & i & " : " & (objItem.Capacity / 1048576) & "MB"
        	i = i + 1
        	memoryForm = memForm(objItem.FormFactor)
        	memoryType = memType(objItem.MemoryType)
        	memorySpeed = objItem.Speed
        	memoryTotal = memoryTotal + (objItem.Capacity / 1048576)
        	Next
        	installedModules = i - 1
        
        For Each objItem in colMEMAItems
        	totalSlots = objItem.MemoryDevices
        	stringMEM = memoryTotal & "MB " & memoryType & " " & memorySpeed & "MHz" & vbcrlf & "Form: " & memoryForm & vbcrlf & "Total Slots: " & totalSlots & vbcrlf & "Free Slots: " & (totalSlots - installedModules) & vbcrlf & strMemory & vbcrlf
        	Next
        
        Wscript.Echo stringMEM
        And finally a short script which is used for "hardware" the screenshot, this picks info I need and groups it so it's easily read.

        ShortHWFull:
        Code:
        On Error Resume Next
        
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Set colCPUItems = objWMIService.ExecQuery("Select * from Win32_Processor")
        set colMEMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")
        Set colMEMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")
        Set colHDItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
        Set colGFXItems = objWMIService.ExecQuery("Select * from Win32_VideoController")
        Set colMBItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
        Set colBIOSItems = objWMIService.ExecQuery("Select * from Win32_BIOS")
        
        
        For Each objItem in colCPUItems
        	StringCPU = "|| CPU: "& objItem.Name
        	Next
        	
        memType = array("Unknown","Other","DRAM","Synchronous DRAM","Cache DRAM","EDO","EDRAM","VRAM","SRAM","RAM","ROM","Flash","EEPROM","FEPROM","EPROM","CDRAM","3DRAM","SDRAM","SGRAM","RDRAM","DDR","DDR-2")
        memForm = array("Unknown","Other","SIP","DIP","ZIP","SOJ","Proprietary","SIMM","DIMM","TSOP","PGA","RIMM","SODIMM","SRIMM","SMD","SSMP","QFP","TQFP","SOIC","LCC","PLCC","BGA", "FPBGA","LGA")
        
        For Each objItem In colMEMItems
        	memoryType = memType(objItem.MemoryType)
        	memoryTotal = memoryTotal + (objItem.Capacity / 1048576)
        	Next
        
        For Each objItem in colMEMAItems
        	totalSlots = objItem.MemoryDevices
        	stringMEM = "|| RAM: " & memoryTotal & "MB " & memoryType
        	Next
        
        numberOfDisks = -1
        For Each objItem in ColHDItems
        	numberOfDisks = numberOfDisks + 1
        	Next
        Dim myArray()
        reDim myArray(numberOfDisks)
        j = 0
        
        For Each objItem in colHDItems
        	myArray(j) = "|| HD" & j & ": " & objItem.Model & " " & FormatNumber((objItem.Size/1000000000), 0) & "GB" & " " & objItem.InterfaceType & " "
        	j = j + 1
        	Next
        	
        For Each objItem in colGFXItems
        	stringGFX = "|| GFX: " & objItem.Description
        	Next
        	
        For Each objItem in colMBItems
        	stringMB = "|| MB: " & objItem.Manufacturer & " " & objItem.Product
        	Next
        
        For Each objItem in colBIOSItems
        	stringBIOS = "|| BIOS: " & objItem.Manufacturer & " " & objItem.Name
        	Next
        
        Wscript.Echo stringOS & vbcrlf & stringCPU & vbcrlf & stringMEM & vbcrlf & Join(myArray,vbcrfl) & vbcrlf & stringGFX & vbcrlf & stringMB & vbcrlf & stringBIOS
        thanks HullZabbix for the great scripts, honestly I would rather love your solution than others.
        just one more, do you have any ideas for the vbs to query Windows logged-on username?
        very much appreciated

        Comment

        • mmarkwitzz
          Senior Member
          • Jan 2011
          • 106

          #49
          Originally posted by omidta
          Your solution for host inventory is amazing but for hp server it doesn't work well. For example HP DL380 G7 has 2 CPU and per each has 1 DIMM board. Unfortunately your script just find memory on once and also it can't find out server's model .Why you don't use WBEM as you did in https://www.zabbix.com/forum/showthread.php?t=27057
          I really want do that by myself but I don't know anything about VBS
          I tested on several servers and found that CPUID providers better results overall. As I said (and you quoted), WBEM providers get data from drivers and driver writers are lazy. CPUID providers more detailed info like dimm types and speeds.

          You do have a point that for HP servers I could have used the *HP* WBEM providers instead of the system default ones. I think I just chose the option with the best coverage.

          Comment

          • mmarkwitzz
            Senior Member
            • Jan 2011
            • 106

            #50
            Originally posted by zabbn00b
            Thought i'd provide some feedback, awesome work!

            I've made some changes that others might like.

            I use the dark grey orange theme so i've updated the CSS to reflect that...now it looks like:


            Edit the zabbix_inv_inventory.vbs style section with the following:
            Check out the attached txt file, i couldn't paste the css in here for some reason.

            Also i've added an asset table, i know this seems dumb with the mb info but for me it stands out better and its the info i need. Also it grabs the part number and serial number accurately for 2003.

            Add the following function to the zabbix_inv_inventory.vbs
            Code:
            'GET ASSET INFORMATION
            Function GetAsset
             'wscript.echo "In Asset"
             'GET MOTHERBOARDS
             Set colModels = objWMI.ExecQuery("Select * from Win32_ComputerSystem")
             'GET BIOS
             Set colBIOSs = objWMI.ExecQuery("Select * from Win32_BIOS") 
             
             'SET TABLE
             Dim arrTable()
             ReDim arrTable(4 - 1, colModels.Count)
             'SET HEADER
             Dim arrHeader
             ReDim arrHeader(4 - 1)
             
             'HEADER
             arrHeader(0) = "Manufacturer"
             arrHeader(1) = "Model"
             arrHeader(2) = "Part Number"
             arrHeader(3) = "Serial Number"
             
             'EACH MOTHERBOARD
             c = 0
             On Error Resume Next
             For Each objModel In colModels
              'MANUFACTURER
              arrTable(0, c) = objModel.Manufacturer
              'MODEL
              If (Len(objModel.Model) > 0) Then
               arrTable(1, c) = objModel.Model
              Else
               arrTable(1, c) = objModel.Product  
              End If
              'PART NUMBER
              If (Len(objModel.PartNumber) > 0) Then
                PartNo = Split(objModel.OEMStringArray(1), "Product ID: ")
                arrTable(2, c) = PartNo(1)
              Else
               arrTable(2, c) = objModel.PartNumber
              End If
              'INC
              c = c + 1
             Next 
             
             'EACH BIOS
             For Each objBIOS In colBIOSs
              'Serial
              arrTable(3, 0) =  objBIOS.SerialNumber
             
             Next
             If (c = 0) Then c = 1
             'RESULT
             GetAsset = "Asset:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c) & "<br>"
            End Function
            Edit the GetMotherBoard function line:
            Code:
            GetMotherBoard = "Motherboard:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c)
            
            TO
            
            GetMotherBoard = GetAsset & " Motherboard:" & "<br>" & ArrayToHtml(arrHeader, arrTable, c)
            Thanks again.

            Thank you for your contribution!
            You should change your username from *n00b to *pr0

            Comment

            • Neryungri
              Junior Member
              • Jan 2014
              • 4

              #51
              Такая проблема, пытаюсь запустить из под windows 7 HARDWARE, далее идет GetLoadAttribute и после Function GetLoadAttribute(strAttribute) так вот, почему то она не работает, кто подскажет почему? я так понимаю она не записывает значения, и поэтому скрипт не отрабатывается до конца. правильно?

              Comment

              • HaveDill
                Senior Member
                • Sep 2014
                • 103

                #52
                Originally posted by Tracs
                OK that seems to have made the script go further now i am getting

                zabbix_inv_inventory.vbs(1463, 3) SWbemObjectSet: Invalid class

                Thoughts?

                I think we are getting closer


                I got this same issue, fixed by adding another "On Error Resume Next" under function GetVirtual (line 1424)

                Comment

                • HaveDill
                  Senior Member
                  • Sep 2014
                  • 103

                  #53
                  I love this so far, however does anyone know how i could get this info to export to a csv off of zabbix?

                  Also, i have a software installed that isn't showing up properly in the inventory.

                  It tells me i have 7.17, but really i require the ability to see that it is actually 7.17.47. Can i update the script in some way to fix this?

                  Comment

                  • drucej31
                    Junior Member
                    • Aug 2014
                    • 15

                    #54
                    Weird inventory script issue.

                    Have this working fine on most of my servers... But seem to be getting this strange error on a Domain Controller don't quite know why.. If anyone has any tips i'm all ears...

                    C:\Zabbix\zabbix_inv_inventory.vbs(1570, 11) (null): An invalid dn syntax has been specified.

                    Comment

                    • wildcatfan1491
                      Junior Member
                      • Nov 2014
                      • 1

                      #55
                      I tried doing this following the instructions to the word and I just cannot seem to get the data to show in the host inventory section. I have ran the vbs script and see the saved file show up. I am just not able to get the data to the Zabbix server. I

                      Comment

                      • mail_admin
                        Junior Member
                        • Dec 2014
                        • 6

                        #56
                        Inventory

                        For taking inventory of windows 2012 server standard and windows 7 dekstop I followed the steps below. Placed cpuz32, cpuz64 in C: drive along with zabbix_agentd.conf

                        Used the link https://www.zabbix.com/forum/showthread.php?t=26862

                        zabbix agent conf file

                        LogFile=c:\zabbix_agentd.log

                        Server=10.20.1.5

                        ListenPort=10050

                        StartAgents=5

                        ServerActive=127.0.0.1


                        Hostname=IC01


                        UserParameter = inventory[*],cscript "C:\zabbix_inv_inventory.vbs" //Nologo "$1" "$2" "$3"

                        But class.ctag.php was in the location /usr/share/zabbix/include/classes and forms.inc.php /usr/share/zabbix/include. But I couldnt find the line $frmHostP in the file.


                        For windows 7 I added the line 'On Error Resume Next'


                        I am using zabbix version 2.2 zabbix agent version 2.2.5. Also nothing gets populated in Host Inventory.

                        Also when I try to link this INV template along with Template OS windows for the host it shows the below error.

                        Two items ("System information" and "INV OS") cannot populate one host inventory field "OS", this would lead to a conflict.

                        For taking inventory of windows 2012 server standard and windows 7 dekstop I followed the steps below. Placed cpuz32, cpuz64 in C: drive along with zabbix_agentd.conf

                        zabbix agent conf file

                        LogFile=c:\zabbix_agentd.log

                        Server=10.20.1.5

                        ListenPort=10050

                        StartAgents=5

                        ServerActive=127.0.0.1


                        Hostname=IC01


                        UserParameter = inventory[*],cscript "C:\zabbix_inv_inventory.vbs" //Nologo "$1" "$2" "$3"

                        But class.ctag.php was in the location /usr/share/zabbix/include/classes and forms.inc.php /usr/share/zabbix/include. But I couldnt find the line $frmHostP in the file.


                        For windows 7 I added the line 'On Error Resume Next'


                        I am using zabbix version 2.2 zabbix agent version 2.2.5. Also nothing gets populated in Host Inventory. Hardware is IBM HS 23 blade.

                        Also when I try to link this INV template along with Template OS windows for the host it shows the below error.

                        Two items ("System information" and "INV OS") cannot populate one host inventory field "OS", this would lead to a conflict.

                        Comment

                        • asmaa
                          Junior Member
                          • Aug 2015
                          • 4

                          #57
                          I did not find &quot;$frmHostP&quot; in forms.inc.php

                          Hello, what did you do in your problem,
                          I have the same problem where I can not find $frmHostP in forms.inc.php

                          for forms.inc.php , it did not have function called insert_host_inventory_form
                          and the path of the file is /usr/share/zabbix/include on ubuntu 14.04 and zabbix 2.4.5

                          for class.ctag.php , it was found in /usr/share/zabbix/include/classes/html
                          and its name in ubuntu 14.04 and zabbix 2.4.5 is ctag.php

                          please help where I can not find this function , so no tables is appeared on hosts
                          thanks

                          Originally posted by mail_admin
                          For taking inventory of windows 2012 server standard and windows 7 dekstop I followed the steps below. Placed cpuz32, cpuz64 in C: drive along with zabbix_agentd.conf

                          Used the link https://www.zabbix.com/forum/showthread.php?t=26862

                          zabbix agent conf file

                          LogFile=c:\zabbix_agentd.log

                          Server=10.20.1.5

                          ListenPort=10050

                          StartAgents=5

                          ServerActive=127.0.0.1


                          Hostname=IC01


                          UserParameter = inventory[*],cscript "C:\zabbix_inv_inventory.vbs" //Nologo "$1" "$2" "$3"

                          But class.ctag.php was in the location /usr/share/zabbix/include/classes and forms.inc.php /usr/share/zabbix/include. But I couldnt find the line $frmHostP in the file.


                          For windows 7 I added the line 'On Error Resume Next'


                          I am using zabbix version 2.2 zabbix agent version 2.2.5. Also nothing gets populated in Host Inventory.

                          Also when I try to link this INV template along with Template OS windows for the host it shows the below error.

                          Two items ("System information" and "INV OS") cannot populate one host inventory field "OS", this would lead to a conflict.

                          For taking inventory of windows 2012 server standard and windows 7 dekstop I followed the steps below. Placed cpuz32, cpuz64 in C: drive along with zabbix_agentd.conf

                          zabbix agent conf file

                          LogFile=c:\zabbix_agentd.log

                          Server=10.20.1.5

                          ListenPort=10050

                          StartAgents=5

                          ServerActive=127.0.0.1


                          Hostname=IC01


                          UserParameter = inventory[*],cscript "C:\zabbix_inv_inventory.vbs" //Nologo "$1" "$2" "$3"

                          But class.ctag.php was in the location /usr/share/zabbix/include/classes and forms.inc.php /usr/share/zabbix/include. But I couldnt find the line $frmHostP in the file.


                          For windows 7 I added the line 'On Error Resume Next'


                          I am using zabbix version 2.2 zabbix agent version 2.2.5. Also nothing gets populated in Host Inventory. Hardware is IBM HS 23 blade.

                          Also when I try to link this INV template along with Template OS windows for the host it shows the below error.

                          Two items ("System information" and "INV OS") cannot populate one host inventory field "OS", this would lead to a conflict.

                          Comment

                          • Toinho
                            Junior Member
                            • Jan 2016
                            • 2

                            #58
                            Hi, first of all thanks for your job!
                            I have a problem with your template. I am focusing on the automatic Software inventory feature. I am using a Virtual Machine Windows 7 for the host and an Ubuntu 14.04 (VM also) for the server.
                            First of all I had no success in obtaining information of the softwares, then I activated WMI Control (I think I activated, never heard about it) and used the prompt command to execute the VBS file (cscript zabbix_inv_inventory.vbs $ OOP, changing to the location of my zabbix foulder), but received the message:

                            zabbix_inv_inventory.vbs(1463, 3) SWbemObjectSet: Invalid class

                            Well, went to my Zabbix server to take a look and the list of softwares was there. I installed Google Chrome in the Virtual Machine to test and it was added to the list. Until here alright, but then, I installed several programs (7zip, CCleaner, Firefox, PDF) as a test, none of them appeared in the list. I tried unistalling some of them (maybe, incompatibility) but didn't work. I tought it was a communication problem between my server and the host, but when I unistalled Google Chrome it was removed from the list. Now I don't know what to do.
                            Thanks a lot and sorry for any mistake!

                            Comment

                            • drucej31
                              Junior Member
                              • Aug 2014
                              • 15

                              #59
                              Zabbix 3.0.1

                              Just upgraded to Zab 3.0.1 and sadly this functionality is broken populates fine, but formatting has gone back to original .. PHP files don't exist as before so unable to update anyone got this working?

                              Comment

                              • Jason
                                Senior Member
                                • Nov 2007
                                • 430

                                #60
                                Just managed to get this working on our 2.4.7 install.

                                The only php I needed to edit was the include/classes/html/CTag.php file and on the addItem function around line 110 then comment out the $this->encode line


                                The table format isn't as pretty as it could be, but at least it's all readable. Oh, and we're using original blue theme.

                                Comment

                                Working...