Pandora FMS Community

Error crear HOST ALIVE Network Module

gairhald · 11 may 2016, 18:18 · 26 mensajes · 114 visitas

  1. Buenas, he vuelto a intentar instalar un nuevo Pandora, el servidor es el siguiente: CentOS 7.3 con MySQL 5.66 ya que con MySQL 5.7 no consigo levantar el pandora y como pandora Console y Server la ultima versión que esta en la web de Pandora. He hecho instalación por RPM

    pandorafms_console.noarch                                                     6.0SP4-1                                                                installed
    pandorafms_server.noarch                                                      6.0SP4-1                                                                installed
    

    y cuando intento crear un modulo de red, host alive, me sigue dando el mismo problema, alguna idea?

  2. El unico sitio donde veo algo referente a la creación del modulo es en el audit

    [root@pandora pandora_console]# tail -f audit.log
    2016-11-30 16:01:31 - admin - Agent management - 172.20.3.111 - Fail to try added module 'Host Alive' for agent VIEW00
    
  3. Si activo las General Variables del Mysql, cuando creo el modulo veo el siguiente FAIL en las querys de MysQL, por si os dice algo

                    ORDER BY name ASC
                      138 Query     SELECT COUNT(*) FROM tupdate
                      138 Query     SELECT COUNT(*) FROM tupdate WHERE data_rollback LIKE '%"admin":1%'
                      138 Query     SELECT id_grupo FROM tagente WHERE id_agente = 1 LIMIT 1
                      138 Query     SELECT count(*) FROM tincidencia WHERE id_agent = 1 LIMIT 1
                      138 Query     SELECT nombre FROM tagente WHERE id_agente = 1 LIMIT 1
                      138 Query     SELECT * FROM `tagente` WHERE `id_agente` = 1 LIMIT 1
                      138 Query     SELECT id_agente_modulo FROM tagente_modulo WHERE `nombre` = 'Host Alive' AND `id_agente` = 1 LIMIT 1
                      138 Query     INSERT INTO `tagente_modulo` (`id_tipo_modulo`, `descripcion`, `max`, `min`, `snmp_oid`, `snmp_community`, `id_module_group`, `module_interval`, `module_ff_interval`, `ip_target`, `tcp_port`, `tcp_rcv`, `tcp_send`, `id_export`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `id_plugin`, `post_process`, `prediction_module`, `max_timeout`, `max_retries`, `disabled`, `id_modulo`, `custom_id`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `min_ff_event`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`, `ff_timeout`, `unit`, `macros`, `quiet`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `cron_interval`, `id_category`, `disabled_types_event`, `module_macros`, `nombre`, `id_agente`) VALUES (6,'Check if host is alive using ICMP ping check.',0,0,'0','',2,300,0,'',NULL,'','',0,'','','',0,'0',NULL,0,0,0,2,'',1,0.000000,0.000000,'',0.000000,0.000000,'','','','',0,0,0,0,0,0,0,0,'','',0,'','','',0,0,'* * * * *',0,'{"going_unknown":1}','W10=','Host Alive',1)
                      138 Query     INSERT INTO `tsesion` (`id_usuario`, `accion`, `ip_origen`, `descripcion`, `fecha`, `utimestamp`) VALUES ('admin','Agent management','172.20.3.111','Fail to try added module 'Host Alive' for agent pandora','2016-12-01 08:50:23',1480578623)
                      138 Query     SELECT policy_linked FROM tagente_modulo WHERE id_agente_modulo = '' LIMIT 1
                      138 Query     SELECT id_tipo, descripcion
                    FROM ttipo_modulo
                    WHERE categoria IN (3,4,5)
                    ORDER BY descripcion
    
    2016-12-01 10:01:02 11666 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: DELETE FROM treport_content
                                              WHERE id_agent != 0
                                                    AND id_agent NOT IN (SELECT id_agente FROM tagente)
                                                    AND `type` NOT IN ('SLA_services','custom_graph','sql_graph_vbar','sql_graph_hbar','sql_graph_pie','database_serialized','sql','inventory','inventory_changes','netflow_area','netflow_pie','netflow_data','netflow_statistics','netflow_summary')
    2016-12-01 10:01:02 11666 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave. Statement: DELETE FROM treport_content
                                              WHERE `type` LIKE 'exception'
                                                    AND id_rc NOT IN (SELECT id_report_content FROM treport_content_item)
    

    Si miro la tabla que se queja, la tsesion, veo los fails

    root@localhost [pandora]> select * from tsesionG
    *************************** 37. row ***************************
      id_sesion: 37
     id_usuario: admin
      ip_origen: 172.20.3.111
         accion: Agent management
    descripcion: Fail to try added module 'Host Alive' for agent VIEW00
          fecha: 2016-11-30 16:35:36
     utimestamp: 1480520136
    *************************** 38. row ***************************
      id_sesion: 38
     id_usuario: admin
      ip_origen: 172.20.3.111
         accion: Agent management
    descripcion: Fail to try added module 'Host Alive' for agent VIEW00
          fecha: 2016-11-30 16:40:40
     utimestamp: 1480520440
    *************************** 39. row ***************************
    

    Los permisos en MySQL estan correctos, porque sino no podría entrar en Pandora ni poder generar agentes por lo que ya no se que más logs puedo extraer. Esto os dice algo máS?

  4. [HISTORY] Hago un repaso de lo que he instalado y probado CentOS 7.3 con MySQL 5.7.15 con PandoraServer 6.03 -> no consigo instalar el pandora, se queja de insert tables en la instalación de la web CentOS 7.3 con MySQL 5.7.15 con PandoraServer 6.04 -> no consigo instalar el pandora, se queja de insert tables en la instalación de la web CentOS 7.3 con MySQL 5.6.33 con PandoraServer 6.03  -> No puedo crear ningun modulo CentOS 7.3 con MySQL 5.6.33 con PandoraServer 6.04  -> No puedo crear ningun modulo CentOS 6.6 con MySQL 5.7.15 con PandoraServer 6.03 -> No puedo crear ningun modulo CentOS 6.6 con MySQL 5.7.15 con PandoraServer 6.04 -> No puedo crear ningun modulo CentOS 6.6 con MySQL 5.6.33 con PandoraServer 6.03 -> No puedo crear ningun modulo CentOS 6.6 con MySQL 5.6.33 con PandoraServer 6.04 -> No puedo crear ningun modulo CentOS 6.8 con MySQL 5.5.32 con PandoraServer 6.04 -> FUNCIONA OK Indicar que siempre he usado un CentOS MINIMAL y el MySQL lo he instalado mediante binarios y usando un my.cnf generado por percona a mi gusto La instalación del Pandora_console y Pandora_server 6.03 se ha hecho siempre mediante YUM y la 6.04 mediante rpm directamente descargados desde la web de pandorafms [UPDATE] Despues de probar lo innombrable, he bajado el pandora appliance que hay en la web y que essta configurado bajo CentOS y he visto que usais la versión 6.8 con un MySQL 5.5.32 así que si esa versión os VA, tenia que ir si o si mediante un CentOS 6.8 MINIMAL con un MySQL 5.5.32 mediante binarios.....y así ha sido. Lo que me hace pensar que posiblemente con un CentOS 7.3 y un MysQL 5.5.32 debería funcionar....ya que el problema parece estar en la consola a la hora de hacer el insert en el MySQL Ahora solo me queda probar a ver si puedo hacer un export del MySQL con los schemas e intentar pasarlo a un MySQL 5.7.15, ya que en este mismo foro me han comentado que si que funciona. Cuando haga esta prueba os lo comento por si os interesa

  5. Actualizo con mis ultimas pruebas CentOS 7.3 con MySQL 5.5.32 con PandoraServer 6.04 -> Funciona OK UPDATE Minor -> CentOS 7.3 con MySQL 5.5.52 con PandoraServer 6.04 -> Funciona OK UPDATE Major -> CentOS 7.3 con MySQL 5.6.33 con PandoraServer 6.04 -> Funciona OK He hecho un update mediante binarios de la 5.5.32 a la 5.5.52 y funciona OK. He pasado después a binarios 5.6.33 y me ha funcionado todo OK también. Me quedaría probar la 5.7, pero ya lo voy a dejar aqui, porque se ha quejado de algunas tablas a la hora de pasar de la 5.5 a la 5.6, que he solucionado con el

    mysql_upgrade -u root -h127.0.0.1 --force
    

    Y  me temo que en la 5.7, tendré más problemas de schemas y demás, por lo que lo voy a dejar aqui. Al final he conseguido poder montar un Pandora 6S04 (mediante RPM, no YUM) sobre un CentOS 7.3 Minimal con MySQL 5.6.33 mediante binarios. Eso si, he tenido que pasar por la 5.5, ya que montarlo de golpe en estar versión no funcionaba la creación de modulos. saludos

  6. Hola gairhald, Muchas gracias por compartir todo el proceso, resulta de mucha utilidad para descubrir incompatibilidades y compatibilidades, ya que nosotros solemos ceñirnos al estándar que recomendamos (sería imposible probar todas las combinaciones de distros, versiones de MySQL, php...). Gracias! Un saludo, Antonio.

Entra en tu cuenta para publicar.