Page 1 of 1

[Nagios-devel] NODutils: Duplicate lines in servicechecks table for

Posted: Mon Nov 02, 2009 12:08 pm
by Guest
Hi

OS: Ubuntu 8.10 64bit
Nagios 3.2.0
NDOutils: 1.4b9

When I check the servicechecks table each check of a service is listed
twice, but not with the same information in both rows.

I've pasted two sample rows from my database here. They are both from
the same service check. All fields before start_time is identical, so
I didn't paste them. service_object_id is the same for both rows.

start_time | start_time_usec | end_time | end_time_usec |
command_object_id | command_args | command_line | timeout |
early_timeout | execution_time | latency | return_code output |
long_output | perfdata
2009-11-02 12:53:28 | 124478 | 1970-01-01 01:00:00 | 0 | 21 |
250!400!RSZDT | /usr/local/nagios/libexec/check_procs -w 250 -c 40...
| 60 | 0 | 0 | 0.124 | 0 | PROCS OK: 13 processes with STATE =3D RSZDT
2009-11-02 12:53:28 | 124478 | 2009-11-02 12:53:28 | 139766 | 0 | | |
60 | 0 | 0.01529 | 0.124 | 0 | PROCS OK: 13 processes with STATE =3D
RSZDT


In dbhandlers.c on line 1518 all I can think of is that ON DUPLICATE
KEY UPDATE does not work as it should. I haven't had time to look at
the code and programming isn't my strong side.

if(asprintf(&buf,"INSERT INTO %s SET %s, command_object_id=3D'%lu',
command_args=3D'%s', command_line=3D'%s' ON DUPLICATE KEY UPDATE %s"
,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICECHECKS]
,buf1
,command_id
,es[0]
,es[1]
,buf1
)=3D=3D-1)
buf=3DNULL;

Hope someone can clarify this for me, is this a bug in nagios, ndoutil
or have I done something wrong...

Thanks in advance.

--
=D8yvind Nordang





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]