Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Soporte de la comunidad error XML module_inventory

  • error XML module_inventory

    Posted by alfagavi on June 6, 2013 at 20:23

    Hola de nuevo.

    Quería comentar que algunos de los módulos propuestos de inventario no escriben correctamente la salida en el XML. En concreto son el de CPU y el de Video (CDROM, HDs, NICs, Patches, Software, RAM, Services funcionan correctamente):

    En el fichero de configuración del agente están definidos los módulos así (pongo el de HD para corroborar que funciona):

    module_begin
    module_name inventarioCPU
    module_type generic_data_string
    module_inventory CPUs
    module_description Inventario CPU
    module_end
    
    module_begin
    module_name inventarioVideo
    module_interval 7
    module_type generic_data_string
    module_inventory Video
    module_description Inventario Video
    module_end
    
    module_begin
    module_name inventarioHDs
    module_interval 7
    module_type generic_data_string
    module_inventory HDs
    module_description Inventario HDs
    module_end
    

    Esto genera en el XML las siguientes entradas:

    	
    	
    	
    		
    			
    			
    			
    				
    				
    				
    				
    				
    				
    			
    		
    	
    

    Y en el debug aparece esto:

    2013-06-06 18:03:04 Run inventarioCPU
    2013-06-06 18:03:04 	Launching CPUs Query WMI
    
    2013-06-06 18:03:04 Setting Outuput: found 1 items
    
    2013-06-06 18:03:04 Run inventarioVideo
    2013-06-06 18:03:04 	Launching Video Query WMI
    
    2013-06-06 18:03:04 Setting Outuput: found 1 items
    
    2013-06-06 18:03:04 Run inventarioHDs
    2013-06-06 18:03:04 	Launching HD Query WMI
    
    2013-06-06 18:03:04 Setting Outuput: found 6 items
    
    ...
    
    2013-06-06 18:03:19 Pandora_Module_Inventory::getXML begin
    
    2013-06-06 18:03:19 inventarioCPU Pandora_Module_Inventory::getXML end
    2013-06-06 18:03:19 Pandora_Module_Inventory::getXML begin
    
    2013-06-06 18:03:19 inventarioVideo Pandora_Module_Inventory::getXML end
    2013-06-06 18:03:19 Pandora_Module_Inventory::getXML begin
    
    2013-06-06 18:03:19 inventarioHDs Pandora_Module_Inventory::getXML end
    
    ...
    
    2013-06-06 18:03:19 Copying XML on C:Archivos de programapandora_agenttempTECNICOS10.4779.data
    2013-06-06 18:03:19 Next execution on 120 seconds
    

    Me dí cuenta de estos fallos porque cuando arranco el cliente, en la consola, exactamente con los eventos me aparece lo que muestro en la captura que adjunto. Este evento sólo me lo genera con el primer paquete que le llega a la consola después de haber reiniciado el cliente.

    Es raro porque parece que sí que coge los módulos pero falla al generar el XML.

    ¿Es algo que esté haciendo algo mal? Gracias

    P.D: He utilizado un programa (WMI Explorer) y probado las sentencias
    SELECT Name, MaxClockSpeed, Description FROM Win32_Processor
    SELECT Caption, AdapterRAM, VideoProcessor FROM Win32_VideoController
    Que son las que aparecen en pandora_wmi.cc, y sí que devuelven resultados.

    Mario replied 11 years, 8 months ago 2 Members · 8 Replies
  • 8 Replies
  • Mario

    Administrator
    June 7, 2013 at 15:05
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Buenas

    ¿Me podrías indicar la versión de Windows donde esta ocurriendo este error para intentar replicarlo y revisarlo?

    Gracias
    Un saludo

  • alfagavi

    Member
    June 7, 2013 at 15:10
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Si, por supuesto.

    Windows XP Professional SP 3

  • Mario

    Administrator
    June 7, 2013 at 15:21
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Gracias

    Lo voy a revisar y ya te voy avisando

    Un saludo

  • Mario

    Administrator
    June 7, 2013 at 15:44
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Buenas.

    Para el correcto funcionamiento del module_inventory tiene que estar el servidor de Inventario activado y este solo se encuentra disponible en la versión Enterprise.

    Si deseas obtener esta información con la versión Opensource tendrías que conseguirla mediante un modulo wmi_query con las querys que has expuesto.

    Un saludo
    Gracias

  • alfagavi

    Member
    June 7, 2013 at 18:32
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Ok, pero entonces no debería de salir ninguna de las otras querys, no? porque las otras aunque no se me muestran en la consola sí que generan bien el XML.

    De hecho me he dado cuenta de que son justamente las únicas dos que sólo tienen para mostrar un dato:

    DEBUG:
    
    2013-06-07 16:25:08 Run inventarioCPU
    2013-06-07 16:25:08 	Launching CPUs Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 1 items
    
    2013-06-07 16:25:08 Run inventarioCDROM
    2013-06-07 16:25:08 	Launching CDRom Query WMI ... 
    
    2013-06-07 16:25:08 Setting Outuput: found 3 items
    
    2013-06-07 16:25:08 Run inventarioVideo
    2013-06-07 16:25:08 	Launching Video Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 1 items
    
    2013-06-07 16:25:08 Run inventarioHDs
    2013-06-07 16:25:08 	Launching HD Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 6 items
    
    2013-06-07 16:25:08 Run inventarioNICs
    2013-06-07 16:25:08 	Launching NICs Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 20 items
    
    2013-06-07 16:25:08 Run inventarioPatches
    2013-06-07 16:25:08 	Launching Patch Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 294 items
    
    2013-06-07 16:25:08 Run inventarioSoftware
    2013-06-07 16:25:08 	Launching Software Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 298 items
    
    2013-06-07 16:25:08 Run inventarioRAM
    2013-06-07 16:25:08 	Launching RAM Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 2 items
    
    2013-06-07 16:25:08 Run inventarioServices
    2013-06-07 16:25:08 	Launching Services Query WMI
    
    2013-06-07 16:25:08 Setting Outuput: found 117 items
    
    ....
    
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioCPU Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioCDROM Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioVideo Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioHDs Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioNICs Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioPatches Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioSoftware Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioRAM Pandora_Module_Inventory::getXML end
    2013-06-07 16:25:23 Pandora_Module_Inventory::getXML begin
    
    2013-06-07 16:25:23 inventarioServices Pandora_Module_Inventory::getXML end
    
    XML:
    	                                 <----CPU
    	                                 <----CDRom
    		
    			
    			
    			
    				
    				
    				
    			
    		
    	
    	                                 <----Video
    	                                 <----HD
    		
    			
    			
    			
    				
    .......
    
    

    Puede ser ese el fallo?

  • Mario

    Administrator
    June 10, 2013 at 17:50
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Buenas

    El agente las genera correctamente, el problema es que el servidor de Pandora al no ser Enterprise no los reconoce y lo trata como un BADXML.

    Un saludo. Gracias

  • alfagavi

    Member
    June 10, 2013 at 18:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Ok, gracias, aunque creo que por lo menos me debería de generar un XML con los tags bien abiertos y cerrados, no como me lo hace, porque es sólo en los casos que comento que sólo me genera la etiqueta y ni siquiera lo cierra.

    Pero bueno, creo que lo mejor será ejecutar el plugin y que me muestre lo que yo quiero.

    Por cierto, como sugerencia querría decir que en la documentación podríais poner el conjunto de tags que se pueden poner en el documento XML, para así tener más definido lo que se puede poner en los plugins y cómo ponerlo.

    Gracias por todo.

  • Mario

    Administrator
    June 10, 2013 at 18:47
    1150 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Lo tendremos en cuenta.

    Gracias a ti por participar.

    Saludos