Announcement

Collapse
No announcement yet.

Error NDO insert on mysql

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error NDO insert on mysql

    Hi,
    Sorry for my very bad english.
    I had a Centreon 2.2 working.
    In /var/log/messages I had this error:
    **************************
    Apr 20 18:52:43 localhost ndo2db-3x: Error: mysql_query() failed for 'INSERT INTO nagios_customvariablestatus SET instance_id='1', object_id='1234', status_update_time=FROM_UNIXTIME(1303318354), has_been_modified='0', varname='MSSQLEXCLUDE', varvalue='--name='^(?!(tempdb))' --regexp' ON DUPLICATE KEY UPDATE instance_id='1', object_id='1234', status_update_time=FROM_UNIXTIME(1303318354), has_been_modified='0', varname='MSSQLEXCLUDE', varvalue='--name='^(?!(tempdb))' --regexp''
    **************************

    Can help me?

    Thanks
    Diego.

  • #2
    You can try this
    Code:
    CREATE INDEX start_time_idx ON nagios_hostchecks (start_time);
    CREATE INDEX start_time_idx ON nagios_servicechecks (start_time);
    CREATE INDEX schedule_time_idx ON nagios_timedeventqueue (scheduled_time);
    ALTER TABLE `nagios_configfilevariables` DROP INDEX `instance_id`;
    ADD INDEX `instance_id` (`instance_id`, `configfile_id`);  or
      
     ALTER TABLE `nagios_configfilevariables` DROP INDEX `instance_id` , ADD INDEX `instance_id` ( `instance_id` , `configfile_id` );
      
    Autres possibilités d'index à ajouter :  
    
      
     
    • servicechecks / service_object_id
    • servicechecks / state
    • hostcheck / host_object_id
    • hostcheck / state
    • objects / objecttype_id
    • services / host_object_id
    • statehistory / object_id
    • statehistory / state_change
    • statehistory / state
    • statehistory / state_time
    • statehistory / last_state
    • hoststatus / last_hard_state
    • servicestatus / last_hard_state
    Pensez également à ajouter ceci à la configuration de MySQL (/etc/my.cnf par exemple) [mysqld] innodb_flush_log_at_trx_commit = 2 Vous pouvez perdre quelques secondes de données en cas de crash. C'est à vous de de décider. J'ai trouvé que ce changement fait une énorme différence dans le démarrage de Nagios.

    Comment


    • #3
      Hi!

      How you solve this!? I have same problem.
      Can you give me a hint?

      Thanks!

      Comment

      Working...
      X