NDO-3 query failed after each apply configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
PeterDK
Posts: 25
Joined: Tue Jun 05, 2018 9:19 am

NDO-3 query failed after each apply configuration

Post by PeterDK »

Hi,

everytime we apply our configuration we see a lot of the following log entries:

Code: Select all

[1611240271] NDO-3: The following query failed while MySQL appears to be connected:
[1611240271] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,63030,FROM_UNIXTIME(1554368169),'my-author_name','my-comment_data',915511,0,1,-1778430201,FROM_UNIXTIME(1554368106),FROM_UNIXTIME(-224062095)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611240271] NDO-3: The following query failed while MySQL appears to be connected:
[1611240271] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,63030,FROM_UNIXTIME(1554368169),'my-author_name','my-comment_data',915511,0,1,-1778430201,FROM_UNIXTIME(1554368106),FROM_UNIXTIME(-224062095)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
So, the same entry, one for nagios_scheduleddowntime and one for nagios_downtimehistory.
But I can't find these entries anymore in NagiosXI + those object ID's don't even exist anymore.
The author and comments are valid and I recognise them from something in the past, but they are gone.
I think the issue we have here is that the scheduled_end_time is a negative value.

But the main question is, where does this come from.
I already looked in the cfg file and database tables for orphaned entries or something like that.

I've also looked at this kb article https://support.nagios.com/kb/article/n ... n-822.html
But I don't see the error, it just ends with:

Code: Select all

[1611240271] NDO-3: Ended event_handler thread
[1611240284] NDO-3: Ended service_check thread
[1611240296] NDO-3: Ended timed_event thread
[1611240333] NDO-3: Ended service_status thread
[1611240614] NDO-3: Ended downtime thread
Kind regards,
Peter
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NDO-3 query failed after each apply configuration

Post by ssax »

What XI version are you running? I would upgrade to the latest if you haven't (XI 5.8.1) there have been some new NDO3 fixes.

Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.
jweijters
Posts: 63
Joined: Thu Feb 06, 2020 3:50 am

Re: NDO-3 query failed after each apply configuration

Post by jweijters »

I just updated to Nagios 5.8.1 and have similar problem, however it already occurs during startup of Nagios

It is also a log entry about query failure it looks like there is a negative value in there: FROM_UNIXTIME(-192526097)

Where does this negative value comes from?

Code: Select all

[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43525,FROM_UNIXTIME(1606744751),'Martijn Stol','Zero is nog niet geinstalleerd',3312,0,1,-1799270792,FROM_UNIXTIME(1606744695),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43525,FROM_UNIXTIME(1606744751),'Martijn Stol','Zero is nog niet geinstalleerd',3312,0,1,-1799270792,FROM_UNIXTIME(1606744695),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43512,FROM_UNIXTIME(1606744776),'Martijn Stol','Zero is nog niet geinstalleerd',3313,0,1,-1799270793,FROM_UNIXTIME(1606744696),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43512,FROM_UNIXTIME(1606744776),'Martijn Stol','Zero is nog niet geinstalleerd',3313,0,1,-1799270793,FROM_UNIXTIME(1606744696),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43490,FROM_UNIXTIME(1606744800),'Martijn Stol','Zerto is nog niet geinstalleerd',3314,0,1,-1799270799,FROM_UNIXTIME(1606744702),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43490,FROM_UNIXTIME(1606744800),'Martijn Stol','Zerto is nog niet geinstalleerd',3314,0,1,-1799270799,FROM_UNIXTIME(1606744702),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43462,FROM_UNIXTIME(1606744821),'Martijn Stol','Zerto is nog niet geinstalleerd',3315,0,1,-1799270800,FROM_UNIXTIME(1606744703),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43462,FROM_UNIXTIME(1606744821),'Martijn Stol','Zerto is nog niet geinstalleerd',3315,0,1,-1799270800,FROM_UNIXTIME(1606744703),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: Ended acknowledgement thread
[1611299613] NDO-3: Ended flapping thread
[1611299613] NDO-3: Ended notification thread
[1611299613] Caught SIGSEGV, shutting down...

And then Nagios just stops.

Kind regards,

Joris Weijters
Last edited by jweijters on Fri Jan 22, 2021 3:14 am, edited 2 times in total.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NDO-3 query failed after each apply configuration

Post by WillemDH »

@ssax PeterDK is a colleague of me and is unavailable today. We are running 5.8.1. Sent you a PM with our system profile.
Nagios XI 5.8.1
https://outsideit.net
jweijters
Posts: 63
Joined: Thu Feb 06, 2020 3:50 am

Re: NDO-3 query failed after each apply configuration

Post by jweijters »

jweijters wrote:I just updated to Nagios 5.8.1 and have similar problem, however it already occurs during startup of Nagios

It is also a log entry about query failure it looks like there is a negative value in there: FROM_UNIXTIME(-192526097)

Where does this negative value comes from?

Code: Select all

[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43525,FROM_UNIXTIME(1606744751),'Martijn Stol','Zero is nog niet geinstalleerd',3312,0,1,-1799270792,FROM_UNIXTIME(1606744695),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43525,FROM_UNIXTIME(1606744751),'Martijn Stol','Zero is nog niet geinstalleerd',3312,0,1,-1799270792,FROM_UNIXTIME(1606744695),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43512,FROM_UNIXTIME(1606744776),'Martijn Stol','Zero is nog niet geinstalleerd',3313,0,1,-1799270793,FROM_UNIXTIME(1606744696),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43512,FROM_UNIXTIME(1606744776),'Martijn Stol','Zero is nog niet geinstalleerd',3313,0,1,-1799270793,FROM_UNIXTIME(1606744696),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43490,FROM_UNIXTIME(1606744800),'Martijn Stol','Zerto is nog niet geinstalleerd',3314,0,1,-1799270799,FROM_UNIXTIME(1606744702),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43490,FROM_UNIXTIME(1606744800),'Martijn Stol','Zerto is nog niet geinstalleerd',3314,0,1,-1799270799,FROM_UNIXTIME(1606744702),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_scheduleddowntime (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43462,FROM_UNIXTIME(1606744821),'Martijn Stol','Zerto is nog niet geinstalleerd',3315,0,1,-1799270800,FROM_UNIXTIME(1606744703),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: The following query failed while MySQL appears to be connected:
[1611299613] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,43462,FROM_UNIXTIME(1606744821),'Martijn Stol','Zerto is nog niet geinstalleerd',3315,0,1,-1799270800,FROM_UNIXTIME(1606744703),FROM_UNIXTIME(-192526097)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611299613] NDO-3: Ended acknowledgement thread
[1611299613] NDO-3: Ended flapping thread
[1611299613] NDO-3: Ended notification thread
[1611299613] Caught SIGSEGV, shutting down...

And then Nagios just stops.

Kind regards,

Joris Weijters
Hi,

I ran a repair database. This fixed the crashing Nagios, however the insert still fails.
Where is this query intiated from?

kind regards,

Joris Weijters
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NDO-3 query failed after each apply configuration

Post by WillemDH »

@ssax @jweijters

The nagios process on our Nagios production servers also just crashed :(

Code: Select all

Jan 22 11:13:54 nagiosserver nagios[5964]: Caught SIGSEGV, shutting down...
The weird things is that the Nagios service seem to be still running, but the nagios process is killed / unexistant..

The exact same thing also happened wednessday evening, but we were hoping that it was a one-time thing. Apparently not.. :(

Both times the nagios process crash happened about exact 2 minutes after an apply configuration. (There were multiple other apply configurations where the nagios process did not crash)

Already gone through the core / audit logs looking for something that could explain the process kill, but found absolutely nothing. Out mysqldb should not be corrupt, as we got a check for that which is not triggering.

Created a zip containing nagios.log and nagios.cfg and PM'ed it to you Sean.

Please advice how to continue.

Grtz

Willem
You do not have the required permissions to view the files attached to this post.
Last edited by WillemDH on Fri Jan 22, 2021 6:35 am, edited 1 time in total.
Nagios XI 5.8.1
https://outsideit.net
jweijters
Posts: 63
Joined: Thu Feb 06, 2020 3:50 am

Re: NDO-3 query failed after each apply configuration

Post by jweijters »

@WillenDH,

After the database repair, Nagios keeps running, The database repaire fixed al lot of indexes
I also found that the default value for the tables have been changed.

it looks like the negative date values comes from dates entered during setting of the downtime dates after 2038
In the pre-upgrade database these entries were also not available.

Nagios 5.8.1:

Code: Select all

Database changed
MariaDB [nagios]> describe nagios_scheduleddowntime;
+------------------------+--------------+------+-----+---------------------+----------------+
| Field                  | Type         | Null | Key | Default             | Extra          |
+------------------------+--------------+------+-----+---------------------+----------------+
| scheduleddowntime_id   | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id            | smallint(6)  | NO   | MUL | 0                   |                |
| downtime_type          | smallint(6)  | NO   |     | 0                   |                |
| object_id              | int(11)      | NO   |     | 0                   |                |
| entry_time             | datetime     | NO   |     | 1970-01-01 00:00:01 |                |
| author_name            | varchar(64)  | NO   |     |                     |                |
| comment_data           | varchar(255) | NO   |     |                     |                |
| internal_downtime_id   | int(11)      | NO   |     | 0                   |                |
| triggered_by_id        | int(11)      | NO   |     | 0                   |                |
| is_fixed               | smallint(6)  | NO   |     | 0                   |                |
| duration               | int(11)      | NO   |     | 0                   |                |
| scheduled_start_time   | datetime     | NO   |     | 1970-01-01 00:00:01 |                |
| scheduled_end_time     | datetime     | NO   |     | 1970-01-01 00:00:01 |                |
| was_started            | smallint(6)  | NO   |     | 0                   |                |
| actual_start_time      | datetime     | NO   |     | 1970-01-01 00:00:01 |                |
| actual_start_time_usec | int(11)      | NO   |     | 0                   |                |
+------------------------+--------------+------+-----+---------------------+----------------+
16 rows in set (0.00 sec)

Nagios 5.6.14:

Code: Select all

MariaDB [nagios]> describe nagios_scheduleddowntime;
+------------------------+--------------+------+-----+---------------------+----------------+
| Field                  | Type         | Null | Key | Default             | Extra          |
+------------------------+--------------+------+-----+---------------------+----------------+
| scheduleddowntime_id   | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id            | smallint(6)  | NO   | MUL | 0                   |                |
| downtime_type          | smallint(6)  | NO   |     | 0                   |                |
| object_id              | int(11)      | NO   |     | 0                   |                |
| entry_time             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| author_name            | varchar(64)  | NO   |     |                     |                |
| comment_data           | varchar(255) | NO   |     |                     |                |
| internal_downtime_id   | int(11)      | NO   |     | 0                   |                |
| triggered_by_id        | int(11)      | NO   |     | 0                   |                |
| is_fixed               | smallint(6)  | NO   |     | 0                   |                |
| duration               | int(11)      | NO   |     | 0                   |                |
| scheduled_start_time   | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| scheduled_end_time     | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| was_started            | smallint(6)  | NO   |     | 0                   |                |
| actual_start_time      | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| actual_start_time_usec | int(11)      | NO   |     | 0                   |                |
+------------------------+--------------+------+-----+---------------------+----------------+
16 rows in set (0.00 sec)
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: NDO-3 query failed after each apply configuration

Post by WillemDH »

@jweijters,

Ok, thanks for the suggestion. Did the mysql repair and rebooted the server..

Code: Select all

DATABASE: nagios
TABLE:
/var/lib/mysql/nagios /home/myuser@mydomain
- recovering (with sort) MyISAM-table 'nagios_acknowledgements'
Data records: 42309
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_commands'
Data records: 448
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_commenthistory'
Data records: 2384919
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_comments'
Data records: 177
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_configfiles'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_configfilevariables'
Data records: 133
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_conninfo'
Data records: 20036
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_contact_addresses'
Data records: 216
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactgroup_members'
Data records: 237
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactgroups'
Data records: 23
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contact_notificationcommands'
Data records: 420
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactnotificationmethods'
Data records: 166660
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_contactnotifications'
Data records: 166565
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'nagios_contacts'
Data records: 210
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactstatus'
Data records: 210
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_customvariables'
Data records: 4699
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_customvariablestatus'
Data records: 4699
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with keycache) MyISAM-table 'nagios_dbversion'
Data records: 1

---------

- recovering (with sort) MyISAM-table 'nagios_downtimehistory'
Data records: 435117
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_eventhandlers'
Data records: 101
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_externalcommands'
Data records: 24646
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_flappinghistory'
Data records: 285789
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_hostchecks'
Data records: 4024
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_contactgroups'
Data records: 2668
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_contacts'
Data records: 5661
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostdependencies'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalation_contactgroups'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalation_contacts'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalations'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostgroup_members'
Data records: 10812
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostgroups'
Data records: 320
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_parenthosts'
Data records: 16
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hosts'
Data records: 2406
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_hoststatus'
Data records: 2406
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
- Fixing index 7
- Fixing index 8
- Fixing index 9
- Fixing index 10
- Fixing index 11
- Fixing index 12
- Fixing index 13
- Fixing index 14
- Fixing index 15
- Fixing index 16
- Fixing index 17
- Fixing index 18
- Fixing index 19

---------

- recovering (with sort) MyISAM-table 'nagios_instances'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_logentries'
Data records: 3307106
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'nagios_notifications'
Data records: 205262
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'nagios_objects'
Data records: 80151
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'nagios_processevents'
Data records: 11452
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_programstatus'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_runtimevariables'
Data records: 17
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_scheduleddowntime'
Data records: 416
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicechecks'
Data records: 48382
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_service_contactgroups'
Data records: 19367
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_service_contacts'
Data records: 20953
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicedependencies'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalation_contactgroups'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalation_contacts'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalations'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicegroup_members'
Data records: 28632
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicegroups'
Data records: 122
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_service_parentservices'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_services'
Data records: 18367
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_servicestatus'
Data records: 18367
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
- Fixing index 7
- Fixing index 8
- Fixing index 9
- Fixing index 10
- Fixing index 11
- Fixing index 12
- Fixing index 13
- Fixing index 14
- Fixing index 15
- Fixing index 16
- Fixing index 17
- Fixing index 18
- Fixing index 19

---------

- recovering (with sort) MyISAM-table 'nagios_statehistory'
Data records: 6753187
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_systemcommands'
Data records: 140
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_timedeventqueue'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6

---------

- recovering (with sort) MyISAM-table 'nagios_timedevents'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6

---------

- recovering (with sort) MyISAM-table 'nagios_timeperiods'
Data records: 222
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_timeperiod_timeranges'
Data records: 1523
- Fixing index 1
- Fixing index 2
/home/myuser@mydomain

===============
REPAIR COMPLETE
===============
DATABASE: nagiosql
TABLE:
/var/lib/mysql/nagiosql /home/myuser@mydomain
- recovering (with sort) MyISAM-table 'tbl_command'
Data records: 455
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contactgroup'
Data records: 25
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contact'
Data records: 210
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contacttemplate'
Data records: 3
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_domain'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostdependency'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostescalation'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostextinfo'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostgroup'
Data records: 333
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_host'
Data records: 2438
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hosttemplate'
Data records: 99
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_info'
Data records: 218
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContactgroup'
Data records: 4
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContact'
Data records: 7
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandHost'
Data records: 3
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandService'
Data records: 3
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContactgroup'
Data records: 2
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContacttemplate'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToVariabledefinition'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandHost'
Data records: 13
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandService'
Data records: 13
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToContactgroup'
Data records: 37
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToContacttemplate'
Data records: 208
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToVariabledefinition'
Data records: 78
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_DH'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_DH'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_H'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_H'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContactgroup'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContact'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHostgroup'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHost'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHostgroup'
Data records: 125
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHost'
Data records: 272
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContactgroup'
Data records: 7
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContact'
Data records: 27
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHostgroup'
Data records: 23
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHost'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHosttemplate'
Data records: 60
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToVariabledefinition'
Data records: 3
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToContactgroup'
Data records: 2678
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToContact'
Data records: 5535
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHostgroup'
Data records: 7799
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHost'
Data records: 16
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHosttemplate'
Data records: 2419
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToVariabledefinition'
Data records: 297
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_DH'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_DH'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_H'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_H'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_DS'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_S'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContactgroup'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContact'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHostgroup'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHost'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToService'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToServicegroup'
Data records: 17
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToService'
Data records: 302
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContactgroup'
Data records: 21
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContact'
Data records: 264
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHostgroup'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHost'
Data records: 3
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicegroup'
Data records: 473
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicetemplate'
Data records: 97
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToVariabledefinition'
Data records: 4
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContactgroup'
Data records: 17908
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContact'
Data records: 18495
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHostgroup'
Data records: 6
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHost'
Data records: 18629
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicegroup'
Data records: 10193
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicetemplate'
Data records: 17601
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToVariabledefinition'
Data records: 4465
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkTimeperiodToTimeperiod'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_logbook'
Data records: 93
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_mainmenu'
Data records: 7
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_servicedependency'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_serviceescalation'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_serviceextinfo'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_servicegroup'
Data records: 124
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_service'
Data records: 18631
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_servicetemplate'
Data records: 554
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_session_locks'
Data records: 4
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_session'
Data records: 4
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_settings'
Data records: 13
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_submenu'
Data records: 29
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_timedefinition'
Data records: 1537
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_timeperiod'
Data records: 224
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_user'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_variabledefinition'
Data records: 8885
- Fixing index 1
/home/myuser@mydomain

===============
REPAIR COMPLETE
===============
DATABASE: nagiosxi
TABLE:
/var/lib/mysql/nagiosxi /home/myuser@mydomain
- recovering (with sort) MyISAM-table 'xi_auditlog'
Data records: 33925
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'xi_auth_tokens'
Data records: 3546
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_cmp_trapdata_log'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_cmp_trapdata'
Data records: 201
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_commands'
Data records: 76
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'xi_eventqueue'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_events'
Data records: 5132
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'xi_incidents'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'xi_meta'
Data records: 5138
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'xi_options'
Data records: 438
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_sessions'
Data records: 3
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_sysstat'
Data records: 17
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'xi_usermeta'
Data records: 10171
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'xi_users'
Data records: 195
- Fixing index 1
- Fixing index 2
/home/myuser@mydomain

===============
REPAIR COMPLETE
===============

=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
Unfortunately after the repair and reboot the nagios process crashed again...

Also, I still see 100's of query failed errors after applying:

Code: Select all

[1611318543] NDO-3: The following query failed while MySQL appears to be connected:
[1611318543] NDO-3: INSERT INTO nagios_downtimehistory (instance_id, downtime_type, object_id, entry_time, author_name, comment_data, internal_downtime_id, triggered_by_id, is_fixed, duration, scheduled_start_time, scheduled_end_time) VALUES (1,1,63030,FROM_UNIXTIME(1554368169),'Claeys Stephen','server for citrix PVS golden image',915511,0,1,-1778430201,FROM_UNIXTIME(1554368106),FROM_UNIXTIME(-224062095)) ON DUPLICATE KEY UPDATE instance_id = VALUES(instance_id), downtime_type = VALUES(downtime_type), object_id = VALUES(object_id), entry_time = VALUES(entry_time), author_name = VALUES(author_name), comment_data = VALUES(comment_data), internal_downtime_id = VALUES(internal_downtime_id), triggered_by_id = VALUES(triggered_by_id), is_fixed = VALUES(is_fixed), duration = VALUES(duration), scheduled_start_time = VALUES(scheduled_start_time), scheduled_end_time = VALUES(scheduled_end_time)
[1611318543] NDO-3: Ended event_handler thread
Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: NDO-3 query failed after each apply configuration

Post by benjaminsmith »

Hi Willem,

I'm going to reach out to the developer of ndo for assistance. It appears to be an issue with setting dates for the downtimes into the future.

Thank you for your patience.

Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
PeterDK
Posts: 25
Joined: Tue Jun 05, 2018 9:19 am

Re: NDO-3 query failed after each apply configuration

Post by PeterDK »

Hi everyone,

just a small update with a link to another forum thread, which may or may not be related:
https://support.nagios.com/forum/viewto ... 16&t=61378
We are also experiencing higher load of the mysql process and more unstable active checks.

We will review our backup and apply config strategy and follow up after the database repair this morning.
Last step will be downgrading to NDO2 again, I suppose.

Kind regards,
Peter
Locked