Welcome to Pandora FMS Community › Forums › Soporte de la comunidad › no me funciona el modulo de inventario
-
no me funciona el modulo de inventario
Posted by luis6508 on November 19, 2013 at 03:04buenas tardes no me funciona el modulo de inventario para pandora enterprice, si me funciona con el servidor donde tengo instalado pandora fms, pero cuando es colocado en otra maquina del mismo rango no devuelve ningun dato
espero su ayuda muchisimas gracias
luis6508 replied 11 years, 3 months ago 2 Members · 18 Replies -
18 Replies
-
::
Hola buenas
Si ves que no te llega información de este tipo de módulo, el paso normal es poner el agente en modo debug (http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Configuracion#debug) y observar si el XML se forma con la información de inventario, deberan salir unas lineas de , si no es asà deberás comprobar que la configuración del módulo sea la correcta.
http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:InventarioSi por el contrario se forma el XML correctamente, comprueba que el servidor de inventario este corriendo correctamente, aunque supongo que si ya que me comentas que en uno de los agentes funciona sin problemas
Si necesitas más ayuda, puedes pegarme el contenido del XML y/o la configuración del módulo de inventario y asi puedo ver que puede estar fallando.
Un saludo
-
::
asi lo tengo configurado, y no creo que sea politicas porque hice lo mismo en un servidor windows y si me funciono, pero en los servidores linux no me quiere desplegar el inventario, solo funciono en el servidor local donde se encuentra pandora fms que es un centos
# Plugin for inventory on the agent (Only Enterprise)
module_plugin inventory 1 hd cpu ram video nic cdrom software init_services filesystem software users process ip route -
-
::
Hola en la consola si me funciona, pero en otros servidores linux no me funciona. cuando reviso el inventario solo me dice Datos no encontrados
al colocar whois en el servidor que deseeo monitorear me aparece
root@:~$ whois
No command ‘whois’ found, did you mean:
Command ‘rwhois’ from package ‘socks4-clients’ (universe)
Command ‘jwhois’ from package ‘jwhois’ (universe)
Command ‘cwhois’ from package ‘asused’ (universe)
Command ‘gwhois’ from package ‘gwhois’ (universe)
whois: command not foundy al colocar lshw me aparece esto
    version: 09
      width: 32 bits
      clock: 33MHz
      capabilities: uhci bus_master
      configuration: driver=uhci_hcd latency=0
      resources: irq:18 ioport:1040(size=32)
    *-usb:3
      description: USB controller
      product: 631xESB/632xESB/3100 Chipset UHCI USB Controller #4
      vendor: Intel Corporation
      physical id: 1d.3
      bus info: pci@0000:00:1d.3
      version: 09
      width: 32 bits
      clock: 33MHz
      capabilities: uhci bus_master
      configuration: driver=uhci_hcd latency=0
      resources: irq:19 ioport:1060(size=32)
    *-usb:4
      description: USB controller
      product: 631xESB/632xESB/3100 Chipset EHCI USB2 Controller
      vendor: Intel Corporation
      physical id: 1d.7
      bus info: pci@0000:00:1d.7
      version: 09
      width: 32 bits
      clock: 33MHz
      capabilities: pm debug ehci bus_master cap_list
      configuration: driver=ehci_hcd latency=0
      resources: irq:16 memory:f9df0000-f9df03ff
    *-pci:5
      description: PCI bridge
      product: 82801 PCI Bridge
      vendor: Intel Corporation
      physical id: 1e
      bus info: pci@0000:00:1e.0
      version: d9
      width: 32 bits
      clock: 33MHz
      capabilities: pci subtractive_decode bus_master cap_list
      resources: ioport:2000(size=8192) memory:f9e00000-f9ffffff ioport:f                                      0000000(size=134217728)
     *-display
        description: VGA compatible controller
        product: ES1000
        vendor: Hynix Semiconductor (Hyundai Electronics)
        physical id: 3
        bus info: pci@0000:01:03.0
        version: 02
        width: 32 bits
        clock: 33MHz
        capabilities: pm vga_controller bus_master cap_list rom
        configuration: driver=radeon latency=64 mingnt=8
        resources: irq:23 memory:f0000000-f7ffffff ioport:3000(size=256)                                       memory:f9ff0000-f9ffffff memory:f9e00000-f9e1ffff
     *-generic:0
        description: System peripheral
        product: Integrated Lights Out Controller
        vendor: Compaq Computer Corporation
        physical id: 4
        bus info: pci@0000:01:04.0
        version: 03
        width: 32 bits
        clock: 33MHz
        capabilities: pm cap_list
        configuration: driver=hpwdt latency=0
        resources: irq:21 ioport:2800(size=256) memory:f9fe0000-f9fe01ff
     *-generic:1
        description: System peripheral
        product: Integrated Lights Out Processor
        vendor: Compaq Computer Corporation
        physical id: 4.2
        bus info: pci@0000:01:04.2
        version: 03
        width: 32 bits
        clock: 33MHz
        capabilities: pm bus_master cap_list rom
        configuration: driver=hpilo latency=64
        resources: irq:22 ioport:3400(size=256) memory:f9fd0000-f9fd07ff                                       memory:f9fc0000-f9fc1fff memory:f9f00000-f9f7ffff memory:f9e20000-f9e2ffff
     *-usb
        description: USB controller
        product: Integrated Lights-Out Standard Virtual USB Controller
        vendor: Hewlett-Packard Company
        physical id: 4.4
        bus info: pci@0000:01:04.4
        version: 00
        width: 32 bits
        clock: 33MHz
        capabilities: pm uhci bus_master cap_list
        configuration: driver=uhci_hcd latency=64
        resources: irq:22 ioport:3800(size=32)
     *-serial
        description: IPMI SMIC interface
        product: Integrated Lights-Out Standard KCS Interface
        vendor: Hewlett-Packard Company
        physical id: 4.6
        bus info: pci@0000:01:04.6
        version: 00
        width: 32 bits
        clock: 33MHz
        capabilities: pm cap_list
        configuration: driver=ipmi_si latency=0
        resources: irq:21 memory:f9ef0000-f9ef00ff
    *-isa
      description: ISA bridge
      product: 631xESB/632xESB/3100 Chipset LPC Interface Controller
      vendor: Intel Corporation
      physical id: 1f
      bus info: pci@0000:00:1f.0
      version: 09
      width: 32 bits
      clock: 33MHz
      capabilities: isa bus_master
      configuration: driver=lpc_ich latency=0
      resources: irq:0
    *-ide
      description: IDE interface
      product: 631xESB/632xESB IDE Controller
      vendor: Intel Corporation
      physical id: 1f.1
      bus info: pci@0000:00:1f.1
      version: 09
      width: 32 bits
      clock: 33MHz
      capabilities: ide bus_master
      configuration: driver=ata_piix latency=0
      resources: irq:7 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) i                                      oport:376 ioport:500(size=16)
  *-pci:1
     description: Host bridge
     product: 5000 Series Chipset FSB Registers
     vendor: Intel Corporation
     physical id: 101
     bus info: pci@0000:00:10.0
     version: b1
     width: 32 bits
     clock: 33MHz
     configuration: driver=i5000_edac
     resources: irq:0
  *-pci:2
     description: Host bridge
     product: 5000 Series Chipset FSB Registers
     vendor: Intel Corporation
     physical id: 102
     bus info: pci@0000:00:10.1
     version: b1
     width: 32 bits
     clock: 33MHz
  *-pci:3
     description: Host bridge
     product: 5000 Series Chipset FSB Registers
     vendor: Intel Corporation
     physical id: 103
     bus info: pci@0000:00:10.2
     version: b1
     width: 32 bits
     clock: 33MHz
  *-pci:4
     description: Host bridge
     product: 5000 Series Chipset Reserved Registers
     vendor: Intel Corporation
     physical id: 104
     bus info: pci@0000:00:11.0
     version: b1
     width: 32 bits
     clock: 33MHz
  *-pci:5
     description: Host bridge
     product: 5000 Series Chipset Reserved Registers
     vendor: Intel Corporation
     physical id: 105
     bus info: pci@0000:00:13.0
     version: b1
     width: 32 bits
     clock: 33MHz
  *-pci:6
     description: Host bridge
     product: 5000 Series Chipset FBD Registers
     vendor: Intel Corporation
     physical id: 106
     bus info: pci@0000:00:15.0
     version: b1
     width: 32 bits
     clock: 33MHz
  *-pci:7
     description: Host bridge
     product: 5000 Series Chipset FBD Registers
     vendor: Intel Corporation
     physical id: 107
     bus info: pci@0000:00:16.0
     version: b1
     width: 32 bits
     clock: 33MHz
  *-scsi
     physical id: 2
     logical name: scsi0
     capabilities: emulated
    *-cdrom:0
      description: SCSI CD-ROM
      product: CD-ROM LTN-4891S
      vendor: LITE-ON
      physical id: 0.0.0
      bus info: scsi@0:0.0.0
      logical name: /dev/cdrom1
      logical name: /dev/sr0
      version: NQG2
      capabilities: removable audio
      configuration: ansiversion=5 status=nodisc
    *-cdrom:1
      description: DVD-RAM writer
      product: DVDRW LH-20A1P
      vendor: LITE-ON
      physical id: 0.1.0
      bus info: scsi@0:0.1.0
      logical name: /dev/cdrom
      logical name: /dev/cdrw
      logical name: /dev/dvd
      logical name: /dev/dvdrw
      logical name: /dev/sr1
      version: KL0A
      capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
      configuration: ansiversion=5 status=nodisc -
::
Pues según me estas indicando, si no funciona el comando whois en ese equipo no te va a devolver nada el plugin de inventario.
Intenta instalar el comando whois en este equipo, no se que distribución es sobre la que esta instalado el agente, pero prueba con apt-get install whois, yum install whois o zypper install whois para instalarlo. Si no te permite instalarlo con esto, posiblemente al ejecutar la instrucción adecuada te indiqué que paquete debes instalar para que funcione el comando correctamente.
Un saludo
-
::
al colocar whois me aparece, lo curioso que cuando me voy a inventario me aparece Datos no encontrados.
whois
Usage: whois [OPTION]… OBJECT…-l          one level less specific lookup [RPSL only]
-LÂ Â Â Â Â Â Â Â Â Â find all Less specific matches
-m          find first level more specific matches
-MÂ Â Â Â Â Â Â Â Â Â find all More specific matches
-c          find the smallest match containing a mnt-irt attribute
-x          exact match [RPSL only]
-d          return DNS reverse delegation objects too [RPSL only]
-i ATTR[,ATTR]…Â Â Â do an inverse lookup for specified ATTRibutes
-T TYPE[,TYPE]…Â Â Â only look for objects of TYPE
-KÂ Â Â Â Â Â Â Â Â Â only primary keys are returned [RPSL only]
-r          turn off recursive lookups for contact information
-RÂ Â Â Â Â Â Â Â Â Â force to show local copy of the domain object even
           if it contains referral
-a          search all databases
-s SOURCE[,SOURCE]…Â search the database from SOURCE
-g SOURCE:FIRST-LASTÂ find updates from SOURCE from serial FIRST to LAST
-t TYPEÂ Â Â Â Â Â Â Â request template for object of TYPE
-v TYPEÂ Â Â Â Â Â Â Â request verbose template for object of TYPE
-q [version|sources|types]Â query specified server info [RPSL only]
-FÂ Â Â Â Â Â Â Â Â Â fast raw output (implies -r)
-h HOSTÂ Â Â Â Â Â Â Â connect to server HOST
-p PORTÂ Â Â Â Â Â Â Â connect to PORT
-HÂ Â Â Â Â Â Â Â Â Â hide legal disclaimers
   –verbose    explain what is being done
   –help     display this help and exit
   –version    output version information and exit -
::
La cuestión es:
¿Si ejecutas el plugin desde una terminal del agente donde comentas que no devuelve datos te devuelve algo el plugin?
La ejecución seria la siguiente:
/usr/share/pandora_agent/plugins/inventory 0
Con esto te deberia de devolver un XML bastante largo con toda la información que saca el plugin. Si es asi, esta funcionando bien, si no.. es posible que siga fallando alguna ejecución interna del plugin.
Un saludo
-
::
me aparecio una gran lista en el equipo que deseo monitorear
 Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
  Â
 Â
Â
Â
 Â
 Â
  Â
  Â
  Â
  Â
  Â
 Â
Â
Â
 Â
  -
::
Correcto, pues entonces ya la salida es la correcta.
Ahora tendrás que comprobar si en el XML del agente esta enviando la información correctamente.
Esto para asegurarte que se ejecuta siempre, configuralo en el config del agente de esta forma:
module_plugin inventory 0 hd cpu ram video nic cdrom software init_services filesystem software users process ip route
¿Como puedes ver si se forma correctamente?
Tienes 2 opciones, la más rápida, es parar el pandora_server un momento antes de reiniciar el agente con los cambios y ver como llega al servidor el XML en la carpeta /var/spool/pandora/data_in del servidor, abrirlo y comprobar que es correcto, volver a levantar el pandora_server y esperar que la consola lo acepte.
Como me comentas si desde una de las máquinas el módulo de inventario esta funcionando correctamente, en el servidor no debe haber ningun problema con el inventory server…Un saludo
-
-
-
-
::
Efectivamente no se esta enviando la ejecución del módulo de inventario en el XML del agente, o por lo menos en esta ejecución.
Los pasos que tiene que seguir ahora, es configurar en modo debug el agente ( en el archivo de configuración del agente hay un token que pone debug , debe indicarlo a 1, debug 1, reiniciar el agente y en la carpeta /tmp del sistema se creará el XML que deberá coincidir con este que me ha indicado y se creara también en los logs, el pandora_debug.log, que nos mostrará información de todas las ejecuciones que se realizan. )
Con esto conseguirás acotar el problema y ver donde esta. Por las comprobaciones que hemos realizado, yo dirÃa que esta el problema en la configuración del module_plugin interval en el config del agente, pero es extraño si lo estas realizando tal y como lo hemos comprobado en el terminal, deberÃa funcionar ya.Un saludo
-
-
::
esta es la configuracion que tengo del agente pandora fms
# Base config file for Pandora FMS agents
# Version 5.0SP1, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com# General Parameters
# ==================server_ip 192.168.
server_path /var/spool/pandora/data_in
temporal /tmp
logfile /var/log/pandora/pandora_agent.log
#include /etc/pandora/pandora_agent_alt.conf
#broker_agent name_agent# Interval in seconds, 300 by default
interval  300# Debug mode only generate XML, and stop after first execution,
# and does not copy XML to server.
debug 0# Optional. UDP Server to receive orders from outside
# By default is disabled, set 1 to enable
# Set port (41122 by default)
# Set address to restrict who can order a agent restart (0.0.0.0 = anybody)
#
udp_server 0
udp_server_port 41122
udp_server_auth_address 0.0.0.0# By default, agent takes machine name
#agent_name  adama#Parent agent_name
#parent_agent_name caprica# Agent description
#description This is a demo agent for Linux# Group assigned for this agent (descriptive, p.e: Servers)
#group Servers# address: Enforce to server a ip address to this agent
# You can also try to detect the first IP using “auto”, for example
address auto
# or setting a fixed IP address, like for example:
#address 192.168.36.73# Autotime: Enforce to server to ignore timestamp coming from this
# agent, used when agents has no timer or it’s inestable. 1 to enable
# this feature
#autotime 1# Timezone offset: Difference with the server timezone
#timezone_offset 0# Agent position paramters
# Those parameters define the geographical position of the agent# gis_exec: Call a script that returns a string with a fixed
# format of latitude,longitude,altitude
# i.e.: 41.377,-5.105,2.365#gis_exec /tmp/gis.sh
# This sets the GIS coordinates as fixed values:
# latitude
#latitude 0
# longitude
#longitude 0
# altitude
#altitude 0#GPS Position description
#position_description Madrid, centro# By default agent try to take default encoding defined in host.
#encoding UTF-8# Listening TCP port for remote server. By default is 41121 (for tentacle)
# if you want to use SSH use 22, and FTP uses 21.
server_port 41121# Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle# Server password (Tentacle or FTP). Leave empty for no password (default).
#server_pwd mypassword# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
#server_ssl no# Extra options for the Tentacle client (for example, server_opts “-v -r 5”).
#server_opts# delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent
#delayed_startup 10# Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
#pandora_nice 0# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe
#cron_mode# If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
remote_config 0# If set to 1 start Drone Agent’s Proxy Mode
# proxy_mode 1# Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10# Proxy timeout (by default 1s)
# proxy_timeout 1# Number of threads to execute modules in parallel
#agent_threads 1# User the agent will run as
#pandora_user pandora# Enable or disable XML buffer.
# If you are in a secured environment and want to enable the XML buffer you
# should consider changing the temporal directory, since /tmp is world writable.
#xml_buffer 0# Minimum available bytes in the temporal directory to enable the XML buffer
#temporal_min_size 1024# Secondary server configuration
# ==============================# If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are
# always copied to the secondary server.
#secondary_mode on_error
#secondary_server_ip localhost
#secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121
#secondary_transfer_mode tentacle
#secondary_server_pwd mypassword
#secondary_server_ssl no
#secondary_server_opts# Module Definition
# =================# System information
# vmstat syntax depends on linux distro and vmstat command version, please check before use it
module_begin
module_name cpu_user
module_type generic_data
module_interval 1
module_exec vmstat 1 2 | tail -1 | awk ‘{ print $13 }’
module_max 100
module_min 0
module_description User CPU Usage (%)
module_min_warning 70
module_max_warning 90
module_min_critical 91
module_max_critical 100
module_unit %
module_end#Get load average
module_begin
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg | cut -d’ ‘ -f1
module_description Average process in CPU (Last minute)
module_end#Get free memory in MB
module_begin
module_name Cache mem free
module_type generic_data
module_exec free -m | grep buffers/cache | awk ‘{print $4}’
module_description Free cache memory in MB
module_min_warning 500
module_max_warning 600
module_min_critical 100
module_max_critical 499
module_unit MB
module_end#Count total number of processes
module_begin
module_name proctotal
module_type generic_data
module_exec ps -A | tail –lines=+5 | wc -l
module_description Total processes
module_min_warning 150
module_max_warning 249
module_min_critical 250
module_max_critical 300
module_unit processes
module_end# Process information
module_begin
module_name sshDaemon
module_type generic_proc
module_exec ps -Af | grep sshd | grep -v “grep” | wc -l
module_description Check ssh service
module_end# Async data example
module_begin
module_name LastLogin
module_type async_string
module_exec last | head -1
module_description Monitor last user loggin
module_end# Module that get the number of cron file
# This module uses a precondition, if cron is running the
# module will check the folder /etc/cron.d to get the number of files
module_begin
module_name Cron task files
module_type async_string
module_precondition =~ .*cron.* ps aux | grep cron
module_exec ls -l /etc/cron.d | awk ‘NR>1 {print $0}’ | wc -l
module_description Number of cron task files
module_unit files
module_end# Plugin example
# This plugin detects all disk partitions and monitor the free spaces
module_plugin pandora_df
# This parses /var/log/syslog file, under the module name “syslog”
# And search for “ssh” string into it, sending only that information.module_plugin grep_log /var/log/syslog Syslog ssh
# Get disk space free in MB
#module_begin
#module_name disk_root_free
#module_type generic_data
#module_exec df -kh / | tail -1 | awk ‘{ print 100-$5 }’
#module_max 100
#module_min 0
#module_description Free disk Percentage of root partition
#module_min_warning 70
#module_max_warning 90
#module_min_critical 91
#module_max_critical 100
#module_end# This module uses postprocess feature to unit conversion
#module_begin
#module_name memused
#module_type generic_data
#module_exec free -k | grep buffers/cache | awk ‘{print $3}’
#module_postprocess 0,000976
#module_description Used memory in KB postprocessed to be in MB
#module_end# Plugin for inventory on the agent (Only Enterprise)
module_plugin inventory 0 hd cpu ram video nic cdrom software init_services filesystem software users process ip route# Example of preconditions
#module_begin
#module_name Test Precondicion
#module_type generic_data
#module_precondition 10 echo 15
#module_precondition = 10 echo 10
#module_precondition != 10 echo 5
#module_precondition =~ 10 echo 10
#module_precondition (5,15) echo 10
#module_freepercentmemory
#module_description Precondition test module
#module_end# Example of postconditions
#module_begin
#module_name Test Postcondicion
#module_type generic_data
#module_condition > /tmp/log.txt
#module_condition > 3 echo max >> /tmp/log.txt
#module_condition = 5 echo equal >> /tmp/log.txt
#module_condition != 10 echo diff >> /tmp/log.txt
#module_condition =~ 5 echo regexp >> /tmp/log.txt
#module_condition (3,8) echo range >> /tmp/log.txt
#module_exec echo 5
#module_description Postcondition test module
#module_end -
-
::
al colocarlo en modo debug me aparece lo siguiente, no entiendo porque da ese problema hasta el firewall esta desactivado
Â
Â
 generic_data
 1
 0
 100
 91
 100
 70
 90
Â
ÂÂ
Â
 generic_data
 1
ÂÂ
Â
 generic_data
 1
 100
 499
 500
 600
Â
ÂÂ
Â
 generic_data
 1
 250
 300
 150
 249
Â
ÂÂ
Â
 generic_proc
 1
ÂÂ
Â
 async_string
 1
ÂÂ
Â
 async_string
 1
Â
 -
::
Hola buenas
Es extraño si, no tiene nada que ver con el firewall, es más problema de ejecución del agente.
Prueba ejecutándolo con la ruta completa por ejemplo.
module_plugin perl /usr/share/pandora_agent/plugins/inventory 0
Comprobar también que el plugin tiene los mismos permisos que el resto de plugins de la carpeta.
Un saludo