Tell us enough to understand what you’ve done, what you’ve tested, and what
happened as a result, and we might have enough information to be able to help.
Actaully, I set up icinga2 and icinga web as per the documentation in test VM with Linux operating system. Everything worked fine and I could see the localhost being monitored.
Later, we made the package of the set up (icinga2, icingaweb-tar.gz) file and deployed the same on the new VM (UAT). Everthing is working fine. But issue is local host is being taken as the previous test machine. I wanted to change the locahlost value to the current UAT VM.
I changed the localhost value in constants.conf and restart the icinga services. An error message thrown as “could not find the certificate”. When I verified the certificate under the path /var/lib/icinga2/certs, I could see these certificates belonged to previous VM(test).
Then I tried with below (previously i did not add “import generic-hot” so it did not work) I jsut tried adding import. Now it is working
object Host “HOSTNAME” {
import “generic-host”
address = “SERVER_IP”
check_command = “hostalive”
}
Now, it is showing the UAT VM host being monitored but not as localhost…
So please suggest me how to change the localhost value to my current machine (on which I deployed the package).
If I have to generate certificate please guide me how to generate
changing the NodeName constant is not a good idea since the certificates are bound to that. Since you are having problems with the Host object being monitored, start your investigation there.
Where exactly did you put the host object definition, what’s the output from the config validation?