ndo2db - Mysql_Query DELETE FROM

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
cachorroyayo
Cacti User
Posts: 53
Joined: Thu Sep 17, 2009 5:37 pm
Location: Lima - Peru

ndo2db - Mysql_Query DELETE FROM

Post by cachorroyayo »

Hello Forum.

I was checking my /var/log/messages and I just realise ndo2db is having troubles with mysql_query's :

Code: Select all

Jan 10 21:06:05 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265107)'
Jan 10 21:06:08 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265108)'
Jan 10 21:06:10 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265112)'
Jan 10 21:06:35 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265138)'
Jan 10 21:06:58 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265164)'
Jan 10 21:07:00 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265165)'
Jan 10 21:07:05 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265171)'
Jan 10 21:07:08 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265171)'
Jan 10 21:07:10 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265171)'
Jan 10 21:07:15 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265173)'
Jan 10 21:07:34 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265201)'
Jan 10 21:07:36 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265201)'
Jan 10 21:07:37 nagios2 nagios: SERVICE ALERT: Virtualmed04;PING;UNKNOWN;SOFT;1;Could not open pipe: /bin/ping -n -U -w 10 -c 5 10.1.1.121
Jan 10 21:07:37 nagios2 nagios: SERVICE ALERT: virtualmed06;PING;UNKNOWN;SOFT;1;Could not open pipe: /bin/ping -n -U -w 10 -c 5 192.168.210.32
Jan 10 21:07:37 nagios2 nagios: SERVICE ALERT: DRE Pasco;PING;CRITICAL;SOFT;3;CRITICAL - Time to live exceeded (10.27.1.151)
Jan 10 21:07:59 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265225)'
Jan 10 21:08:02 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265226)'
Jan 10 21:08:04 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265231)'
Jan 10 21:08:07 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265232)'
Jan 10 21:08:09 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265232)'
Jan 10 21:08:11 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265232)'
Jan 10 21:08:14 nagios2 ndo2db: Error: mysql_query() failed for 'DELETE FROM npc_hostchecks WHERE instance_id='1' AND start_time<FROM_UNIXTIME(1357265235)'


Other info

Code: Select all

[root@nagios2 eduardo]# cat /etc/redhat-release 
CentOS release 6.3 (Final)

Code: Select all

top - 21:15:06 up 3 days, 13 min,  3 users,  load average: 1.61, 1.53, 1.39
Tasks: 681 total,   1 running, 251 sleeping,   6 stopped, 423 zombie
Cpu(s): 32.1%us,  7.4%sy,  0.0%ni, 37.7%id, 22.6%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4019764k total,  3846352k used,   173412k free,   144200k buffers
Swap:  4161528k total,        0k used,  4161528k free,  3082624k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                              
15403 mysql     20   0  150m  31m 6048 S 64.0  0.8  46:47.83 mysqld                                                                                                                                                
21347 root      20   0 29032  13m 5588 S 24.7  0.4   0:00.87 php                                                                                                                                                   
    4 root      20   0     0    0    0 S 15.5  0.0 469:38.10 ksoftirqd/0                                                                                                                                           
   13 root      20   0     0    0    0 S  8.9  0.0 140:04.94 ksoftirqd/2                                                                                                                                           
   17 root      20   0     0    0    0 S  4.9  0.0  84:11.83 ksoftirqd/3                                                                                                                                           
21415 root      20   0 27944  12m 5744 S  4.6  0.3   0:00.14 php                                                                                                                                                   
21420 root      20   0 27944  12m 5744 S  4.6  0.3   0:00.14 php                                                                                                                                                   
21422 root      20   0 26948  11m 5704 S  4.3  0.3   0:00.13 php                                                                                                                                                   
21436 root      20   0 26692  11m 5504 S  4.3  0.3   0:00.13 php                                           

Code: Select all

top - 21:15:33 up 3 days, 13 min,  3 users,  load average: 1.42, 1.50, 1.38
Tasks: 675 total,   2 running, 244 sleeping,   6 stopped, 423 zombie
Cpu(s): 25.1%us,  3.7%sy,  0.0%ni, 53.3%id, 17.8%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   4019764k total,  3837348k used,   182416k free,   144200k buffers
Swap:  4161528k total,        0k used,  4161528k free,  3139804k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                              
15403 mysql     20   0  150m  31m 6048 S 87.5  0.8  47:03.25 mysqld                                                                                                                                                
21347 root      20   0 29032  13m 5588 S 28.4  0.4   0:08.48 php                                                                                                                                                   
    4 root      20   0     0    0    0 S  5.0  0.0 469:41.86 ksoftirqd/0                                                                                                                                           
   13 root      20   0     0    0    0 S  4.3  0.0 140:06.82 ksoftirqd/2                                                                                                                                           
   17 root      20   0     0    0    0 S  2.6  0.0  84:13.48 ksoftirqd/3                                                                                                                                           
    9 root      20   0     0    0    0 S  2.0  0.0 230:49.08 ksoftirqd/1                                                                                                                                           
21332 root      20   0  2960 1512  884 R  0.7  0.0   0:00.66 top                                                                                                                                                   
   22 root      20   0     0    0    0 R  0.3  0.0   0:24.61 events/3                                                                                                                                              
21354 root      20   0 26948  11m 5632 S  0.3  0.3   0:00.11 php                                           



I hope this info related to PHP may help.

Code: Select all

root@nagios2 eduardo]# cat /etc/php.ini | grep -i max | grep -v ';'
max_execution_time = 30     
max_input_time = 60
log_errors_max_len = 1024
post_max_size = 8M
upload_max_filesize = 2M
odbc.max_persistent = -1
odbc.max_links = -1
mysql.max_persistent = -1
mysql.max_links = -1
mysqli.max_links = -1
pgsql.max_persistent = -1
pgsql.max_links = -1
sybct.max_persistent = -1
sybct.max_links = -1
session.gc_maxlifetime = 1440
mssql.max_persistent = -1
mssql.max_links = -1

I don't know exactly why this is happen.
But the first time it happne I 'think' I fixed it increasing the number of processors and Memory size.
Now the Nagios instance go down and I need to restart mysql server to get it work normally.


Cacti runs with cacti.cmd each 5/min.


But the problems are this lines which came from I don't know.


Thank You very much.


Sincerely

Eduardo Mejia.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest