Table './nagios/nagios_contactnotifications' is marked as cr

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
saptech
Posts: 53
Joined: Thu Dec 10, 2015 11:19 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by saptech »

followed your suggestions. Here output:

Code: Select all

mysql.columns_priv                                 OK
mysql.db
warning  : Number of rows changed from 0 to 4
status   : OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category
warning  : Number of rows changed from 0 to 40
status   : OK
mysql.help_keyword
warning  : Number of rows changed from 0 to 453
status   : OK
mysql.help_relation
warning  : Number of rows changed from 0 to 1009
status   : OK
mysql.help_topic
warning  : Number of rows changed from 0 to 510
status   : OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user
warning  : Number of rows changed from 0 to 7
status   : OK
nagios.nagios_acknowledgements
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_commands
warning  : Number of rows changed from 0 to 119
status   : OK
nagios.nagios_commenthistory
warning  : Number of rows changed from 0 to 12
status   : OK
nagios.nagios_comments
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_configfiles
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_configfilevariables
warning  : Number of rows changed from 0 to 131
status   : OK
nagios.nagios_conninfo
warning  : Number of rows changed from 0 to 291
status   : OK
nagios.nagios_contact_addresses                    OK
nagios.nagios_contact_notificationcommands
warning  : Number of rows changed from 0 to 96
status   : OK
nagios.nagios_contactgroup_members
warning  : Number of rows changed from 0 to 13
status   : OK
nagios.nagios_contactgroups
warning  : Number of rows changed from 0 to 3
status   : OK
nagios.nagios_contactnotificationmethods
warning  : Number of rows changed from 0 to 2424
status   : OK
nagios.nagios_contactnotifications
warning  : Number of rows changed from 0 to 505
status   : OK
nagios.nagios_contacts
warning  : Number of rows changed from 0 to 8
status   : OK
nagios.nagios_contactstatus
warning  : Number of rows changed from 0 to 8
status   : OK
nagios.nagios_customvariables
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_customvariablestatus
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_dbversion
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_downtimehistory                      OK
nagios.nagios_eventhandlers                        OK
nagios.nagios_externalcommands
info     : Delete link points outside datafile at 1216500
info     : Delete link points outside datafile at 2062568
info     : Delete link points outside datafile at 2063516
info     : Delete link points outside datafile at 2861092
info     : Delete link points outside datafile at 2863392
info     : Delete link points outside datafile at 3749108
info     : Delete link points outside datafile at 3751288
warning  : Number of rows changed from 0 to 32253
status   : OK
nagios.nagios_flappinghistory
warning  : Number of rows changed from 0 to 32
status   : OK
nagios.nagios_host_contactgroups
warning  : Number of rows changed from 0 to 22
status   : OK
nagios.nagios_host_contacts
warning  : Number of rows changed from 0 to 2
status   : OK
nagios.nagios_host_parenthosts                     OK
nagios.nagios_hostchecks                           OK
nagios.nagios_hostdependencies                     OK
nagios.nagios_hostescalation_contactgroups         OK
nagios.nagios_hostescalation_contacts              OK
nagios.nagios_hostescalations                      OK
nagios.nagios_hostgroup_members
warning  : Number of rows changed from 0 to 17
status   : OK
nagios.nagios_hostgroups
warning  : Number of rows changed from 0 to 3
status   : OK
nagios.nagios_hosts
warning  : Number of rows changed from 0 to 22
status   : OK
nagios.nagios_hoststatus
info     : Delete link points outside datafile at 6348
warning  : Number of rows changed from 0 to 22
status   : OK
nagios.nagios_instances
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_logentries
info     : Delete link points outside datafile at 188216
info     : Delete link points outside datafile at 2100420
info     : Delete link points outside datafile at 5376556
info     : Delete link points outside datafile at 14670120
warning  : Number of rows changed from 0 to 145886
status   : OK
nagios.nagios_notifications
warning  : Number of rows changed from 0 to 1528
status   : OK
nagios.nagios_objects
warning  : Number of rows changed from 0 to 572
status   : OK
nagios.nagios_processevents
warning  : Number of rows changed from 0 to 506
status   : OK
nagios.nagios_programstatus
warning  : Number of rows changed from 0 to 1
status   : OK
nagios.nagios_runtimevariables
warning  : Number of rows changed from 0 to 18
status   : OK
nagios.nagios_scheduleddowntime                    OK
nagios.nagios_service_contactgroups
warning  : Number of rows changed from 0 to 337
status   : OK
nagios.nagios_service_contacts                     OK
nagios.nagios_service_parentservices               OK
nagios.nagios_servicechecks                        OK
nagios.nagios_servicedependencies                  OK
nagios.nagios_serviceescalation_contactgroups      OK
nagios.nagios_serviceescalation_contacts           OK
nagios.nagios_serviceescalations                   OK
nagios.nagios_servicegroup_members                 OK
nagios.nagios_servicegroups                        OK
nagios.nagios_services
warning  : Number of rows changed from 0 to 337
status   : OK
nagios.nagios_servicestatus
info     : Delete link points outside datafile at 108376
info     : Found block that points outside data file at 108424
info     : Found block that points outside data file at 108532
warning  : Number of rows changed from 0 to 337
status   : OK
nagios.nagios_statehistory
warning  : Number of rows changed from 0 to 51737
status   : OK
nagios.nagios_systemcommands
info     : Delete link points outside datafile at 0
info     : Found block with too small length at 592; Skipped
info     : Found block with too small length at 1860; Skipped
info     : Found block with too small length at 2452; Skipped
info     : Found block with too small length at 3112; Skipped
info     : Found block with too small length at 4472; Skipped
info     : Found block with too small length at 5456; Skipped
info     : Found block with too small length at 7184; Skipped
info     : Found block with too small length at 8624; Skipped
info     : Found block with too small length at 9120; Skipped
info     : Found block with too small length at 10840; Skipped
info     : Delete link points outside datafile at 14900
info     : Found block with too small length at 14920; Skipped
info     : Found block with too small length at 16560; Skipped
info     : Found block with too small length at 16760; Skipped
info     : Delete link points outside datafile at 17092
info     : Delete link points outside datafile at 22752
info     : Delete link points outside datafile at 25748
info     : Delete link points outside datafile at 26148
warning  : Number of rows changed from 0 to 68
status   : OK
nagios.nagios_timedeventqueue                      OK
nagios.nagios_timedevents                          OK
nagios.nagios_timeperiod_timeranges
warning  : Number of rows changed from 0 to 31
status   : OK
nagios.nagios_timeperiods
warning  : Number of rows changed from 0 to 8
status   : OK
nagiosql.tbl_command
warning  : Number of rows changed from 0 to 125
status   : OK
nagiosql.tbl_contact
warning  : Number of rows changed from 0 to 7
status   : OK
nagiosql.tbl_contactgroup
warning  : Number of rows changed from 0 to 3
status   : OK
nagiosql.tbl_contacttemplate
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_domain
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_host
warning  : Number of rows changed from 0 to 22
status   : OK
nagiosql.tbl_hostdependency                        OK
nagiosql.tbl_hostescalation                        OK
nagiosql.tbl_hostextinfo                           OK
nagiosql.tbl_hostgroup
warning  : Number of rows changed from 0 to 4
status   : OK
nagiosql.tbl_hosttemplate
warning  : Number of rows changed from 0 to 49
status   : OK
nagiosql.tbl_info
warning  : Number of rows changed from 0 to 218
status   : OK
nagiosql.tbl_lnkContactToCommandHost
warning  : Number of rows changed from 0 to 7
status   : OK
nagiosql.tbl_lnkContactToCommandService
warning  : Number of rows changed from 0 to 7
status   : OK
nagiosql.tbl_lnkContactToContactgroup
warning  : Number of rows changed from 0 to 5
status   : OK
nagiosql.tbl_lnkContactToContacttemplate
warning  : Number of rows changed from 0 to 6
status   : OK
nagiosql.tbl_lnkContactToVariabledefinition        OK
nagiosql.tbl_lnkContactgroupToContact
warning  : Number of rows changed from 0 to 11
status   : OK
nagiosql.tbl_lnkContactgroupToContactgroup         OK
nagiosql.tbl_lnkContacttemplateToCommandHost
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_lnkContacttemplateToCommandService
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_lnkContacttemplateToContactgroup
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkContacttemplateToContacttemplate   OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_lnkHostToContactgroup
warning  : Number of rows changed from 0 to 21
status   : OK
nagiosql.tbl_lnkHostToHost                         OK
nagiosql.tbl_lnkHostToHostgroup
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkHostToHosttemplate
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_lnkHostToVariabledefinition
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkHostdependencyToHost_DH            OK
nagiosql.tbl_lnkHostdependencyToHost_H             OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH       OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H        OK
nagiosql.tbl_lnkHostescalationToContact            OK
nagiosql.tbl_lnkHostescalationToContactgroup       OK
nagiosql.tbl_lnkHostescalationToHost               OK
nagiosql.tbl_lnkHostescalationToHostgroup          OK
nagiosql.tbl_lnkHostgroupToHost
warning  : Number of rows changed from 0 to 16
status   : OK
nagiosql.tbl_lnkHostgroupToHostgroup               OK
nagiosql.tbl_lnkHosttemplateToContact              OK
nagiosql.tbl_lnkHosttemplateToContactgroup
warning  : Number of rows changed from 0 to 4
status   : OK
nagiosql.tbl_lnkHosttemplateToHost                 OK
nagiosql.tbl_lnkHosttemplateToHostgroup
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkHosttemplateToHosttemplate
warning  : Number of rows changed from 0 to 47
status   : OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition   OK
nagiosql.tbl_lnkServiceToContact                   OK
nagiosql.tbl_lnkServiceToContactgroup
warning  : Number of rows changed from 0 to 93
status   : OK
nagiosql.tbl_lnkServiceToHost
warning  : Number of rows changed from 0 to 339
status   : OK
nagiosql.tbl_lnkServiceToHostgroup
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkServiceToServicegroup              OK
nagiosql.tbl_lnkServiceToServicetemplate
warning  : Number of rows changed from 0 to 8
status   : OK
nagiosql.tbl_lnkServiceToVariabledefinition        OK
nagiosql.tbl_lnkServicedependencyToHost_DH         OK
nagiosql.tbl_lnkServicedependencyToHost_H          OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH    OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H     OK
nagiosql.tbl_lnkServicedependencyToService_DS      OK
nagiosql.tbl_lnkServicedependencyToService_S       OK
nagiosql.tbl_lnkServiceescalationToContact         OK
nagiosql.tbl_lnkServiceescalationToContactgroup    OK
nagiosql.tbl_lnkServiceescalationToHost            OK
nagiosql.tbl_lnkServiceescalationToHostgroup       OK
nagiosql.tbl_lnkServiceescalationToService         OK
nagiosql.tbl_lnkServicegroupToService              OK
nagiosql.tbl_lnkServicegroupToServicegroup         OK
nagiosql.tbl_lnkServicetemplateToContact           OK
nagiosql.tbl_lnkServicetemplateToContactgroup
warning  : Number of rows changed from 0 to 1
status   : OK
nagiosql.tbl_lnkServicetemplateToHost              OK
nagiosql.tbl_lnkServicetemplateToHostgroup         OK
nagiosql.tbl_lnkServicetemplateToServicegroup      OK
nagiosql.tbl_lnkServicetemplateToServicetemplate
warning  : Number of rows changed from 0 to 74
status   : OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod             OK
nagiosql.tbl_logbook                               OK
nagiosql.tbl_mainmenu
warning  : Number of rows changed from 0 to 7
status   : OK
nagiosql.tbl_service
warning  : Number of rows changed from 0 to 102
status   : OK
nagiosql.tbl_servicedependency                     OK
nagiosql.tbl_serviceescalation                     OK
nagiosql.tbl_serviceextinfo                        OK
nagiosql.tbl_servicegroup                          OK
nagiosql.tbl_servicetemplate
warning  : Number of rows changed from 0 to 76
status   : OK
nagiosql.tbl_settings
warning  : Number of rows changed from 0 to 12
status   : OK
nagiosql.tbl_submenu
warning  : Number of rows changed from 0 to 29
status   : OK
nagiosql.tbl_timedefinition
warning  : Number of rows changed from 0 to 37
status   : OK
nagiosql.tbl_timeperiod
warning  : Number of rows changed from 0 to 7
status   : OK
nagiosql.tbl_user
warning  : Number of rows changed from 0 to 2
status   : OK
nagiosql.tbl_variabledefinition
warning  : Number of rows changed from 0 to 1
status   : OK
but after 5 minutes the errors appearing is the same:

SQL: SQL Error [ndoutils] : Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed
Last edited by tgriep on Fri Nov 11, 2016 10:09 am, edited 1 time in total.
Reason: Added Code Wraps around large output.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by tgriep »

What version of Nagios XI are you running?
Can you run the following commands as root and post the output?

Code: Select all

ipcs -q
ps -ef --cols=300
I want to see if the kernel message queue is causing the corrupted SQL tables.
Can you upload this file from your server?

Code: Select all

/etc/sysctl.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
saptech
Posts: 53
Joined: Thu Dec 10, 2015 11:19 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by saptech »

Code: Select all

[root@pol-sys-mgmt ~]# ipcs -q

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0x8a010002 98304      nagios     600        0            0

Code: Select all

[root@pol-sys-mgmt ~]# ps -ef --cols=300
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Oct29 ?        00:00:02 /sbin/init
root         2     0  0 Oct29 ?        00:00:00 [kthreadd]
root         3     2  0 Oct29 ?        00:00:13 [migration/0]
root         4     2  0 Oct29 ?        00:00:39 [ksoftirqd/0]
root         5     2  0 Oct29 ?        00:00:00 [stopper/0]
root         6     2  0 Oct29 ?        00:00:03 [watchdog/0]
root         7     2  0 Oct29 ?        00:00:08 [migration/1]
root         8     2  0 Oct29 ?        00:00:00 [stopper/1]
root         9     2  0 Oct29 ?        00:00:40 [ksoftirqd/1]
root        10     2  0 Oct29 ?        00:00:02 [watchdog/1]
root        11     2  0 Oct29 ?        00:01:52 [events/0]
root        12     2  0 Oct29 ?        00:02:54 [events/1]
root        13     2  0 Oct29 ?        00:00:00 [cgroup]
root        14     2  0 Oct29 ?        00:00:03 [khelper]
root        15     2  0 Oct29 ?        00:00:00 [netns]
root        16     2  0 Oct29 ?        00:00:00 [async/mgr]
root        17     2  0 Oct29 ?        00:00:00 [pm]
root        18     2  0 Oct29 ?        00:00:07 [sync_supers]
root        19     2  0 Oct29 ?        00:00:08 [bdi-default]
root        20     2  0 Oct29 ?        00:00:00 [kintegrityd/0]
root        21     2  0 Oct29 ?        00:00:00 [kintegrityd/1]
root        22     2  0 Oct29 ?        00:04:25 [kblockd/0]
root        23     2  0 Oct29 ?        00:00:32 [kblockd/1]
root        24     2  0 Oct29 ?        00:00:00 [kacpid]
root        25     2  0 Oct29 ?        00:00:00 [kacpi_notify]
root        26     2  0 Oct29 ?        00:00:00 [kacpi_hotplug]
root        27     2  0 Oct29 ?        00:00:00 [ata_aux]
root        28     2  0 Oct29 ?        00:00:00 [ata_sff/0]
root        29     2  0 Oct29 ?        00:00:00 [ata_sff/1]
root        30     2  0 Oct29 ?        00:00:00 [ksuspend_usbd]
root        31     2  0 Oct29 ?        00:00:00 [khubd]
root        32     2  0 Oct29 ?        00:00:00 [kseriod]
root        33     2  0 Oct29 ?        00:00:00 [md/0]
root        34     2  0 Oct29 ?        00:00:00 [md/1]
root        35     2  0 Oct29 ?        00:00:00 [md_misc/0]
root        36     2  0 Oct29 ?        00:00:00 [md_misc/1]
root        37     2  0 Oct29 ?        00:00:00 [linkwatch]
root        39     2  0 Oct29 ?        00:00:01 [khungtaskd]
root        40     2  0 Oct29 ?        00:02:51 [kswapd0]
root        41     2  0 Oct29 ?        00:00:00 [ksmd]
root        42     2  0 Oct29 ?        00:01:42 [khugepaged]
root        43     2  0 Oct29 ?        00:00:00 [aio/0]
root        44     2  0 Oct29 ?        00:00:00 [aio/1]
root        45     2  0 Oct29 ?        00:00:00 [crypto/0]
root        46     2  0 Oct29 ?        00:00:00 [crypto/1]
root        54     2  0 Oct29 ?        00:00:00 [kthrotld/0]
root        55     2  0 Oct29 ?        00:00:00 [kthrotld/1]
root        56     2  0 Oct29 ?        00:00:00 [pciehpd]
root        58     2  0 Oct29 ?        00:00:00 [kpsmoused]
root        59     2  0 Oct29 ?        00:00:00 [usbhid_resumer]
root        60     2  0 Oct29 ?        00:00:00 [deferwq]
root        91     2  0 Oct29 ?        00:00:00 [kdmremove]
root        92     2  0 Oct29 ?        00:00:00 [kstriped]
root       178     2  0 Oct29 ?        00:00:00 [scsi_eh_0]
root       179     2  0 Oct29 ?        00:00:00 [scsi_eh_1]
root       235     2  0 Oct29 ?        00:00:00 [scsi_eh_2]
root       236     2  0 Oct29 ?        00:00:00 [vmw_pvscsi_wq_2]
root       314     2  0 Oct29 ?        00:00:00 [kdmflush]
root       316     2  0 Oct29 ?        00:00:00 [kdmflush]
root       333     2  0 Oct29 ?        00:00:24 [jbd2/dm-1-8]
root       334     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       413     1  0 Oct29 ?        00:00:00 /sbin/udevd -d
root       616     2  0 Oct29 ?        00:00:30 [vmmemctl]
root       711     2  0 Oct29 ?        00:00:00 [kdmflush]
root       715     2  0 Oct29 ?        00:00:00 [kdmflush]
root       720     2  0 Oct29 ?        00:00:00 [kdmflush]
root       724     2  0 Oct29 ?        00:00:00 [kdmflush]
root       725   413  0 Oct29 ?        00:00:00 /sbin/udevd -d
root       729     2  0 Oct29 ?        00:00:00 [kdmflush]
root       730   413  0 Oct29 ?        00:00:00 /sbin/udevd -d
root       740     2  0 Oct29 ?        00:00:00 [kdmflush]
root       744     2  0 Oct29 ?        00:00:00 [kdmflush]
root       750     2  0 Oct29 ?        00:00:00 [kdmflush]
root       824     2  0 Oct29 ?        00:00:00 [jbd2/sda1-8]
root       825     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       826     2  0 Oct29 ?        00:01:05 [jbd2/dm-8-8]
root       827     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       828     2  0 Oct29 ?        00:00:20 [jbd2/dm-5-8]
root       829     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       830     2  0 Oct29 ?        00:00:00 [jbd2/dm-9-8]
root       831     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       832     2  0 Oct29 ?        00:00:32 [jbd2/dm-4-8]
root       833     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       834     2  0 Oct29 ?        00:00:03 [jbd2/dm-7-8]
root       835     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       836     2  0 Oct29 ?        00:01:57 [jbd2/dm-6-8]
root       837     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       838     2  0 Oct29 ?        00:02:21 [jbd2/dm-3-8]
root       839     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       840     2  0 Oct29 ?        00:01:07 [jbd2/dm-2-8]
root       841     2  0 Oct29 ?        00:00:00 [ext4-dio-unwrit]
root       903     2  0 Oct29 ?        00:12:11 [kauditd]
root      1129     2  0 Oct29 ?        00:00:09 [flush-253:1]
root      1130     2  0 Oct29 ?        00:00:33 [flush-253:2]
root      1131     2  0 Oct29 ?        00:02:31 [flush-253:3]
root      1132     2  0 Oct29 ?        00:00:24 [flush-253:4]
root      1133     2  0 Oct29 ?        00:00:10 [flush-253:5]
root      1134     2  0 Oct29 ?        00:03:31 [flush-253:6]
root      1136     2  0 Oct29 ?        00:00:25 [flush-253:8]
root      1288     1  0 Oct29 ?        00:32:20 /usr/sbin/vmtoolsd
postfix   1378  2272  0 07:43 ?        00:00:00 pickup -l -t fifo -u
root      1458     1  0 Oct29 ?        00:51:44 auditd
root      1460  1458  0 Oct29 ?        00:40:14 /sbin/audispd
root      1462  1460  2 Oct29 ?        17:24:05 /opt/CrowdStrike/falcon-sensor
root      1542     1  0 Oct29 ?        00:00:00 /opt/VRTSpbx/bin/pbx_exchange
dbus      1556     1  0 Oct29 ?        00:00:00 dbus-daemon --system
root      1700     1  0 Oct29 ?        00:00:03 /usr/sbin/sshd
root      1713     1  0 Oct29 ?        00:00:40 xinetd -stayalive -pidfile /var/run/xinetd.pid
ntp       1724     1  0 Oct29 ?        00:00:04 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
nagios    1741  1713  0 Oct29 ?        00:00:00 nsca -c /usr/local/nagios/etc/nsca.cfg --inetd
nagios    1742  1713  0 Oct29 ?        00:00:00 nsca -c /usr/local/nagios/etc/nsca.cfg --inetd
clamav    1743     1  0 Oct29 ?        00:06:25 clamd
postgres  2048     1  0 Oct29 ?        00:03:52 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres  2050  2048  0 Oct29 ?        00:00:57 postgres: logger process        
postgres  2052  2048  0 Oct29 ?        00:06:00 postgres: writer process        
postgres  2053  2048  0 Oct29 ?        00:04:45 postgres: wal writer process    
postgres  2054  2048  0 Oct29 ?        00:01:44 postgres: autovacuum launcher process
postgres  2055  2048  0 Oct29 ?        00:00:57 postgres: archiver process   last was 00000001000000090000009B
postgres  2056  2048  0 Oct29 ?        00:04:33 postgres: stats collector process
root      2070     1  0 Oct29 ?        00:00:00 /usr/sbin/dovecot
dovecot   2072  2070  0 Oct29 ?        00:00:00 dovecot/anvil
root      2073  2070  0 Oct29 ?        00:00:00 dovecot/log
root      2079  2070  0 Oct29 ?        00:00:00 dovecot/config
root      2086     1  0 Oct29 ?        00:00:11 /usr/openv/netbackup/bin/vnetd -standalone
root      2090     1  0 Oct29 ?        00:00:12 /usr/openv/netbackup/bin/bpcd -standalone
root      2133     1  0 Oct29 ?        00:01:23 /usr/openv/netbackup/bin/nbdisco
root      2147     1  0 Oct29 ?        00:00:01 /usr/openv/pdde/pdag/bin/mtstrmd
amavis    2191     1  0 Oct29 ?        00:00:28 /usr/sbin/amavisd (master)
root      2272     1  0 Oct29 ?        00:00:32 /usr/libexec/postfix/master
postfix   2279  2272  0 Oct29 ?        00:00:13 qmgr -l -t fifo -u
root      2282     1  0 Oct29 ?        00:33:34 /usr/bin/java -Xmx1024m -Xms256m -Dapex.home=/oracle/apex/tmp -Dapex.images=/oracle/apex/images -Dapex.port=8181 -jar /oracle/apex/apex.war
root      2325     1  0 Oct29 ?        00:01:17 /usr/sbin/httpd
root      2384     1  0 Oct29 ?        00:00:00 rhnsd
root      2395     1  0 Oct29 ?        00:00:00 /usr/bin/rhsmcertd
ajaxterm  2421     1  0 Oct29 ?        00:11:26 python /usr/share/ajaxterm/ajaxterm.py --daemon --port=8022 --uid=ajaxterm
ossecm    2545     1  0 Oct29 ?        00:00:36 /var/ossec/bin/ossec-maild
root      2548     1  0 Oct29 ?        00:00:01 /var/ossec/bin/ossec-execd
ossec     2552     1  0 Oct29 ?        00:10:19 /var/ossec/bin/ossec-analysisd
root      2556     1  0 Oct29 ?        00:03:23 /var/ossec/bin/ossec-logcollector
root      2563     1  0 Oct29 ?        00:05:45 /var/ossec/bin/ossec-syscheckd
ossec     2570     1  0 Oct29 ?        00:00:38 /var/ossec/bin/ossec-monitord
root      2582     1  0 Oct29 tty1     00:00:00 /sbin/mingetty /dev/tty1
root      2584     1  0 Oct29 tty2     00:00:00 /sbin/mingetty /dev/tty2
root      2586     1  0 Oct29 tty3     00:00:00 /sbin/mingetty /dev/tty3
root      2588     1  0 Oct29 tty4     00:00:00 /sbin/mingetty /dev/tty4
root      2590     1  0 Oct29 tty5     00:00:00 /sbin/mingetty /dev/tty5
root      2592     1  0 Oct29 tty6     00:00:00 /sbin/mingetty /dev/tty6
apache    4289  2325  0 07:51 ?        00:00:06 /usr/sbin/httpd
apache    4432  2325  0 01:51 ?        00:01:49 /usr/sbin/httpd
postgres  4434  2048  0 01:51 ?        00:00:01 postgres: nagiosxi nagiosxi [local] idle
postgres  4703  2048  0 07:52 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
apache   15238  2325  0 02:21 ?        00:01:32 /usr/sbin/httpd
postgres 15250  2048  0 02:21 ?        00:00:01 postgres: nagiosxi nagiosxi [local] idle
root     19316 48619  0 08:30 ?        00:00:00 CROND
root     19317 48619  0 08:30 ?        00:00:00 CROND
root     19318 48619  0 08:30 ?        00:00:00 CROND
root     19319 48619  0 08:30 ?        00:00:00 CROND
root     19320 48619  0 08:30 ?        00:00:00 CROND
nagios   19324 19317  0 08:30 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   19325 19319  0 08:30 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   19328 19325  0 08:30 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   19329 19324  0 08:30 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php
nagios   19336 19316  0 08:30 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   19337 19318  0 08:30 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   19340 19320  0 08:30 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   19343 19336  0 08:30 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
nagios   19346 19337  0 08:30 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   19347 19340  0 08:30 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
root     19394     2  0 08:30 ?        00:00:00 [flush-253:7]
postgres 19397  2048  0 08:30 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19398  2048  0 08:30 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19402  2048  0 08:30 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19416  2048  0 08:30 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
postgres 19422  2048  0 08:30 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
postfix  19433  2272  0 08:30 ?        00:00:00 cleanup -z -t unix -u
postfix  19437  2272  0 08:30 ?        00:00:00 lmtp -n amavisfeed -t unix -u -o lmtp_data_done_timeout=1200 -o lmtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20
postfix  19539  2272  0 08:30 ?        00:00:00 smtpd -n 127.0.0.1:10025 -t inet -u -o content_filter= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o
postfix  19540  2272  0 08:30 ?        00:00:00 local -t unix
root     19633  1700  0 08:30 ?        00:00:00 sshd: saptech [priv]
saptech  19647 19633  0 08:30 ?        00:00:00 sshd: saptech@pts/0
saptech  19648 19647  0 08:30 pts/0    00:00:00 -bash
root     19672 19648  0 08:30 pts/0    00:00:00 su -
root     19686 19672  0 08:30 pts/0    00:00:00 -bash
root     19790 19686  1 08:30 pts/0    00:00:00 ps -ef --cols=300
root     24048  2325  0 Nov27 ?        00:00:00 PassengerWatchdog
root     24053 24048  0 Nov27 ?        00:00:17 PassengerHelperAgent
nobody   24074 24048  0 Nov27 ?        00:00:01 PassengerLoggingAgent
apache   26023  2325  0 02:51 ?        00:01:20 /usr/sbin/httpd
postgres 26024  2048  0 02:51 ?        00:00:01 postgres: nagiosxi nagiosxi [local] idle
nagios   30236     1  0 Nov18 ?        00:00:54 /usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
amavis   31075  2191  0 06:05 ?        00:00:02 /usr/sbin/amavisd (ch17-avail)
apache   37049  2325  0 00:21 ?        00:01:59 /usr/sbin/httpd
postgres 37163  2048  0 00:21 ?        00:00:01 postgres: nagiosxi nagiosxi [local] idle
root     44894     1  0 03:43 ?        00:00:11 /sbin/rsyslogd -i /var/run/syslogd.pid
apache   47879  2325  0 03:51 ?        00:01:15 /usr/sbin/httpd
postgres 48043  2048  0 03:51 ?        00:00:00 postgres: nagiosxi nagiosxi [local] idle
root     48360     1  0 Nov11 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql    48567 48360  0 Nov11 ?        01:13:10 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root     48619     1  0 Nov11 ?        00:00:41 crond
nagios   48884     1  0 Nov11 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
apache   52264  2325  0 Nov28 ?        00:04:17 /usr/sbin/httpd
postgres 52267  2048  0 Nov28 ?        00:00:03 postgres: nagiosxi nagiosxi [local] idle
amavis   52771  2191  0 07:05 ?        00:00:01 /usr/sbin/amavisd (ch9-avail)
apache   52785  2325  0 Nov28 ?        00:04:16 /usr/sbin/httpd
postgres 52870  2048  0 Nov28 ?        00:00:03 postgres: nagiosxi nagiosxi [local] idle
apache   54123  2325  0 01:08 ?        00:01:54 /usr/sbin/httpd
postgres 54358  2048  0 01:09 ?        00:00:01 postgres: nagiosxi nagiosxi [local] idle
nagios   57186     1  0 Nov11 ?        00:21:42 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   57188 57186  0 Nov11 ?        00:01:16 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   57189 57186  0 Nov11 ?        00:01:18 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   57190 57186  0 Nov11 ?        00:01:19 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   57191 57186  0 Nov11 ?        00:01:17 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios   57194 48884  0 Nov11 ?        00:01:28 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   57199 57194  0 Nov11 ?        00:06:27 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   57252 57186  0 Nov11 ?        00:01:19 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
apache   58038  2325  0 Nov28 ?        00:04:02 /usr/sbin/httpd
postgres 58075  2048  0 Nov28 ?        00:00:03 postgres: nagiosxi nagiosxi [local] idle

Code: Select all

[root@pol-sys-mgmt ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 131072000

# Controls the maximum size of a message, in bytes
kernel.msgmax = 131072000

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456
fs.suid_dumpable=0
kernel.exec-shield=1
kernel.randomize_va_space=2
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.route.flush=1
net.ipv4.conf.all.log_martians=1
net.ipv4.conf.default.log_martians=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.default.accept_ra=0
Last edited by tgriep on Tue Nov 29, 2016 12:34 pm, edited 1 time in total.
Reason: Added Code Wraps around large output.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by tgriep »

Thanks for the info. Everything looks like it should so try running the repair again and see if that clears up the error.
I do see a lot of extra applications running on the server, make sure one of them isn't causing the issue that you are having.
Be sure to check out our Knowledgebase for helpful articles and solutions!
saptech
Posts: 53
Joined: Thu Dec 10, 2015 11:19 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by saptech »

re-run the mysqlcheck -f -r -u root --password=XXXXXXX --all-databases --use_frm at 11:06

Output:

mysql.columns_priv OK
mysql.db
warning : Number of rows changed from 0 to 4
status : OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category
warning : Number of rows changed from 0 to 40
status : OK
mysql.help_keyword
warning : Number of rows changed from 0 to 453
status : OK
mysql.help_relation
warning : Number of rows changed from 0 to 1009
status : OK
mysql.help_topic
warning : Number of rows changed from 0 to 510
status : OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user
warning : Number of rows changed from 0 to 7
status : OK
nagios.nagios_acknowledgements
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_commands
warning : Number of rows changed from 0 to 119
status : OK
nagios.nagios_commenthistory
warning : Number of rows changed from 0 to 12
status : OK
nagios.nagios_comments
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_configfiles
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_configfilevariables
warning : Number of rows changed from 0 to 131
status : OK
nagios.nagios_conninfo
warning : Number of rows changed from 0 to 294
status : OK
nagios.nagios_contact_addresses OK
nagios.nagios_contact_notificationcommands
warning : Number of rows changed from 0 to 84
status : OK
nagios.nagios_contactgroup_members
warning : Number of rows changed from 0 to 17
status : OK
nagios.nagios_contactgroups
warning : Number of rows changed from 0 to 3
status : OK
nagios.nagios_contactnotificationmethods
warning : Number of rows changed from 0 to 2452
status : OK
nagios.nagios_contactnotifications
warning : Number of rows changed from 0 to 505
status : OK
nagios.nagios_contacts
warning : Number of rows changed from 0 to 7
status : OK
nagios.nagios_contactstatus
warning : Number of rows changed from 0 to 7
status : OK
nagios.nagios_customvariables
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_customvariablestatus
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_dbversion
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_downtimehistory OK
nagios.nagios_eventhandlers OK
nagios.nagios_externalcommands
info : Delete link points outside datafile at 428104
info : Delete link points outside datafile at 753504
info : Delete link points outside datafile at 958516
info : Delete link points outside datafile at 2153724
info : Delete link points outside datafile at 2154836
info : Delete link points outside datafile at 2156316
info : Delete link points outside datafile at 2157444
info : Delete link points outside datafile at 2841120
info : Delete link points outside datafile at 3736208
warning : Number of rows changed from 0 to 32257
status : OK
nagios.nagios_flappinghistory
warning : Number of rows changed from 0 to 32
status : OK
nagios.nagios_host_contactgroups
warning : Number of rows changed from 0 to 22
status : OK
nagios.nagios_host_contacts
warning : Number of rows changed from 0 to 2
status : OK
nagios.nagios_host_parenthosts OK
nagios.nagios_hostchecks OK
nagios.nagios_hostdependencies OK
nagios.nagios_hostescalation_contactgroups OK
nagios.nagios_hostescalation_contacts OK
nagios.nagios_hostescalations OK
nagios.nagios_hostgroup_members
warning : Number of rows changed from 0 to 17
status : OK
nagios.nagios_hostgroups
warning : Number of rows changed from 0 to 3
status : OK
nagios.nagios_hosts
warning : Number of rows changed from 0 to 22
status : OK
nagios.nagios_hoststatus
info : Delete link points outside datafile at 6356
warning : Number of rows changed from 0 to 22
status : OK
nagios.nagios_instances
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_logentries
info : Delete link points outside datafile at 10605664
warning : Number of rows changed from 0 to 144405
status : OK
nagios.nagios_notifications
warning : Number of rows changed from 0 to 1529
status : OK
nagios.nagios_objects
warning : Number of rows changed from 0 to 572
status : OK
nagios.nagios_processevents
warning : Number of rows changed from 0 to 519
status : OK
nagios.nagios_programstatus
warning : Number of rows changed from 0 to 1
status : OK
nagios.nagios_runtimevariables
warning : Number of rows changed from 0 to 18
status : OK
nagios.nagios_scheduleddowntime OK
nagios.nagios_service_contactgroups
warning : Number of rows changed from 0 to 337
status : OK
nagios.nagios_service_contacts OK
nagios.nagios_service_parentservices OK
nagios.nagios_servicechecks OK
nagios.nagios_servicedependencies OK
nagios.nagios_serviceescalation_contactgroups OK
nagios.nagios_serviceescalation_contacts OK
nagios.nagios_serviceescalations OK
nagios.nagios_servicegroup_members OK
nagios.nagios_servicegroups OK
nagios.nagios_services
warning : Number of rows changed from 0 to 337
status : OK
nagios.nagios_servicestatus
info : Delete link points outside datafile at 108292
info : Found block that points outside data file at 108532
info : Found block that points outside data file at 108576
warning : Number of rows changed from 0 to 337
status : OK
nagios.nagios_statehistory
warning : Number of rows changed from 0 to 53530
status : OK
nagios.nagios_systemcommands
info : Delete link points outside datafile at 0
info : Found link that points at -3276991146697424800 (outside data file) at 20
info : Found block with too small length at 868; Skipped
info : Delete link points outside datafile at 1552
info : Found block with too small length at 2288; Skipped
info : Found block with too small length at 2924; Skipped
info : Found block with too small length at 4800; Skipped
info : Found block with too small length at 5024; Skipped
info : Found block with too small length at 6224; Skipped
info : Found block with too small length at 6708; Skipped
info : Found block with too small length at 6916; Skipped
info : Found block with too small length at 8708; Skipped
info : Delete link points outside datafile at 12256
info : Found block with too small length at 12316; Skipped
warning : Number of rows changed from 0 to 100
status : OK
nagios.nagios_timedeventqueue OK
nagios.nagios_timedevents OK
nagios.nagios_timeperiod_timeranges
warning : Number of rows changed from 0 to 31
status : OK
nagios.nagios_timeperiods
warning : Number of rows changed from 0 to 8
status : OK
nagiosql.tbl_command
warning : Number of rows changed from 0 to 125
status : OK
nagiosql.tbl_contact
warning : Number of rows changed from 0 to 6
status : OK
nagiosql.tbl_contactgroup
warning : Number of rows changed from 0 to 3
status : OK
nagiosql.tbl_contacttemplate
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_domain
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_host
warning : Number of rows changed from 0 to 22
status : OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_hosttemplate
warning : Number of rows changed from 0 to 49
status : OK
nagiosql.tbl_info
warning : Number of rows changed from 0 to 218
status : OK
nagiosql.tbl_lnkContactToCommandHost
warning : Number of rows changed from 0 to 5
status : OK
nagiosql.tbl_lnkContactToCommandService
warning : Number of rows changed from 0 to 5
status : OK
nagiosql.tbl_lnkContactToContactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_lnkContactToContacttemplate
warning : Number of rows changed from 0 to 5
status : OK
nagiosql.tbl_lnkContactToVariabledefinition OK
nagiosql.tbl_lnkContactgroupToContact
warning : Number of rows changed from 0 to 17
status : OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToCommandService
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkContacttemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkHostToContactgroup
warning : Number of rows changed from 0 to 21
status : OK
nagiosql.tbl_lnkHostToHost OK
nagiosql.tbl_lnkHostToHostgroup

It worked fine with no errors for a bit then I refreshed the Notification tab at 11:26 and the errors appeared again:

SQL: SQL Error [ndoutils] : Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed SQL: SQL Error [ndoutils] : Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkHostToHosttemplate
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_lnkHostToVariabledefinition
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost
warning : Number of rows changed from 0 to 16
status : OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup
warning : Number of rows changed from 0 to 4
status : OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkHosttemplateToHosttemplate
warning : Number of rows changed from 0 to 47
status : OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition OK
nagiosql.tbl_lnkServiceToContact OK
nagiosql.tbl_lnkServiceToContactgroup
warning : Number of rows changed from 0 to 93
status : OK
nagiosql.tbl_lnkServiceToHost
warning : Number of rows changed from 0 to 339
status : OK
nagiosql.tbl_lnkServiceToHostgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate
warning : Number of rows changed from 0 to 8
status : OK
nagiosql.tbl_lnkServiceToVariabledefinition OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact OK
nagiosql.tbl_lnkServicetemplateToContactgroup
warning : Number of rows changed from 0 to 1
status : OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup OK
nagiosql.tbl_lnkServicetemplateToServicetemplate
warning : Number of rows changed from 0 to 74
status : OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook OK
nagiosql.tbl_mainmenu
warning : Number of rows changed from 0 to 7
status : OK
nagiosql.tbl_service
warning : Number of rows changed from 0 to 102
status : OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup OK
nagiosql.tbl_servicetemplate
warning : Number of rows changed from 0 to 76
status : OK
nagiosql.tbl_settings
warning : Number of rows changed from 0 to 12
status : OK
nagiosql.tbl_submenu
warning : Number of rows changed from 0 to 29
status : OK
nagiosql.tbl_timedefinition
warning : Number of rows changed from 0 to 37
status : OK
nagiosql.tbl_timeperiod
warning : Number of rows changed from 0 to 7
status : OK
nagiosql.tbl_user
warning : Number of rows changed from 0 to 2
status : OK
nagiosql.tbl_variabledefinition
warning : Number of rows changed from 0 to 1
status : OK
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by tgriep »

Lets truncate the data in that table ans see if that works.
Login as root and run the following command to remove any data older that 90 days.

Code: Select all

echo 'DELETE FROM nagios_contactnotifications WHERE entry_time < DATE_SUB(NOW(), INTERVAL 89 DAY);' |mysql -t -u root -pnagiosxi nagios
Then run the repair to remove any old entries.

Code: Select all

mysqlcheck -f -r -u root --password=XXXXXXX --all-databases --use_frm
Another thing to do.
If the mysql database is on the Nagios XI server and not hosted remotely, you should increase the space for the /var and the /tmp partitions on your server.
If they are not big enough, then the repair will not be able to truncate / repair the database if it runs out of space on the drive.
Be sure to check out our Knowledgebase for helpful articles and solutions!
saptech
Posts: 53
Joined: Thu Dec 10, 2015 11:19 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by saptech »

the delete gives error:

# echo 'DELETE FROM nagios_contactnotifications WHERE entry_time < DATE_SUB(NOW(), INTERVAL 89 DAY);' |mysql -t -u root -pXXXXXX nagios
ERROR 144 (HY000) at line 1: Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by tgriep »

Run the mysqlcheck to repair it, then the delete and then the mysqlcheck again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
saptech
Posts: 53
Joined: Thu Dec 10, 2015 11:19 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by saptech »

echo 'DELETE FROM nagios_contactnotifications WHERE entry_time < DATE_SUB(NOW(), INTERVAL 89 DAY);' |mysql -t -u root -pXXXXXX nagios

ERROR 1054 (42S22) at line 1: Unknown column 'entry_time' in 'where clause'
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Table './nagios/nagios_contactnotifications' is marked a

Post by tgriep »

Try this command and see if this one works.

Code: Select all

echo 'DELETE FROM nagios_contactnotifications WHERE start_time < DATE_SUB(NOW(), INTERVAL 89 DAY);' |mysql -t -u root -pXXXXXX nagios
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked