Requirements
Before setting up Icinga2 agents, the following requirements must be met:
- The Icinga 2 master must be properly set up and running.
- The Icinga 2 agent packages must be installed on the target system.
- The Icinga 2 agents must be able to communicate with the master.
Installation
- Install the Icinga 2 agent packages using the appropriate package manager.
# apt-get install icinga2
- Generate a secure ticket for the Icinga 2 agent.
# icinga2 pki ticket --cn <FQDN>
- Copy the ticket file to the Icinga 2 master.
- Configure the Icinga 2 master to accept the agent connection.
# icinga2 node setup --ticket <ticket-id> --endpoint <FQDN>
- Restart the Icinga 2 master service.
# systemctl restart icinga2
- Enable and start the Icinga 2 agent service.
# systemctl enable icinga2 # systemctl start icinga2
Conclusion
Once the setup is complete, the Icinga 2 agent should be able to communicate with the Icinga 2 master and you should be able to monitor the target system.