Ticket #124 (closed defect: Fixed)

Opened 5 months ago

Last modified 5 months ago

Not all rrd files are beeing updated

Reported by: passie Owned by: jmathis
Priority: minor Milestone: Centreon-2.0
Component: CentStorage Version: beta6
Keywords: rrd Cc:

Description

If have some problems on some rrd files.
The files are not updated because of an error/bug

As far as i can see the problem is in lib/identifyMetric.pm at line 93.

output log centstorage.log

1218031463 - Error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `metric_id` = '980'' at line 1
1218031463 - Error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `metric_id` = '880'' at line 1
1218031464 - Error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `metric_id` = '1396'' at line 1

Change History

Changed 5 months ago by ncordier

  • owner set to shotamchay
  • status changed from new to assigned

Changed 5 months ago by passie

Additional info:
INSERT INTO metrics (metric_id, index_id, metric_name, unit_name, warn, crit, hidden, min, max, locked) VALUES
(880, 307, 'size', 'B', 0, 0, '0', 0, 0, NULL);

Changed 5 months ago by passie

if i write the sql statement to the log file i'm getting the following
but there is no 15581218100659 id

UPDATE `metrics` SET `warn` = '64748912640', `crit` = '76889333760'  WHERE `metric_id` = 15581218100659

Changed 5 months ago by jmathis

  • owner changed from shotamchay to jmathis

did you update to RC1 ?

Changed 5 months ago by passie

I just installed RC2, and now i'm unable to export the hosts.cfg,services.cfg.
Also i'm seeing high metrid id's which are not configured on my server:

metric_id` = 8491218525132'
So it looks like the problem is still there.

Changed 5 months ago by macaronyde

Hi, I can confirm the problem (beta6 - RC2), got the same entry in my logfiles.
The problem should be the statement in line 93 of lib/identifyMetric.pm
My fix is to change line 80
from:
$str .= "warn = '".$warn."'" if ($warn);
to:
$str .= "warn = '".$warn."'" if ($warn ne "");

Regards Matthias

Changed 5 months ago by jmathis

ok commited r6187

now please test :)

thanks

Changed 5 months ago by jmathis

  • status changed from assigned to closed
  • resolution set to fixed

Ok I test, It's working fine.

Thanks.

Note: See TracTickets for help on using tickets.