Page 1 of 1

"force an immediate check" queries are stuck in Pending

Posted: Fri Jul 17, 2020 4:07 pm
by katieKatiePants
am currently running a very freshly upgraded nagiosXi 5.7.2 ...

i had a couple of hosts and services that were being Very Fussy after the upgrade yesterday so while trying to fix their attitude problems, i ran some "force an immediate check" on them and they never came back. after i fixed some other issues with their host/service template, i was able to get them to behave but those pending queries are like lichen, holding on for thousands of years - we'll be able to date stonehenge based on these pending queries.

the fun thing is, when one clicks on the # in the Pending box, the result is "hey jackass, i found 0 entries matching your lame null query"

i ran most of the "database problems" commands on this page (https://support.nagios.com/kb/article/n ... ay-21.html) ... and i'm hoping that where it says "tail /var/log/mysqld.log" i'm subsititututing "tail /var/log/mariadb/mariadb.log" appropriately. b/c there ain't No "mysqld.log" file anywhere ...

the "repair_databases" thing went nicely but the pending queries are still there. (thus their immortalization as lichen...) i also did the fun "truncate empty tables" commands b/c it's friday at 5:00, why not YOLO with a prod implementation. i've restarted le nagios service as well as (again, that cavalier friday bravado kicking in) restarting the whole gosh darn server.

any thoughts on how to _actually_ get rid of these Pending checks?

#YOLO

Re: "force an immediate check" queries are stuck in Pending

Posted: Mon Jul 20, 2020 1:45 pm
by benjaminsmith
Hi,

Thanks for taking the time to explain the situation. I believe It's an issue with the backend database utility and let's stop the nagios service and truncate the nagios_hosts, nagios_services, nagios_hoststatus, nagios_servicestatus tables, the restart core, and let me know if the issue is resolved. Here are the commands, I would recommend making a backup or taking a snapshot before making any changes.

Code: Select all

systemctl stop nagios
 mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_hosts'
 mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_services'
 mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_hoststatus'
 mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_servicestatus'
 systemctl start nagios
 systemctl status nagios
If the issue is not resolved, please send me the system profile, and we'll determine the next stops.

References:
Repairing The Nagios XI Databases
Backing Up And Restoring Your Nagios XI System

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.

Re: "force an immediate check" queries are stuck in Pending

Posted: Tue Jul 28, 2020 2:56 pm
by katieKatiePants
that did the trick. #heckYEAH

i guess we'll have to resort to using tree rings or something else now for stonehenge.

b/c i'm using the more recent version of nagios, what's the deal with the mysqld.log file? is it now the mariadb log file?

Re: "force an immediate check" queries are stuck in Pending

Posted: Tue Jul 28, 2020 3:41 pm
by benjaminsmith
Hello,

Excellent!

It depends on the system, but yeah, mysql.log is now mariadb.log. If the file names and paths stayed the same in Linux, this stuff would get too easy ;)