Bulk Installation of Linux agent using Ansible
Unattended installation of the Linux agent can be performed using Ansible by following the below steps:
GitHub: https://github.com/site24x7/ansible-site24x7
- Download the playbooks "site24x7-install.yml", "site24x7-status.yml" and "site24x7-uninstall.yml" 'from the playbooks folder to your server where ansible is installed.
- Edit the file "site24x7-install.yml" with the following changes:
- Change the value of "hosts" field with the "hostname" or "groupname" of ansible connected servers where you would like to install the agent.
- Change the value of SITE24X7DEVICEKEY variable under "vars" field from SITE24X7DEVICEKEY to the actual device key for your Site24x7 account. Site24x7 Device key can be obtained from the Site24x7 web client (Server > Server Monitor > Servers (+) > Linux).
- Change the value of "proxy" filed from 'None' to the required value. Do not edit this value if proxy is not required.
- Associate configuration profiles including monitor group, threshold, notification, and resource check profiles during installation. For example, to associate the monitor group Production while installing the agent, edit the command in the "site24x7-install.yml" file as follows:
shell: /opt/Site24x7_Linux_64bit.install -i -key={{ device_key }} -installer=ansible -mg="PRODUCTION"Ensure the monitor group, threshold, notification, or resource check profile to be associated is already created in the Site24x7 web client.
- Save the changes and close the file.
- Now use the following command to execute the playbook : "ansible-playbook site24x7-install.yml"
- Use the following command to check the status of agents installed in ansible connected servers: "ansible-playbook -v site24x7-status.yml"
You can also associate monitor group, while installing the agent.
This will ensure automatic installation of the agent in your servers.
Related Articles:
- Add a Linux server monitor
- Bulk install using Chef
- Bulk install using Puppet
- Bulk install using SaltStack
- Remote install using SSH