Hi,
We are using NagiosXI, but still we prefer to do most of the things from CLI. Most often we are adding or removing some service from a no. of files and again we need to import these modified files into DB using NagiosXI UI. Its very difficult to search and import a large no. of these files using UI. Is there any way i can import these modified files into NagiosXI DB from command line without using NagiosXI User Interface.
Thanks,
Manish Kumar,
Mahindra Satyam, Tools Team
How to import modified host and service files in DB from CLI
How to import modified host and service files in DB from CLI
Thanks,
Sattanathan.S
Sattanathan.S
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to import modified host and service files in DB from
At present I believe the best you can do would be to write the config files and then import them into XI through the web interface at Configure -> Core Config Manager -> Tools -> Import Config Files
Re: How to import modified host and service files in DB from
Hi Scott,
I found it, it can be done....
Copy all the modified files to the folder /usr/local/nagios/etc/import
And then run the script
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
And its's done, no need to waste your time in selecting the changed files from UI and then importing them. Thanks..
I found it, it can be done....
Copy all the modified files to the folder /usr/local/nagios/etc/import
And then run the script
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
And its's done, no need to waste your time in selecting the changed files from UI and then importing them. Thanks..
Thanks,
Sattanathan.S
Sattanathan.S
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to import modified host and service files in DB from
I see, I though you meant one by one verifying the files...
Glad you got it worked out.
Glad you got it worked out.
Re: How to import modified host and service files in DB from
You are correct, this is how our wizard import files as well. There are some limitations to importing this way, so I would suggest sticking to single Host->Service relationships for this method for the best results.