topic:linux_repare_nagios_db
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
topic:linux_repare_nagios_db [2017/06/12 00:13] – created k | topic:linux_repare_nagios_db [2021/08/12 08:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Ремонит ==== | + | ==== Ремонт |
+ | |||
+ | === Описание проблемы | ||
Сломались таблицы в mysql базе в которую писались данные системы мониторинга Nagios.\\ | Сломались таблицы в mysql базе в которую писались данные системы мониторинга Nagios.\\ | ||
- | Сам nagios работал, | + | Сам nagios работал, |
+ | <hidden Ошибки ndo2db> | ||
+ | <WRAP prewrap 500> | ||
< | < | ||
2017-04-11T13: | 2017-04-11T13: | ||
Line 8: | Line 12: | ||
2017-04-11T13: | 2017-04-11T13: | ||
</ | </ | ||
+ | </ | ||
+ | </ | ||
+ | С помощью awk в логах mysql ищем имена сломашихся таблиц. | ||
+ | < | ||
+ | [root@msk-02-noc log]# grep ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | </ | ||
+ | |||
+ | === Решение === | ||
+ | Останавливаем nagios и с помощью mysqlcheck чиним таблицы. | ||
+ | <hidden Процесс работы mysqlcheck> | ||
+ | < | ||
+ | [root@msk-02-noc nagios]# mysqlcheck -unagios_user -p --repair --extended nagios_db | ||
+ | Enter password: | ||
+ | nagios_db.nagios_acknowledgements | ||
+ | nagios_db.nagios_commands | ||
+ | nagios_db.nagios_commenthistory | ||
+ | nagios_db.nagios_comments | ||
+ | nagios_db.nagios_configfiles | ||
+ | nagios_db.nagios_configfilevariables | ||
+ | nagios_db.nagios_conninfo | ||
+ | nagios_db.nagios_contact_addresses | ||
+ | nagios_db.nagios_contact_notificationcommands | ||
+ | nagios_db.nagios_contactgroup_members | ||
+ | nagios_db.nagios_contactgroups | ||
+ | nagios_db.nagios_contactnotificationmethods | ||
+ | nagios_db.nagios_contactnotifications | ||
+ | nagios_db.nagios_contacts | ||
+ | nagios_db.nagios_contactstatus | ||
+ | nagios_db.nagios_customvariables | ||
+ | nagios_db.nagios_customvariablestatus | ||
+ | nagios_db.nagios_dbversion | ||
+ | nagios_db.nagios_downtimehistory | ||
+ | nagios_db.nagios_eventhandlers | ||
+ | nagios_db.nagios_externalcommands | ||
+ | nagios_db.nagios_flappinghistory | ||
+ | nagios_db.nagios_host_contactgroups | ||
+ | nagios_db.nagios_host_contacts | ||
+ | nagios_db.nagios_host_parenthosts | ||
+ | nagios_db.nagios_hostchecks | ||
+ | nagios_db.nagios_hostdependencies | ||
+ | nagios_db.nagios_hostescalation_contactgroups | ||
+ | nagios_db.nagios_hostescalation_contacts | ||
+ | nagios_db.nagios_hostescalations | ||
+ | nagios_db.nagios_hostgroup_members | ||
+ | nagios_db.nagios_hostgroups | ||
+ | nagios_db.nagios_hosts | ||
+ | nagios_db.nagios_hoststatus | ||
+ | info : Duplicate key 2 for record at 13480 against new record at 0 | ||
+ | warning | ||
+ | status | ||
+ | nagios_db.nagios_instances | ||
+ | nagios_db.nagios_logentries | ||
+ | nagios_db.nagios_notifications | ||
+ | nagios_db.nagios_objects | ||
+ | nagios_db.nagios_processevents | ||
+ | nagios_db.nagios_programstatus | ||
+ | nagios_db.nagios_runtimevariables | ||
+ | nagios_db.nagios_scheduleddowntime | ||
+ | nagios_db.nagios_service_contactgroups | ||
+ | nagios_db.nagios_service_contacts | ||
+ | nagios_db.nagios_servicechecks | ||
+ | warning | ||
+ | status | ||
+ | nagios_db.nagios_servicedependencies | ||
+ | nagios_db.nagios_serviceescalation_contactgroups | ||
+ | nagios_db.nagios_serviceescalation_contacts | ||
+ | nagios_db.nagios_serviceescalations | ||
+ | nagios_db.nagios_servicegroup_members | ||
+ | nagios_db.nagios_servicegroups | ||
+ | nagios_db.nagios_services | ||
+ | nagios_db.nagios_servicestatus | ||
+ | nagios_db.nagios_statehistory | ||
+ | nagios_db.nagios_systemcommands | ||
+ | info : Wrong bytesec: | ||
+ | info : Wrong bytesec: 108-105- 98 at 395057336; Skipped | ||
+ | info : Wrong block with wrong total length starting at 91145760 | ||
+ | info : Found block with too small length at 91146520; Skipped | ||
+ | info : Found block with too small length at 91430372; Skipped | ||
+ | info : Found block with too small length at 91430380; Skipped | ||
+ | info : Wrong bytesec: 117-115-114 at 91648060; Skipped | ||
+ | info : Wrong bytesec: 112-108- 15 at 485197884; Skipped | ||
+ | info : Found block with too small length at 399791272; Skipped | ||
+ | info : Wrong bytesec: 111-115- 47 at 91647448; Skipped | ||
+ | warning | ||
+ | status | ||
+ | nagios_db.nagios_timedeventqueue | ||
+ | warning | ||
+ | status | ||
+ | nagios_db.nagios_timedevents | ||
+ | nagios_db.nagios_timeperiod_timeranges | ||
+ | nagios_db.nagios_timeperiods | ||
+ | </ | ||
+ | </ | ||
+ | {{tag> |
topic/linux_repare_nagios_db.1497215632.txt.gz · Last modified: (external edit)