Hi
we are doing a move of our environment to a new site and the IP Address ranges are changing
but in the past some people created the Monitored Hosts and Servers and configured them with IP Addresses
I can successfully use the Import Config Files Tool to change the Hosts from IP Addresses to Hostnames, but the Import Config File Tool does not seem to work for the services config files
Is there a different method or am i just not doing it correctly
The config file in the hosts directory and the config file in the services directory both have the same name
SERVERNAME.cfg so I cannot copy both files to the import directory at the same time
Is there another way of doing this
Thanks
Changing from IP Addresses to Hostnames in Services cfg file
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Changing from IP Addresses to Hostnames in Services cfg
Are you trying to change the hostname or the hostaddress?
Generally you wouldn't need to re-add the services unless you are changing the hostname,.
Changing the hostname can be more easily accomplished through the CCM -> Tools -> Bulk Renaming Tool
Generally you wouldn't need to re-add the services unless you are changing the hostname,.
Changing the hostname can be more easily accomplished through the CCM -> Tools -> Bulk Renaming Tool
Re: Changing from IP Addresses to Hostnames in Services cfg
Hi
I have figured out how to change the hosts entries
Some of the hosts entries are configured as such
Hostname = SERVERNAME
Address = IP ADDRESS
So by using the Import config files tool I can modify the hosts entries changing the Address from IP Address to hostname and them importing the file which updates the CFG file in the Hosts Directory
But some of the services are configured like so
-f ok -I <IPADDRESS> -u '/api/health' -S -p 9444
So I want to change the IP ADDRESS to HOSTNAME
but everytime I try this with the Import Config Files Tool it does not chnage the CFG files in the services folder
Thanks
I have figured out how to change the hosts entries
Some of the hosts entries are configured as such
Hostname = SERVERNAME
Address = IP ADDRESS
So by using the Import config files tool I can modify the hosts entries changing the Address from IP Address to hostname and them importing the file which updates the CFG file in the Hosts Directory
But some of the services are configured like so
-f ok -I <IPADDRESS> -u '/api/health' -S -p 9444
So I want to change the IP ADDRESS to HOSTNAME
but everytime I try this with the Import Config Files Tool it does not chnage the CFG files in the services folder
Thanks
Re: Changing from IP Addresses to Hostnames in Services cfg
When you import the service config file with the hostname in the command, is the Overwrite Database box checked when importing so it will overwrite the existing check?
Are the files and service description using the same name and description as the existing services?
Do you Apply the Configuration after the import so XI will write the changes to the cfg files in the services folder?
Are the files and service description using the same name and description as the existing services?
Do you Apply the Configuration after the import so XI will write the changes to the cfg files in the services folder?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing from IP Addresses to Hostnames in Services cfg
Hi
Yes the Hosts and the Services cfg files have the same name SERVERNAME,CFG
So I have to do the Hosts and then when finished I have to do the services
But When I do the services nothing changes
Yes the Overwrite database box is checked
Yes I do the apply configuration even thou the GUI does not show configuration needing to be applied as it does not see any changes
Thanks
Yes the Hosts and the Services cfg files have the same name SERVERNAME,CFG
So I have to do the Hosts and then when finished I have to do the services
But When I do the services nothing changes
Yes the Overwrite database box is checked
Yes I do the apply configuration even thou the GUI does not show configuration needing to be applied as it does not see any changes
Thanks
Re: Changing from IP Addresses to Hostnames in Services cfg
Can you post one of the original service configs and the same config that has been edited so we can see if it can be recreated?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing from IP Addresses to Hostnames in Services cfg
Hi
I'm not really sure on what files you are looking for as in "original service configs"
can you specify
thanks
I'm not really sure on what files you are looking for as in "original service configs"
can you specify
thanks
Re: Changing from IP Addresses to Hostnames in Services cfg
I am referring to a service configuration file before they were edited to use the Hostname.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing from IP Addresses to Hostnames in Services cfg
Hi
Sorry about this but i ran another test this morning, so I could grab some screenshot to show what was going on
But it actually work this time maybe the previous time it di work I just did not notice
On the system I tested this morning the services that were configured with the IP Addresses
what the import tool did was make a copy of them and configure them with the Hostname
so instead of having 2 services we then had 4
but it did work, thanks for your help and you can close this request
Thanks
Sorry about this but i ran another test this morning, so I could grab some screenshot to show what was going on
But it actually work this time maybe the previous time it di work I just did not notice
On the system I tested this morning the services that were configured with the IP Addresses
what the import tool did was make a copy of them and configure them with the Hostname
so instead of having 2 services we then had 4
but it did work, thanks for your help and you can close this request
Thanks
Re: Changing from IP Addresses to Hostnames in Services cfg
Locking post.
Be sure to check out our Knowledgebase for helpful articles and solutions!