Hi all,
I am trying to rename a parent host who has a lot of children and trying to find a better way than going to each child and changing the parent name.
I thought about using find/replace using sed -i 's/OldName/NewName/g' but not sure if that's ideal in this situation.
Any suggestions?
Thanks!
Renaming a parent host
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Renaming a parent host
Hello, @msoo. Nagios Core doesn't have a Bulk Modifications Tool like XI, so using a sed command sounds reasonable.
I'd just suggest to backup the /etc/ folder so you could revert back if something goes wrong.
Otherwise, many text developers support string replacement, so you could use that as an option.
Code: Select all
sed -i 's/OldName/NewName/g' config.cfg config2.cfg
Otherwise, many text developers support string replacement, so you could use that as an option.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.