Page 1 of 1

Hudge log - SQL error

Posted: Tue Dec 13, 2016 10:25 am
by atos69
Hi everyone,

I am using Nagios Core 3.2.3 and Centreon 2.6.1 and from 2 months ago we’ve got a SQL problem.
We’re running on CentOS release 6.6 (Final).

Our infrastructure is composed of a main master Poller and many slave Pollers on multi sites and we supervise all hosts on Centreon.

The problem is about a log located on the centreon server. The log is increasing very fast. It is created automatically and it is called "messages".
It is constant increasing and it uses all free space.
The content of log is always the same. He's repetitive.

The log talks about a mysql error.

Please find the log content bellow:

mysql_error: 'Out of range value for column 'customvariablestatus_id' at row 1'
Dec 13 10:18:57 RRA-CENTREON ndo2db: Error: mysql_query() failed for 'INSERT INtO nagios_customvariablestatus SET instance_id='25', object_id='3889',status_update_time=FROM_UNIXTIME(1481620738), has_been_modified='0', varname='SNMPCOMMUNITY', varvalue='public' ON DUPLICATE KEY UPDATE instance_id='25', object_id='3889',status_update_time=FROM_UNIXTIME(1481620738), has_been_modified='0', varname='SNMPCOMMUNITY', varvalue='public''


We've phpmyadmin installed on the server and I searched this column. I'm bad in SQL but I saw that the type of this column is in INT(11). You'll see that column "customvariablestatus_id" have max value define by INT like it's explained here:

http://dev.mysql.com/doc/refman/5.5/en/ ... types.html

The max value seems to be 2147483647. Autoincrement is it good ?

Don't take care about varname "TESTx" It's manually entries.

I put a screenshot about table "customvariablestatus".

We don't want to use function log rotate we just wan't to solve this problem.

We need support, thanks for your help :D !

Re: Hudge log - SQL error

Posted: Tue Dec 13, 2016 11:37 am
by dwhitfield
atos69 wrote: I am using Nagios Core 3.2.3
That's super old, even by Nagios 3 standards. I'd suggest upgrading to Core 4.2.4 and the latest NDOUtils: https://www.nagios.com/news/2016/09/nag ... 1-release/. You'll get a ton of improvements, including lots of security fixes.

Did you compile from source or install from distro repos? If you compiled from source, use https://assets.nagios.com/downloads/nag ... ading.html

If you installed from distro repos, then yum update will likely do the trick.

I don't know if the upgrade is going to specifically fix your issue, but if we do end up finding a bug, we'll need to confirm it's in the latest version anyway.