Hi Guys
I am currently running 2 Prod and 2 test XI servers on 2 unlimited licences.
Each prod server has it's test counterpart. What I want to do is keep the test servers as close to production as possible in terms of config.
P01 has T01
P02 has T02
What I want to do is keep the test servers as close to production as possible in terms of current config. What I'd like to do if possible is once a week take the most recent config snapshot from the prod server, SFP them over to the Test box and restore, this will save me adjusting the test servers every time I make a change to prod. Eventually I'd script it with a cron job and do it automatically weekly, if i can get it working.
I should mention that when I built this new environment, I built both servers on Test, got them fully operational, and then cloned then to create the new prod servers, so under the hood they are identical, CentOS 7 Nagios XI 5.1.8... The only difference being that SMTP is disabled on Test so I don't get double the alert emails being sent out.
For example, do I just SFP 1616415395.tar.gz from Prod to Test and restore, or are other files such as the DB snapshots also required?
Config Snapshot info
Re: Config Snapshot info
Hi danniiffxi,
Since you are taking a backup of prod and restore that onto your test VM, that should be enough.
You should have all the configs and databases just like your prod servers.
Great jobs!!
Regards,
Vinh
Since you are taking a backup of prod and restore that onto your test VM, that should be enough.
You should have all the configs and databases just like your prod servers.
Great jobs!!
Regards,
Vinh
-
danniiffxi
- Posts: 121
- Joined: Tue Jan 30, 2018 3:29 am
- Location: UK
Re: Config Snapshot info
Hi vtrac
Thanks for getting bac to me
For some reason when I do a full backup from 'Admin/Local Backup Archives' and I SCP that over, whenever I restore it breaks NDO, so no checks are being scheduled. The full restore is breaking something on the test server. So my thought was to just transfer the most recent snapshot config rather than the last full backup, so I can just restore the host and services without changing anything else.
After transferring the .tar.gz .diff .diffnum & .txt of the file underlined below, I restart the Nagios service, and go to apply the config, but as you ca see i get the following red message at the top of the page, so I guess I am still missing an element?

Thanks for getting bac to me
For some reason when I do a full backup from 'Admin/Local Backup Archives' and I SCP that over, whenever I restore it breaks NDO, so no checks are being scheduled. The full restore is breaking something on the test server. So my thought was to just transfer the most recent snapshot config rather than the last full backup, so I can just restore the host and services without changing anything else.
After transferring the .tar.gz .diff .diffnum & .txt of the file underlined below, I restart the Nagios service, and go to apply the config, but as you ca see i get the following red message at the top of the page, so I guess I am still missing an element?

Re: Config Snapshot info
Hi,
Here's an example of all files included in the backup ".tar.gz" file under "/store/backups/nagiosxi/" folder:
OK, let first try to see if you can do "Apply Configuration" on your "prod". It might failed there.
If not, then do "Apply Configuration" on your test XI and post the error here ... (Screenshot if possible).
Also, what is the output of this command on the failed "Apply Configuration" machine:
Regards,
Vinh
Here's an example of all files included in the backup ".tar.gz" file under "/store/backups/nagiosxi/" folder:
Code: Select all
1616603505/
1616603505/nagios.tar.gz
1616603505/nagiosxi.tar.gz
1616603505/mrtg.tar.gz
1616603505/mrtg.cfg
1616603505/conf.d/
1616603505/etc-snmp.tar.gz
1616603505/usr-share-snmp.tar.gz
1616603505/nrdp.tar.gz
1616603505/nagvis.tar.gz
1616603505/home-nagios.tar.gz
1616603505/mysql/
1616603505/mysql/nagios.sql
1616603505/mysql/nagiosql.sql
1616603505/mysql/nagiosxi.sql
1616603505/cron/
1616603505/cron/apache
1616603505/logrotate/
1616603505/logrotate/nagiosxi
1616603505/httpd/
1616603505/httpd/nagios.conf
1616603505/httpd/nagiosxi.conf
1616603505/httpd/nagvis.conf
1616603505/httpd/nrdp.conf
1616603505/httpd/ssl.conf
If not, then do "Apply Configuration" on your test XI and post the error here ... (Screenshot if possible).
Also, what is the output of this command on the failed "Apply Configuration" machine:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Regards,
Vinh
-
danniiffxi
- Posts: 121
- Joined: Tue Jan 30, 2018 3:29 am
- Location: UK
Re: Config Snapshot info
Hi Vinh
The configs are not failing. The restore runs perfectly, but something is breaking NDO, I had issues with NDO when I made the move to 5.7 as you will see in this ticket.
https://support.nagios.com/tickets/tickets.php?id=10453
I ended up having to downgrade to NDO2DB from NDO3 as it just broke everything. I never did get to the bottom of it but i have a feeling it was the combination to migrating the the CentOS 6 server from the PostgresSQL to MySQL DB and then migrating the system from CentOS 6 to 7 and upgrading the 5.7 all within a few days. Something during that process killed NDO3 but we found that NDO2DB worked fine, hence the downgrade.
I think I'lll leave it as this task is not important and I don't fancy revisiting that mess right now
You can lock this one, thank you.
The configs are not failing. The restore runs perfectly, but something is breaking NDO, I had issues with NDO when I made the move to 5.7 as you will see in this ticket.
https://support.nagios.com/tickets/tickets.php?id=10453
I ended up having to downgrade to NDO2DB from NDO3 as it just broke everything. I never did get to the bottom of it but i have a feeling it was the combination to migrating the the CentOS 6 server from the PostgresSQL to MySQL DB and then migrating the system from CentOS 6 to 7 and upgrading the 5.7 all within a few days. Something during that process killed NDO3 but we found that NDO2DB worked fine, hence the downgrade.
I think I'lll leave it as this task is not important and I don't fancy revisiting that mess right now
You can lock this one, thank you.
Re: Config Snapshot info
OK ... locking ticket!!