Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page lists the tasks/steps you need to do when you want to change your domain e.g. from the default 'nmsprime.test' domain to your own publicly reachable domain name and your system is already a production environment with a lot of devices monitored by icinga and cacti.

The examples show a domain change from nmsprime.test to nmsprime.your-domain.com.

1)


Preparation

  • Add the domain / subdomain
  • Add the NS Record for NMSPrime name server at your provider
2) Check your NMSPrime


Change Domain globally

Code Block
languagebash
# Check your NMSPrime server's hostname as we want to change the internal FQDN (fully qualified domain name) back
later Code Block
languagebash
 later
hostnamectl


3) Navigate to Global Configuration → Provisioning and change the default domain to your domain e.g. nmsprime.your-domain.com

4) Step 1 changes the FQDN of the server. As icinga refers to the internal server hostname and it is not needed anywhere else, we change it back.


Code Block
languagebash
hostnamectl set-hostname server-name.nmsprime.test
5) Synchronize the nameserver


Adapt name server configuration

Code Block
languagebash
titleSynchronize named
# Sync zone files
rndc sync -clean && systemctl stop named

# Adapt names
mv /var/named/dynamic/nmsprime.test.zone /var/named/dynamic/nmsprime.zone
sed -i 's/nmsprime.test/nmsprime.your-domain.com/g' /var/named/dynamic/in-addr.arpa.zone
sed -i 's/nmsprime.test.zone/nmsprime.zone/' /etc/named-nmsprime.conf
sed -i 's/zone "nmsprime.test"/zone "nmsprime.your-domain.com"/' /etc/named-nmsprime.conf

systemctl start named

sed -i 's/cpe.nmsprime.test/cpe.nmsprime.your-domain.com/' /etc/named-ddns.sh
6)


Cacti

Adaptions

Code Block
languagebash
# Get cacti password
grep "CACTI_DB_PASSWORD" /etc/nmsprime/env/provmon.env

# Change DB entries
mysql -u cactiuser -pIejeequ6oapa cacti
UPDATE host set hostname=REPLACE(hostname, '.test', '.your-domain.com') where hostname like 'cm-%nmsprime.test%';
UPDATE data_input_data set value=REPLACE(value, '.test', '.your-domain.com') where value like '%cm-%nmsprime.test%';
UPDATE poller_item set arg1=REPLACE(arg1, '.test', '.your-domain.com') where arg1 like '%cm-%nmsprime.test%';
quit

7) Add DNS Service to firewall


Firewall

Code Block
languagebash
# Add DNS Service to firewall
firewall-cmd --add-service=dns --zone=public
firewall-cmd --add-service=dns --zone=public --permanent