Pre-requisites for Installing eG Agents on Linux Using Ansible

Make sure that the following pre-requisites are fulfilled before you try to install eG agents on Linux using Ansible:

  1. One/more Managed nodes, a Control node, and an Ansible Tower should be configured as part of the Ansible installation in your environment;

  2. The Ansible Playbook that automates the eG agent installation should be available on the Ansible control node. Typically, Ansible Playbooks offer a repeatable, reusable, simple configuration management and multi-machine deployment system, which is well suited for deploying complex applications.

    eG Enterprise provides an exclusive Ansible Playbook for the purpose of installing eG agents on Linux. This playbook is available as a YAML file named egagent_linux_install.yaml. To know how to make this playbook available on the Ansible control node, do the following:

    • Login to the Ansible control node.

    • Create a folder named ansible in the root directory of the node,

    • Then, proceed to download the egagent_linux_install.yaml file to the root/ansible directory you created.

      Note that the location of the egagent_linux_install.yaml file will change according to the version of eG Enterprise in use in your environment. If your eG Enterprise installation is of version 7.2.10 (or above), then download the egagent_linux_install.yaml file from the URL: https://www.eginnovations.com/releases/v7210/Additional Products/Scripts/Ansible. On the other hand, if your eG Enterprise installation is of a version lower than v7.2.10, then download the egagent_linux_install.yaml file from the URL: https://www.eginnovations.com/eval<version_number>/Additional Products/Scripts/Ansible.

  3. The Ansible Control Node should be configured with the IP address and connection details of the remote Linux systems on which the eG agent is to be installed. For this, follow the steps below:

    • Login to the Ansible Control Node.

    • Edit the /etc/ansible/hosts file therein. This file should be updated with the following details:

      • The IP addresses of each of the remote Linux servers/systems on which an eG agent is to be installed;

      • The details of how to connect to every server via SSH

    • To configure these details, first search for the [remoteservers] section in the /etc/ansible/hosts file. Under this section, provide the details of each remote Linux server in the following format:

      [remoteservers]

      <IPadress_of_Linux_server1> <Credentials_for_connecting_to_Linux_server1>

      <IPadress_of_Linux_server2> <Credentials_for_connecting_to_Linux_server2>

      For instance, if the SSH connection to a server uses Password authentication, then your specification will be:

      192.168.10.21 ansible_ssh_pass=password ansible_ssh_user=root

      If the SSH connection uses key-based authentication, then your specification will be:

      192.168.2.200 ansible_ssh_private_key_file=/path/to/your/.ssh/id_rsa.pub

    • Finally, save the file.

  4. The eG agent installable for Linux should be available on the Ansible Control node prior to the agent installation. To achieve this, follow the steps below:

    • Login to the Ansible control node and create a temporary folder named egagent in the tmp directory

    • Then, from the Ansible Control node, open a browser, and connect to the eG manager to which the Linux agents you will be installing need to report.

    • Login to that manager as a user with rights to download and install agents.

    • When the Admin Home page appears, click the icon in the top, right corner of the page that appears to download eG agents.

    • Doing so will invoke Figure 1, where you need to indicate if the eG agent you are downloading should communicate with the eG manager via a proxy server. If not, then pick the No option. If a proxy server is to be used for agent-manager communication, then select the Yes option.

      Figure 1 : Indicating whether/not the eG agent being downloaded should communicate with the eG manager

    • If the Yes option is chosen in Figure 1, then Figure 2 will appear. Here, you need to provide the details of the proxy server used for agent-manager communication.

      Figure 2 : Configuring agent-manager communication via a proxy server

    • Specify the following in Figure 2:

      • Proxy Server IP/Hostname: Mention the IP address/hostname of the proxy server used for agent-manager communication.
      • Proxy Server Port: Specify the port number at which the proxy server listens.
      • Does the proxy server require authentication?: Indicate whether/not the proxy server requires authentication. Select the No option if authentication is required, and Yes if it is.
      • Username, Password, and Confirm Password: If the proxy server requires authentication, then provide the credentials of a valid proxy server user against the Username and Password text boxes. Confirm the password by retyping it in the Confirm Password text box.
      • Finally, click the Submit button to confirm the proxy server specifications and proceed with the downloading of the eG agent.

    • Figure 3 will appear. To download Linux agent installables from the eG manager, first select Linux from the Operating System drop-down in Figure 3. The 32-bit and 64-bit Linux agent packages will then be available for download (see Figure 3).

      Figure 3 : eG's internal agent packages available for download from the eG manager console

    • To download an agent package for Linux, click on the package in Figure 3 that corresponds to the bit version of Linux that the target hosts in your environment are using. For instance, to install an eG agent on 32-bit Linux hosts, download the Linux.zip file by clicking on it.

    • Make sure that the zip file you click on is downloaded to the /tmp/egagent folder you created at step 1.

    • Next, from the Shell prompt, open the /tmp/egagent folder and run the following command to unzip the file and extract its contents.

      gunzip <Zip_File_Name>

    • The following files will then be extracted:

      • A tar file: If you downloaded the agent package for a 32-bit Linux host - i.e., if you downloaded Linux.zip - then upon unzipping the file, you will find a file named eGagent_linux.tar.gz. If you downloaded the agent package for a 64-bit Linux host - i.e., if you downloaded Linux_x64.zip - then upon unzipping the file, you will find a file named eGagent_linux_x64.tar.gz.

      • iAgent script: This is the script that installs the eG agent on a Linux host. An iAgent_linux script will be extracted from Linux.zip (32-bit package), and an iAgent_linux_x64 script will be extracted from Linux_64.zip (64-bit package).

      • silent_install: This is the shell script that drives the silent installation of the eG agent. Running setup invokes the iAgent script and silently installs the agent on the target host.

      • eg_uaid.ini file: In a multi-tenant setup, once a tenant - eg., a user representing a customer / a department / a domain - registers with eG Enterprise to use its monitoring services, eG automatically generates a unique UAID and assigns the same to that tenant. If that tenant later logs into the eG management console using the registered credentials (email ID and password) and downloads the agents, each agent so downloaded is automatically tagged with that UAID. The downloaded agents, once installed and configured, will automatically start discovering applications on their respective hosts. eG Enterprise auto-manages the discovered applications and auto-assigns them to the user who has the same UAID as the eG agent that discovered these applications. The eg_uaid file contains the UAID of the tenant who downloaded agent packages from the eG management console; this is the same UAID that will be assigned to each agent.

    • Finally, untar the tar file