That's not going to work out well.
You need to copy to the /usr/local/nagios/etc/import dir and XI imports into the DB and writes to the etc dir when you apply the config, which runs the reconfig script. You also need to copy, reconfigure, copy, reconfigure, etc.
Host Group and Host Export to New Upgrade
Re: Host Group and Host Export to New Upgrade
Something like the following...
host1=nags-01
cd /usr/local/nagiosxi/scripts
scp nagios@$host1:/usr/local/nagios/etc/commands.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/contacttemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/servicetemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/contacts.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@diegbe2hhsc-v-tienags-01:/usr/local/nagios/etc/contactgroups.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hosttemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hosts/* /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hostgroups.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/services/* /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
host1=nags-01
cd /usr/local/nagiosxi/scripts
scp nagios@$host1:/usr/local/nagios/etc/commands.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/contacttemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/servicetemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/contacts.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@diegbe2hhsc-v-tienags-01:/usr/local/nagios/etc/contactgroups.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hosttemplates.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hosts/* /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/hostgroups.cfg /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
scp nagios@$host1:/usr/local/nagios/etc/services/* /usr/local/nagios/etc/import/
./reconfigure_nagios.sh
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Host Group and Host Export to New Upgrade
@Sarg0n, Please run the following commands in order:
Code: Select all
service nagios stop
mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak
mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
service ndo2db start
service nagios start
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Host Group and Host Export to New Upgrade
This appears to have worked!
I'm showing green all the way down.
...aaaand I forgot to install the VMware wizard, so my services are all showing critical...but I'll install that and see if it fixes it.
But, hosts are migrated over and services. I think I am good for now! I will hit you up if additional help is needed. Thank you so very much!
...aaaand I forgot to install the VMware wizard, so my services are all showing critical...but I'll install that and see if it fixes it.
But, hosts are migrated over and services. I think I am good for now! I will hit you up if additional help is needed. Thank you so very much!
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Host Group and Host Export to New Upgrade
@Sarg0n, Sounds good. Here's the instruction for that just in case:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.