Scheduled Backups not running
Re: Scheduled Backups not running
Do you have the following log on your system - "/usr/local/nagiosxi/var/components/scheduledbackups.log"? If you do, can you post it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here are the last 3 lines from earlier when you had me make those change and schedule a backup right after:
01-28-2015 15:15:01 DEBUG: Running scheduled local backup ...
01-28-2015 15:15:01 INFO: Creating a local backup: nagiosxi.1422476101
01-28-2015 15:15:01 DEBUG: Sending create local backup command to CmdSubsystem
Entire log attached.
01-28-2015 15:15:01 DEBUG: Running scheduled local backup ...
01-28-2015 15:15:01 INFO: Creating a local backup: nagiosxi.1422476101
01-28-2015 15:15:01 DEBUG: Sending create local backup command to CmdSubsystem
Entire log attached.
You do not have the required permissions to view the files attached to this post.
Re: Scheduled Backups not running
Could you run this and post the output?
Code: Select all
find / -name nagiosxi.*Be sure to check out our Knowledgebase for helpful articles and solutions!
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here you go. There is only one hit you will see for a backup but it is dated Jan 16th. It is located in /tmp/nagiosxibackups/. I think this was a manual test by another teammate but not sure. No results from our testing was found.
Code: Select all
[nagios@nagiasp01 tmp]$ cat search.txt
/usr/local/nagiosxi/html/includes/css/nagiosxi.css
/usr/local/nagiosxi/tmp/nagiosxi/vmsetup/profile.d/nagiosxi.sh
/usr/local/nagiosxi/tmp/nagiosxi/vmsetup/profile.d/nagiosxi.csh
/usr/local/nagiosxi/tmp/nagiosxi/nagiosxi/nagiosxi.sudoers
/usr/local/nagiosxi/tmp/nagiosxi/nagiosxi/nagiosxi.init
/usr/local/nagiosxi/tmp/nagiosxi/nagiosxi/basedir/html/includes/css/nagiosxi.css
/usr/local/nagiosxi/tmp/nagiosxi/nagiosxi/nagiosxi.cron.d
/tmp/nagiosxi/nagiosxi/nagiosxi.init
/tmp/nagiosxi/nagiosxi/basedir/html/includes/css/nagiosxi.css
/tmp/nagiosxi/nagiosxi/nagiosxi.sudoers
/tmp/nagiosxi/nagiosxi/nagiosxi.cron.d
/tmp/nagiosxi/vmsetup/profile.d/nagiosxi.csh
/tmp/nagiosxi/vmsetup/profile.d/nagiosxi.sh
/tmp/nagiosbackup/nagiosxi.1421388001
/tmp/nagiosbackup/nagiosxi.1421388001/nagiosxi.tar.gz
/home/nagios/nagiosxi.1420524001.tar.gz
/etc/httpd/conf.d/nagiosxi.conf
Re: Scheduled Backups not running
Run this.
Schedule a backup to happen a few minutes in the future and wait for that time to pass.
Post back the results of the tail.
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.logPost back the results of the tail.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here you go. I am going to look at the scripts directory and see what might be going on. Please let me know what I can do to correct this.
Code: Select all
[nagios@nagiasp01 var]$ tail -f cmdsubsys.log
..................................
PROCESSED 0 COMMANDS
tail: cmdsubsys.log: file truncated
PROCESSED 0 COMMANDS
tail: cmdsubsys.log: file truncated
PROCESSED 0 COMMANDS
tail: cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
tail: cmdsubsys.log: file truncated
............................................................tail: cmdsubsys.log: file truncated
PROCESSED 0 COMMANDS
tail: cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
sxi.1422560401";i:1;s:9:"/backups/";}
CMDLINE=/usr/local/nagiosxi/scripts/backup_xi.sh -n nagiosxi.1422560401 -d /backups
/usr/local/nagiosxi/scripts/backup_xi.sh: line 6: /usr/local/nagiosxi/scripts/config.dat: Permission denied
/usr/local/nagiosxi/scripts/backup_xi.sh: line 7: /usr/local/nagiosxi/scripts/config.dat: No such file or directory
OUTPUT=
RETURNCODE=1
...........................................................tail: cmdsubsys.log: file truncated
PROCESSED 1 COMMANDS
tail: cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here is the code snippit it is complaining about
I have checked all directories involved in nagiosxi and they are all owned by nagios nagios.
I have check the files mentioned above. import_xiconfig.php is owned by nagios nagios but config.dat did not exist, but I dont think it was supposed to as it seems to be removed right after.
Looked into the import_xiconfig.php and saw the reference to /usr/local/nagiosxi/html/config.inc.php and it is also owned by nagios nagios.
So the permission denied is confusing me.
Code: Select all
#!/bin/sh
BASEDIR=$(dirname $0)
# IMPORT ALL XI CFG VARS
php $BASEDIR/import_xiconfig.php > $BASEDIR/config.dat
. $BASEDIR/config.dat
rm -rf $BASEDIR/config.dat
I have check the files mentioned above. import_xiconfig.php is owned by nagios nagios but config.dat did not exist, but I dont think it was supposed to as it seems to be removed right after.
Looked into the import_xiconfig.php and saw the reference to /usr/local/nagiosxi/html/config.inc.php and it is also owned by nagios nagios.
So the permission denied is confusing me.
Re: Scheduled Backups not running
What do you have for groups defined?
run this:
and what is the output of this command:
run this:
Code: Select all
groups nagios
groups apacheCode: Select all
ll /usr/local/nagiosxi/scripts/import_xiconfig.php-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here you go.
Code: Select all
[nagios@nagiasp01 html]$ groups nagios
nagios : users nagios nagcmd
[nagios@nagiasp01 html]$ groups apache
apache : apache nagios nagcmd
[nagios@nagiasp01 html]$ ll /usr/local/nagiosxi/scripts/import_xiconfig.php
-r-xr-x--- 1 nagios nagios 908 Jan 5 14:53 /usr/local/nagiosxi/scripts/import_xiconfig.php
[nagios@nagiasp01 html]$
-
krobertson71
- Posts: 444
- Joined: Tue Feb 11, 2014 10:16 pm
Re: Scheduled Backups not running
Here is nagcmd for good measure.
Code: Select all
[nagios@nagiasp01 html]$ cat /etc/group | grep nagcmd
nagcmd:x:10004:nagios,apache