Page 2 of 3
Re: Nagios Event Log Empty
Posted: Wed Jul 26, 2017 10:27 am
by dwhitfield
What's the output of ll /var/lib/mysql/nagios/? Please put the output in a code block. The "Code" button is the fifth from the left on the post input screen (between Quote and List).
Re: Nagios Event Log Empty
Posted: Wed Jul 26, 2017 11:08 am
by ahoward12
Code: Select all
[root@NAGIOS ~]# ll /var/lib/mysql/nagios/
total 33908
-rw-rw---- 1 mysql mysql 61 Jul 13 12:46 db.opt
-rw-rw---- 1 mysql mysql 9100 Jul 13 12:46 nagios_acknowledgements.frm
-rw-rw---- 1 mysql mysql 8012 Jul 24 07:03 nagios_acknowledgements.MYD
-rw-rw---- 1 mysql mysql 5120 Jul 26 12:05 nagios_acknowledgements.MYI
-rw-rw---- 1 mysql mysql 8746 Jul 13 12:46 nagios_commands.frm
-rw-rw---- 1 mysql mysql 10700 Jul 26 02:30 nagios_commands.MYD
-rw-rw---- 1 mysql mysql 7168 Jul 26 12:05 nagios_commands.MYI
-rw-rw---- 1 mysql mysql 9340 Jul 13 12:46 nagios_commenthistory.frm
-rw-rw---- 1 mysql mysql 1026152 Jul 26 12:05 nagios_commenthistory.MYD
-rw-rw---- 1 mysql mysql 106496 Jul 26 12:05 nagios_commenthistory.MYI
-rw-rw---- 1 mysql mysql 9220 Jul 13 12:46 nagios_comments.frm
-rw-rw---- 1 mysql mysql 1088 Jul 26 12:05 nagios_comments.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_comments.MYI
-rw-rw---- 1 mysql mysql 8726 Jul 13 12:46 nagios_configfiles.frm
-rw-rw---- 1 mysql mysql 44 Jul 26 02:01 nagios_configfiles.MYD
-rw-rw---- 1 mysql mysql 5120 Jul 26 12:05 nagios_configfiles.MYI
-rw-rw---- 1 mysql mysql 8760 Jul 13 12:46 nagios_configfilevariables.frm
-rw-rw---- 1 mysql mysql 7032 Jul 26 02:30 nagios_configfilevariables.MYD
-rw-rw---- 1 mysql mysql 4096 Jul 26 12:05 nagios_configfilevariables.MYI
-rw-rw---- 1 mysql mysql 9262 Jul 13 12:46 nagios_conninfo.frm
-rw-rw---- 1 mysql mysql 96860 Jul 26 12:07 nagios_conninfo.MYD
-rw-rw---- 1 mysql mysql 13312 Jul 26 12:07 nagios_conninfo.MYI
-rw-rw---- 1 mysql mysql 8760 Jul 13 12:46 nagios_contact_addresses.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_contact_addresses.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_contact_addresses.MYI
-rw-rw---- 1 mysql mysql 8748 Jul 13 12:46 nagios_contactgroup_members.frm
-rw-rw---- 1 mysql mysql 45 Jul 26 02:01 nagios_contactgroup_members.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_contactgroup_members.MYI
-rw-rw---- 1 mysql mysql 8768 Jul 13 12:46 nagios_contactgroups.frm
-rw-rw---- 1 mysql mysql 40 Jul 26 02:01 nagios_contactgroups.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_contactgroups.MYI
-rw-rw---- 1 mysql mysql 8856 Jul 13 12:46 nagios_contact_notificationcommands.frm
-rw-rw---- 1 mysql mysql 2816 Jul 26 02:01 nagios_contact_notificationcommands.MYD
-rw-rw---- 1 mysql mysql 5120 Jul 26 12:05 nagios_contact_notificationcommands.MYI
-rw-rw---- 1 mysql mysql 9000 Jul 13 12:46 nagios_contactnotificationmethods.frm
-rw-rw---- 1 mysql mysql 664684 Jul 26 12:05 nagios_contactnotificationmethods.MYD
-rw-rw---- 1 mysql mysql 697344 Jul 26 12:05 nagios_contactnotificationmethods.MYI
-rw-rw---- 1 mysql mysql 8928 Jul 13 12:46 nagios_contactnotifications.frm
-rw-rw---- 1 mysql mysql 591669 Jul 26 12:05 nagios_contactnotifications.MYD
-rw-rw---- 1 mysql mysql 854016 Jul 26 12:05 nagios_contactnotifications.MYI
-rw-rw---- 1 mysql mysql 10026 Jul 13 12:46 nagios_contacts.frm
-rw-rw---- 1 mysql mysql 688 Jul 26 02:01 nagios_contacts.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_contacts.MYI
-rw-rw---- 1 mysql mysql 9240 Jul 13 12:46 nagios_contactstatus.frm
-rw-rw---- 1 mysql mysql 408 Jul 26 02:01 nagios_contactstatus.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_contactstatus.MYI
-rw-rw---- 1 mysql mysql 8844 Jul 13 12:46 nagios_customvariables.frm
-rw-rw---- 1 mysql mysql 9996 Jul 26 02:01 nagios_customvariables.MYD
-rw-rw---- 1 mysql mysql 18432 Jul 26 12:05 nagios_customvariables.MYI
-rw-rw---- 1 mysql mysql 8870 Jul 13 12:46 nagios_customvariablestatus.frm
-rw-rw---- 1 mysql mysql 11988 Jul 26 12:08 nagios_customvariablestatus.MYD
-rw-rw---- 1 mysql mysql 18432 Jul 26 12:08 nagios_customvariablestatus.MYI
-rw-rw---- 1 mysql mysql 8596 Jul 13 12:46 nagios_dbversion.frm
-rw-rw---- 1 mysql mysql 20 Jul 13 12:46 nagios_dbversion.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 13 12:50 nagios_dbversion.MYI
-rw-rw---- 1 mysql mysql 9490 Jul 13 12:46 nagios_downtimehistory.frm
-rw-rw---- 1 mysql mysql 25944 Jul 26 11:00 nagios_downtimehistory.MYD
-rw-rw---- 1 mysql mysql 12288 Jul 26 12:05 nagios_downtimehistory.MYI
-rw-rw---- 1 mysql mysql 9380 Jul 13 12:46 nagios_eventhandlers.frm
-rw-rw---- 1 mysql mysql 1836 Jul 26 12:05 nagios_eventhandlers.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_eventhandlers.MYI
-rw-rw---- 1 mysql mysql 8812 Jul 13 12:46 nagios_externalcommands.frm
-rw-rw---- 1 mysql mysql 3640 Jul 25 22:01 nagios_externalcommands.MYD
-rw-rw---- 1 mysql mysql 2048 Jul 26 12:05 nagios_externalcommands.MYI
-rw-rw---- 1 mysql mysql 9166 Jul 13 12:46 nagios_flappinghistory.frm
-rw-rw---- 1 mysql mysql 341445 Jul 26 11:59 nagios_flappinghistory.MYD
-rw-rw---- 1 mysql mysql 55296 Jul 26 12:05 nagios_flappinghistory.MYI
-rw-rw---- 1 mysql mysql 9660 Jul 13 12:46 nagios_hostchecks.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_hostchecks.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_hostchecks.MYI
-rw-rw---- 1 mysql mysql 8738 Jul 13 12:46 nagios_host_contactgroups.frm
-rw-rw---- 1 mysql mysql 4110 Jul 26 02:01 nagios_host_contactgroups.MYD
-rw-rw---- 1 mysql mysql 10240 Jul 26 12:05 nagios_host_contactgroups.MYI
-rw-rw---- 1 mysql mysql 8718 Jul 13 12:46 nagios_host_contacts.frm
-rw-rw---- 1 mysql mysql 480 Jul 26 02:01 nagios_host_contacts.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_host_contacts.MYI
-rw-rw---- 1 mysql mysql 9108 Jul 13 12:46 nagios_hostdependencies.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_hostdependencies.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_hostdependencies.MYI
-rw-rw---- 1 mysql mysql 8778 Jul 13 12:46 nagios_hostescalation_contactgroups.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_hostescalation_contactgroups.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_hostescalation_contactgroups.MYI
-rw-rw---- 1 mysql mysql 8758 Jul 13 12:46 nagios_hostescalation_contacts.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_hostescalation_contacts.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_hostescalation_contacts.MYI
-rw-rw---- 1 mysql mysql 9148 Jul 13 12:46 nagios_hostescalations.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_hostescalations.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_hostescalations.MYI
-rw-rw---- 1 mysql mysql 8730 Jul 13 12:46 nagios_hostgroup_members.frm
-rw-rw---- 1 mysql mysql 4185 Jul 26 02:01 nagios_hostgroup_members.MYD
-rw-rw---- 1 mysql mysql 11264 Jul 26 12:05 nagios_hostgroup_members.MYI
-rw-rw---- 1 mysql mysql 8756 Jul 13 12:46 nagios_hostgroups.frm
-rw-rw---- 1 mysql mysql 496 Jul 26 02:30 nagios_hostgroups.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_hostgroups.MYI
-rw-rw---- 1 mysql mysql 8732 Jul 13 12:46 nagios_host_parenthosts.frm
-rw-rw---- 1 mysql mysql 675 Jul 26 02:01 nagios_host_parenthosts.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_host_parenthosts.MYI
-rw-rw---- 1 mysql mysql 11932 Jul 13 12:46 nagios_hosts.frm
-rw-rw---- 1 mysql mysql 49988 Jul 26 02:30 nagios_hosts.MYD
-rw-rw---- 1 mysql mysql 14336 Jul 26 12:05 nagios_hosts.MYI
-rw-rw---- 1 mysql mysql 15368 Jul 13 12:46 nagios_hoststatus.frm
-rw-rw---- 1 mysql mysql 93520 Jul 26 12:08 nagios_hoststatus.MYD
-rw-rw---- 1 mysql mysql 82944 Jul 26 12:08 nagios_hoststatus.MYI
-rw-rw---- 1 mysql mysql 8684 Jul 13 12:46 nagios_instances.frm
-rw-rw---- 1 mysql mysql 20 Jul 13 12:46 nagios_instances.MYD
-rw-rw---- 1 mysql mysql 2048 Jul 26 12:05 nagios_instances.MYI
-rw-rw---- 1 mysql mysql 8972 Jul 13 12:46 nagios_logentries.frm
-rw-rw---- 1 mysql mysql 10570464 Jul 17 02:00 nagios_logentries.MYD
-rw-rw---- 1 mysql mysql 4560896 Jul 17 02:00 nagios_logentries.MYI
-rw-rw---- 1 mysql mysql 9168 Jul 13 12:46 nagios_notifications.frm
-rw-rw---- 1 mysql mysql 1131624 Jul 26 12:05 nagios_notifications.MYD
-rw-rw---- 1 mysql mysql 444416 Jul 26 12:05 nagios_notifications.MYI
-rw-rw---- 1 mysql mysql 8766 Jul 13 12:46 nagios_objects.frm
-rw-rw---- 1 mysql mysql 76948 Jul 26 02:01 nagios_objects.MYD
-rw-rw---- 1 mysql mysql 99328 Jul 26 12:05 nagios_objects.MYI
-rw-rw---- 1 mysql mysql 8948 Jul 13 12:46 nagios_processevents.frm
-rw-rw---- 1 mysql mysql 270944 Jul 26 02:01 nagios_processevents.MYD
-rw-rw---- 1 mysql mysql 55296 Jul 26 12:05 nagios_processevents.MYI
-rw-rw---- 1 mysql mysql 10174 Jul 13 12:46 nagios_programstatus.frm
-rw-rw---- 1 mysql mysql 124 Jul 26 12:07 nagios_programstatus.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:07 nagios_programstatus.MYI
-rw-rw---- 1 mysql mysql 8706 Jul 13 12:46 nagios_runtimevariables.frm
-rw-rw---- 1 mysql mysql 804 Jul 26 02:01 nagios_runtimevariables.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_runtimevariables.MYI
-rw-rw---- 1 mysql mysql 9332 Jul 13 12:46 nagios_scheduleddowntime.frm
-rw-rw---- 1 mysql mysql 192 Jul 26 11:00 nagios_scheduleddowntime.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_scheduleddowntime.MYI
-rw-rw---- 1 mysql mysql 9626 Jul 13 12:46 nagios_servicechecks.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_servicechecks.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_servicechecks.MYI
-rw-rw---- 1 mysql mysql 8750 Jul 13 12:46 nagios_service_contactgroups.frm
-rw-rw---- 1 mysql mysql 3735 Jul 26 02:01 nagios_service_contactgroups.MYD
-rw-rw---- 1 mysql mysql 10240 Jul 26 12:05 nagios_service_contactgroups.MYI
-rw-rw---- 1 mysql mysql 8730 Jul 13 12:46 nagios_service_contacts.frm
-rw-rw---- 1 mysql mysql 30 Jul 26 02:01 nagios_service_contacts.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_service_contacts.MYI
-rw-rw---- 1 mysql mysql 9178 Jul 13 12:46 nagios_servicedependencies.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_servicedependencies.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_servicedependencies.MYI
-rw-rw---- 1 mysql mysql 8790 Jul 13 12:46 nagios_serviceescalation_contactgroups.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_serviceescalation_contactgroups.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_serviceescalation_contactgroups.MYI
-rw-rw---- 1 mysql mysql 8770 Jul 13 12:46 nagios_serviceescalation_contacts.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_serviceescalation_contacts.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_serviceescalation_contacts.MYI
-rw-rw---- 1 mysql mysql 9220 Jul 13 12:46 nagios_serviceescalations.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_serviceescalations.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_serviceescalations.MYI
-rw-rw---- 1 mysql mysql 8748 Jul 13 12:46 nagios_servicegroup_members.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_servicegroup_members.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_servicegroup_members.MYI
-rw-rw---- 1 mysql mysql 8768 Jul 13 12:46 nagios_servicegroups.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_servicegroups.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_servicegroups.MYI
-rw-rw---- 1 mysql mysql 8756 Jul 13 12:46 nagios_service_parentservices.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_service_parentservices.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 13 12:46 nagios_service_parentservices.MYI
-rw-rw---- 1 mysql mysql 11766 Jul 13 12:46 nagios_services.frm
-rw-rw---- 1 mysql mysql 34732 Jul 26 02:30 nagios_services.MYD
-rw-rw---- 1 mysql mysql 14336 Jul 26 12:05 nagios_services.MYI
-rw-rw---- 1 mysql mysql 15448 Jul 13 12:46 nagios_servicestatus.frm
-rw-rw---- 1 mysql mysql 78288 Jul 26 12:08 nagios_servicestatus.MYD
-rw-rw---- 1 mysql mysql 68608 Jul 26 12:08 nagios_servicestatus.MYI
-rw-rw---- 1 mysql mysql 9174 Jul 13 12:46 nagios_statehistory.frm
-rw-rw---- 1 mysql mysql 8102040 Jul 26 12:03 nagios_statehistory.MYD
-rw-rw---- 1 mysql mysql 3221504 Jul 26 12:05 nagios_statehistory.MYI
-rw-rw---- 1 mysql mysql 9110 Jul 13 12:46 nagios_systemcommands.frm
-rw-rw---- 1 mysql mysql 18932 Jul 26 12:07 nagios_systemcommands.MYD
-rw-rw---- 1 mysql mysql 10240 Jul 26 12:07 nagios_systemcommands.MYI
-rw-rw---- 1 mysql mysql 8914 Jul 13 12:46 nagios_timedeventqueue.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_timedeventqueue.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_timedeventqueue.MYI
-rw-rw---- 1 mysql mysql 9104 Jul 13 12:46 nagios_timedevents.frm
-rw-rw---- 1 mysql mysql 0 Jul 13 12:46 nagios_timedevents.MYD
-rw-rw---- 1 mysql mysql 1024 Jul 26 12:05 nagios_timedevents.MYI
-rw-rw---- 1 mysql mysql 8760 Jul 13 12:46 nagios_timeperiods.frm
-rw-rw---- 1 mysql mysql 536 Jul 26 02:30 nagios_timeperiods.MYD
-rw-rw---- 1 mysql mysql 3072 Jul 26 12:05 nagios_timeperiods.MYI
-rw-rw---- 1 mysql mysql 8794 Jul 13 12:46 nagios_timeperiod_timeranges.frm
-rw-rw---- 1 mysql mysql 1428 Jul 26 02:01 nagios_timeperiod_timeranges.MYD
-rw-rw---- 1 mysql mysql 5120 Jul 26 12:05 nagios_timeperiod_timeranges.MYI
Re: Nagios Event Log Empty
Posted: Wed Jul 26, 2017 3:32 pm
by dwhitfield
What's the output of the following?
Code: Select all
ll /usr/local/nagiosxi/var/eventman.log
cat /etc/cron.d/nagiosxi
Re: Nagios Event Log Empty
Posted: Thu Jul 27, 2017 10:24 am
by ahoward12
Code: Select all
[root@NAGIOS ~]# ll /usr/local/nagiosxi/var/eventman.log
-rw-r--r-- 1 nagios nagios 3870408 Jul 27 11:24 /usr/local/nagiosxi/var/eventman.log
[root@NAGIOS ~]# cat /etc/cron.d/nagiosxi
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi
# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 7 * * * root /root/scripts/autopostgresqlbackup > /dev/null 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php >> /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * nagios /usr/local/nagiosxi/cron/recurringdowntime.pl >> /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1[root@NAGIOS ~]#
[root@NAGIOS ~]#
Re: Nagios Event Log Empty
Posted: Thu Jul 27, 2017 2:29 pm
by tgriep
Can you run the following as root on the Nagios server and post the output?
Code: Select all
echo 'desc nagios_logentries;' |mysql -u root -pnagiosxi nagios -t
I am thinking you have a check that is returning a lot of data and overflowing the MYSQL table.
Do you know if you have a check defined like that?
All of the info you have posted is after the failure happened, we would need to see the log entry when the error first happens and some entries before that.
Can you check through all of the messages files in the /var/log folder to find the first error for the nagios_logentries table and post it here?
Re: Nagios Event Log Empty
Posted: Fri Jul 28, 2017 7:38 am
by ahoward12
Code: Select all
[root@NAGIOS ~]# echo 'desc nagios_logentries;' |mysql -u root -pnagiosxi nagios -t
ERROR 144 (HY000) at line 1: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
I looked through logs for a good while, unfortunately I don't really know what I am looking for. I don't have any checks like you're describing. Most of checks are very basic, there are hundreds of them, but they are basic.
I can replicate this issue.. If you have certain log files you would like me to watch, I can fix the database using the script, then watch it closely and wait for it to break again?
Re: Nagios Event Log Empty
Posted: Fri Jul 28, 2017 8:57 am
by tgriep
Go ahead and repair the database and then run this command again and post the output.
Code: Select all
echo 'desc nagios_logentries;' |mysql -u root -pnagiosxi nagios -t
What you have to look for is when you start to see this error message.
Code: Select all
./nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
or this error message
Code: Select all
NAGIOS ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1'
in the /var/log/messages file.
Hopefully some lines before those errors, you will see something that could be causing the issue and you can post it here so we can view it.
Re: Nagios Event Log Empty
Posted: Fri Jul 28, 2017 9:43 am
by ahoward12
Code: Select all
[root@NAGIOS scripts]# echo 'desc nagios_logentries;' |mysql -u root -pnagiosxi nagios -t
+-------------------------+--------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------+--------------+------+-----+---------------------+----------------+
| logentry_id | int(11) | NO | PRI | NULL | auto_increment |
| instance_id | int(11) | NO | MUL | 0 | |
| logentry_time | datetime | NO | MUL | 0000-00-00 00:00:00 | |
| entry_time | datetime | NO | | 0000-00-00 00:00:00 | |
| entry_time_usec | int(11) | NO | | 0 | |
| logentry_type | int(11) | NO | | 0 | |
| logentry_data | varchar(255) | NO | MUL | | |
| realtime_data | smallint(6) | NO | | 0 | |
| inferred_data_extracted | smallint(6) | NO | | 0 | |
+-------------------------+--------------+------+-----+---------------------+----------------+
[root@NAGIOS scripts]#
I will keep a close eye on it and keep you updated. Thanks for the help
Re: Nagios Event Log Empty
Posted: Fri Jul 28, 2017 9:57 am
by tgriep
Thanks for the output.
The logentry_data field is fairly small ant I thing when a plugin runs and returns more data then the size of that field, it corrupts the table.
Lets increase the size of that field by running the following command as root on the XI server.
Code: Select all
echo "use nagios;alter table nagios_logentries modify logentry_data varchar(65535) not null;" | mysql -pnagiosxi
Hopefully this will solve the recurring corrupted table issue.
Re: Nagios Event Log Empty
Posted: Fri Jul 28, 2017 1:28 pm
by ahoward12
Here is the output of that
Code: Select all
[root@NAGIOS log]# echo "use nagios;alter table nagios_logentries modify logentry_data varchar(65535) not null;" | mysql -pnagiosxi
ERROR 1170 (42000) at line 1: BLOB/TEXT column 'logentry_data' used in key specification without a key length