The scripts use Monitis API for adding monitors.
The scripts allow adding the following Server-Device monitors:
and the following uptime monitor:
The scripts will also install Smart Agent for Linux if not installed.
By default, the monitors will be added on a new tab, with the name of the tab being the name of your Linux agent, preceded by “NEW_”.
To run the scripts, follow these steps:
1. Install Ansible on your Linux OS (you can refer to Ansible documentation here for details: http://docs.ansible.com/ansible/intro_installation.html).
2. Download the your_ansible zip file from here.
3. Extract and copy the your_ansible folder to /etc/ansible/.
4. Go to /etc/ansible/your_ansible/hosts and find there the hosts file, where under the [MonitisMonitoring] you should type the IP address of the server that you are going to monitor.
5. In /etc/ansible/your_ansible/host_vars/ find a file named IP_address. Change the name of the file to be the IP address of your server that you are going to monitor.
6. You can edit this file to make any change to the monitoring parameters.
If you want to setup monitoring for several hosts you should:
- In /etc/ansible/your_ansible/hosts under [MonitisMonitoring] enter the IP addresses of all hosts that you want to monitor.
- Create files in /etc/ansible/your_ansible/host_vars/ with the names being the IP addresses of the hosts that you want to monitor. For each file, copy the contents of the IP_Address file and make your changes as necessary to the parameters there in the files. E.g. you can:
- Change the API key and Secret Key of the account.
- Provide the Agent Key to set up the Agent.
- Provide the agent name and installation path, etc.
- Set parameters for the monitors to be installed.
7. In /etc/ansible/your_ansible/ you can find the site.yml file containing the Ansible roles.
You can edit this file to only run the roles you want. For example, if you want to add only the CPU monitor you can comment out all those roles except the add_CPU_monitor role and the set_global_vars_and_add_tab role, which should always be active.
8. After that in the /etc/ansible/your_ansible/ path enter this command to run Ansible:
ansible-playbook -i hosts site.yml