Nagios XI 2014R2.5 Backup failing
Posted: Wed Aug 19, 2015 8:01 am
I have a hunch it may be due to a Sudo change... (When we upgraded a box to 2.7 the Nagios User didn't have permissions) This box however is still running 2.5 and I'm wondering if that change may have negatively affected the 2.5 box. I'll paste below the change below the error... then again we have another box running 2.5 and working fine :/
Error:
Sudo File change, per my Unix admin the way they do Sudo is from a master file. The entry on the Nagios Box doesn't really do anything:
Error:
Code: Select all
/usr/local/nagiosxi/scripts/backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/share/perfdata/esu1l384: file changed as we read it
tar: /usr/local/nagios/share/perfdata/esu2v775: file changed as we read it
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
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
[u][b]Original:[/b][/u]
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/nmap *
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
[u][b]These were converted down to:[/b][/u]
Defaults:nagios !requiretty
Host_Alias NAGIOS = ***list of hosts servers deleted****
Cmnd_Alias NAGIOS=/usr/local/nagios/libexec/check_init_service, /etc/init.d/nagios *, /etc/init.d/ndo2db *, /etc/init.d/npcd *, /usr/bin/nmap *, /usr/local/nagiosxi/scripts/*
Cmnd_Alias NAGIOSWEB = /usr/bin/tail -100 /var/log/messages, /usr/bin/tail -100 /var/log/httpd/error_log, /usr/bin/tail -100 /var/log/mysqld.log, /usr/bin/nmap *, /etc/init.d/snmptt restart, /usr/local/nagiosxi/scripts/*
nagios NAGIOS = (root) NOPASSWD:NAGIOS
apache NAGIOSWEB = (root) NOPASSWD:NAGIOSWEB