Page 1 of 1

Problem MySQL when run "backup_xi" - nagios_logentries crash

Posted: Fri Feb 03, 2017 3:06 am
by redesgtt
Hi,

I am trying to run "backup_xi.sh" before upgrade up to 5.4.1 our Nagios XI (now we have 5.4.0).
When I run backup_xi.sh, it shows:

Code: Select all

[root@nagiosxi nagiosxi]# /usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Eliminando la `/' inicial de los nombres
tar: Eliminando la `/' inicial de los nombres
Backing up Nagios Core...
tar: Eliminando la `/' inicial de los nombres
tar: /usr/local/nagios/var/rw/nagios.qh: el `socket' no se tendrá en cuenta
tar: /usr/local/nagios/var/ndo.sock: el `socket' no se tendrá en cuenta
tar: /usr/local/nagios/var: el fichero cambió mientras se estaba leyendo
Backing up Nagios XI...
tar: Eliminando la `/' inicial de los nombres
Backing up MRTG...
tar: Eliminando la `/' inicial de los nombres
Backing up NRDP...
tar: Eliminando la `/' inicial de los nombres
Backing up Nagvis...
tar: Eliminando la `/' inicial de los nombres
Backing up MySQL databases...
mysqldump: Got error: 144: "Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed" when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!

Code: Select all

tail -50 /var/log/mysqld.log
tail: no se puede abrir «/var/log/mysqld.log» para lectura: No existe el fichero o el directorio 
(in english: mysqld.log doesn't exist)

Well, the unique different thing we have changed this week is add mklivestatus, and we have two "broker_module" lines in the nagios.cfg now, such that:

Code: Select all

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/nagiosramdisk/rw/mklive
I just see next post with the same problem:
https://support.nagios.com/forum/viewto ... 6&start=10
it appears wasn't solved by support Nagios or ¿yes?
should I do all shown in that post?

we have Nagios XI Enterprise with Mail support too.

Please, let me know how repair this problem.
Regards.

Re: Problem MySQL when run "backup_xi" - nagios_logentries c

Posted: Fri Feb 03, 2017 10:48 am
by rkennedy
You'll need to repair your mysql database -

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
After that, attempt to backup again, and it should work properly.

As for mk_livestatus - this isn't our product, and Support is limited on the help we can provide with that NEB module running.

Re: Problem MySQL when run "backup_xi" - nagios_logentries c

Posted: Mon Feb 06, 2017 6:54 am
by redesgtt
hi,
thanks, the issue has been resolved with "repair_databases.sh", I can do backup now.

You can close the post.

Re: Problem MySQL when run "backup_xi" - nagios_logentries c

Posted: Mon Feb 06, 2017 11:11 am
by rkennedy
Glad to hear that fixed it! Closing this one out.