The issue here is that the reconfigure_nagios script calls the import_nagiosql script using a relative path. Try running the script from the 'scripts' directory.
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
That works better Jesse, but it seem like my changes are not getting applied. I copied the localhost.cfg service config file to my home folder, made some edits, but the (small) configuration changes aren't applied and the localhost.cfg file in the imports folder is gone.
I'm not sure - I just tested the procedure making some small modifications, and it worked well for me. Could you post both configuration files please? Feel free to sanitize them.
I will attempt to reproduce and resolve this issue on my end.
TwitsBlog Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
From the diff output it looks like you removed entries in localhost.cfg. To do that you need to copy your .cfg files that have that host in them, such as services files and hostgroups.cfg, delete the host, then import it.
WillemDH, if you go to Configure > Core Config Manager > Tools > Import and you try to import it does it give you any errors? I know it's not the way you want to do it but it may shed some light on what is occurring.
The localhost.cfg does indeed only have services in it. Is it required to add the host info too? That could be the reason the changes are not getting applied. I'm on holiday for a week and I don't have access to the complete cfg file atm. I'll update this thread hopefully next week.
WillemDH wrote:The localhost.cfg does indeed only have services in it. Is it required to add the host info too? That could be the reason the changes are not getting applied. I'm on holiday for a week and I don't have access to the complete cfg file atm. I'll update this thread hopefully next week.
Sounds good, let us know when you get back! Enjoy your holiday.