Change already added hostname

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Change already added hostname

Post by nagarjuna »

We have configured nagiosxi and monitoring around 200 hosts with its services. everything is going good. We have configured hosts with its ip address and not used hostnames for configured nodes.

Please let us know how we can change hostname so that we can get notification subject with its hostname instead of host's ip address.

Its coming like:

Sub : PROBLEM Host Alert -x12.x13.x14.x15 is DOWN


***** Nagios XI Alert *****

** This is an escalated notification ** Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: x12.x13.x14.x15
State: DOWN
Address: x12.x13.x14.x15
Info: /bin/ping -n -U -w 10 -c 1 localhost
Date/Time: 2013-12-13 03:00:30


WE need like:

Sub : PROBLEM Host Alert -abchostname is DOWN
***** Nagios XI Alert *****

** This is an escalated notification ** Nagios has detected a problem with this host.

Notification Type: PROBLEM
Host: x12.x13.x14.x15
State: DOWN
Address: x12.x13.x14.x15
Info: /bin/ping -n -U -w 10 -c 1 localhost
Date/Time: 2013-12-13 03:00:30


thanks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Change already added hostname

Post by abrist »

Go to --> Configure --> Core configuration manager (CCM) --> Hosts --> Click on one of the hosts in question and replace "Host Name" with the hostname you wish to use for the server.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nagarjuna
Posts: 133
Joined: Mon Dec 09, 2013 2:11 am

Re: Change already added hostname

Post by nagarjuna »

Dear team,

As you mentioned, we have checked but apply configuration is going failed, why because in services folder same host configuration file contains old host name, and its not matched with new one.

should we move host and service configuration files from etc/services and etc/hosts to /tmp, and then can we apply? is there any risk??
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Change already added hostname

Post by slansing »

When your apply config fails it should be rolling back to the last good snapshot, which would contain the old host name, so that is normal. It's better to verify your settings through the web UI in this case, rather than looking at flat config files. Why is the apply configuration failing? What is the output of the verify step when running through the write configs tool (CCM > Tools > Write Configs > "write/verify")
Locked