Installing the SL1 Agent

Download this manual as a PDF file

This section describes how to install, upgrade, and uninstall SL1 agents for Windows, Linux, AIX, and Solaris operating systems. All agent installations, upgrades, and uninstallations require command-line interface access to the targeted device.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all the menu options, click the Advanced menu icon ().

This section includes the following topics:

Installing an Agent from the Agents Page

When running SL1 on the SL1 Extended Architecture, you can use the Agents page (Devices > Agents) to help you install the SL1 agent on a Linux, Windows, AIX, or Solaris device.

You can also upgrade and delete agents from SL1 on the Agents page.

You can filter the items on this inventory page by typing filter text or selecting filter options in one or more of the filters found above the columns on the page. For more information, see Filtering Inventory Pages.

The Agents page appears as an option on the Devices menu only when you are using the SL1 Extended Architecture. If your version of SL1 does not have an Agents page, see Installing an Agent from the Device Manager Page.

If you are using an SL1 system with the SL1 Extended Architecture, you must use the Agents page (Devices > Agents) to install agents, including AIX and Solaris agents. AIX and Solaris agents are not available for non-SL1 Extended systems.

If you want to remotely install one or more agents, see Remotely Installing the SL1 Agent.

You do not install the agent from the Agents page itself. Instead, the Agents page enables you to gather the information or files you need to then install the agent on a particular device.

The instructions on the relevant tab of the Agents page also include command line parameters such as URLFRONT, which is used to define the Streamer service you are using as part of the SL1 Extended Architecture.

If the agent installation is successful, one of the following automatically happens:

  • If the primary IP address of the device is not currently monitored by SL1, then SL1 creates a device record for the device and populates the device record with data provided by the agent. The device record is assigned a device class based on data reported by the agent.
  • If the primary IP address of the device is currently monitored by SL1, the device record for the existing device is updated with data provided by the agent.

During initial discovery, the agent returns operating system type and version information to SL1. Based on this information, SL1 assigns the corresponding device classes to a device monitored only by an agent. If a device is monitored by an agent and via SNMP, the device class assigned by SNMP discovery will take precedence.

Installing a Linux Agent

For a Linux system, the Agents page provides version-specific commands that you will need to run on the Linux system you want to monitor. This page includes commands for the following operating systems:

  • Ubuntu and Debian (64-bit)

  • Red Hat and CentOS (64-bit)

  • Red Hat and CentOS - OS Libs (64-bit)

The Linux agent installation program checks for the relevant version of libcurl before installing the agent. If libcurl is not installed, the agent installation program installs the most recent version of libcurl.

When you install the Linux agent, SL1 adds a user and a group named scilog.

SL1 supports the use of proxy server connections when using the SL1 agent on Linux systems. For more information about installing and configuring a Linux agent with a proxy server, see Configuring the Linux Agent to Use a Proxy.

If you are installing on SELinux, see Using Agents with SELinux.

To install a Linux agent:

  1. On the Agents page (Devices > Agents), click New Agent. The Agent Installation page appears:

    Image of the Install a Linux Agent page

  1. Click the Linux tab at top left.
  2. From the Select an Organization drop-down list, select an organization for the device on which you are installing the agent. The TENANT value in the commands on this page is updated with the SL1 Organization ID for the organization you selected.

    The URLFRONT value is the URL for the Streamer service you are using as part of the SL1 Extended Architecture.

  3. Based on the version of Linux running on the device you want to monitor, run the relevant commands from the Linux tab on the Linux device (the "target server"). After the commands complete, the Linux agent starts running in the background. The device on which you installed the agent appears on the Agents page (Devices > Agents), and the device is also added to the list of devices on the Devices page.

Using Agents with SELinux

The Linux agent supports running in SELinux for CentOS or Red Hat in both permissive and enforcing modes. The RPM installer for Linux will detect if SELinux is active (permissive/enforcing) upon installation. The agent automatically creates and installs an appropriate SELinux policy for use with the agent daemon.

With the Linux Agent, a shared library gets injected into other processes. For non-root processes, this shared library should not generate any errors or audit logs. However, for root processes, this shared library might generate some additional audit logs where some of the shared library functionality is restricted by SELinux. If this is the case, you can update the agent configuration to exclude pre-loading into these root processes.

Installing a Windows Agent

For a Windows system, the Agents page provides an executable file (.exe)that you will need to run on the Windows system you want to monitor. You can also ask your ScienceLogic contact for an .msi file that you can use to install the Windows agent.

NOTE: SL1 supports the use of proxy server connections when using the SL1 agent on Windows systems. For more information about installing and configuring a Windows agent with a proxy server, see Configuring the Windows Agent to Use a Proxy.

To download and install a Windows agent in SL1:

  1. On the Agents page (Devices > Agents), click New Agent. The Agent Installation page appears.
  2. Click the Windows tab at top left:

    Image of the Install a Windows Agent page

  3. From the Select an Organization drop-down list, select an organization for the new agent. The tenant value in the command on this page is updated with the SL1 Organization ID for the organization you selected.
  4. Click Download Agent. An Opening SiloAgent-install.exe dialog appears.
  5. Save the SiloAgent-install .exe or .msi file for installing the agent.
  6. Copy the SiloAgent-install file you downloaded to the Windows system on which you want to run the agent. To do so, you can either go to the console of the Windows system or use a utility like WinSCP.
  7. To install the agent, use Windows PowerShell as an Administrator to run the command on the Windows system (the command is listed in step 2 on the Windows tab on the Agents page):

    .\SiloAgent-install.exe tenant=<organization_id> urlfront=<streamer_URL>

    where <organization_id> is Organization ID for the organization you selected in step 3, and <streamer_URL> is the URL for the Streamer service you are using as part of the SL1 Extended Architecture.

    For example:

    .\SiloAgent-install.exe tenant=1 urlfront=streamer-2020.int.sciencelogic.com

  8. When the agent installation completes, the PowerShell window displays "info: install complete", and the Windows agent starts running in the background. The device on which you installed the agent appears on the Agents page (Devices > Agents), and the device is also added to the list of devices on the Devices page.

  9. To verify that the installation was successful, open the Windows Task Manager or enter the TASKLIST command to view running processes. The SiloAgent process will be running on the Windows machine.

Installing an AIX Agent

For an AIX system, the Agents page provides a set of commands that you will need to run on the AIX system you want to monitor.

The AIX agent is a Beta feature.

To download and install an AIX agent:

  1. On the Agents page (Devices > Agents), click New Agent. The Agent Installation page appears.

  2. Click the AIX tab:

    Image of the Install an AIX Agent page

  3. From the Select an Organization drop-down list, select an organization for the device on which you are installing the agent. The Tenant value in the commands on this page is updated with the SL1 Organization ID for the organization you selected.

    The URLFront value is the URL for the Streamer service you are using as part of the SL1 Extended Architecture.

  4. Run the relevant commands from the AIX tab on the AIX device (the "target server"). After the commands complete, the AIX agent starts running in the background. The device on which you installed the agent appears on the Agents page (Devices > Agents), and the device is also added to the list of devices on the Devices page.

Installing a Solaris Agent

For a Solaris system, the Agents page provides version-specific commands that will need to run on the Solaris system you want to monitor. This page includes commands for the following versions:

  • Solaris 11 - SPARC

  • Solaris 11 - x86_64

  • Solaris 10 - SPARC

  • Solaris 10 - x86_64

The Solaris agent is a Beta feature.

To download and install a Solaris agent:

  1. On the Agents page (Devices > Agents), click the New Agent button. The Agent Installation page appears.
  1. Click the Solaris tab:

    Image of the Install a Solaris Agent page

  2. From the Select an Organization drop-down list, select an organization for the device on which you are installing the agent. The Tenant value in the commands on this page is updated with the SL1 Organization ID for the organization you selected.

    The URLFront value is the URL for the Streamer service you are using as part of the SL1 Extended Architecture.

  3. Based on the version of Solaris running on the device you want to monitor, run the relevant commands from the Solaris tab on the Solaris device (the "target server"). After the commands complete, the Solaris agent starts running in the background. The device on which you installed the agent appears on the Agents page (Devices > Agents), and the device is also added to the list of devices on the Devices page.

Configuring an SL1 Agent to Use a Proxy Server Connection

The following section covers how you can configure a proxy server connection when using the SL1 agent on Linux or Windows systems.

Configuring the Linux Agent to Use a Proxy

To configure the Linux agent to use a proxy server connection:

  1. Create a configuration file named scilog_proxy.conf and add the following proxy information to the new file:

    Proxy-Server

    Proxy-Port

    Proxy-Username

    Proxy-Password

    For example:

    Proxy-Server 10.1.1.1

    Proxy-Port 8080

    Proxy-Username admin1

    Proxy-Password passw0rd

    The agent requires at least the proxy server and proxy port information. If no authentication is required, leave the username and password commented out with a "#". If values are present for the username and password, the agent will try to use them. The agent currently supports Basic Authentication.

  2. Add the new file to the /etc/scilog directory on the SL1 server. This directory is also where the scilog.conf file resides.

    If the scilog_proxy.conf file exists, the agent will try to connect to a proxy. If you do not need a proxy, remove or rename this file to prevent the agent from accessing it. Alternatively, you can leave the parameters blank in the scilog_proxy.conf file.

Installing and Configuring with the Proxy Settings

You can set the proxy parameters at install time by including them as parameters for the install command, just as you do with the Tenant and URLFront values. Use the package name for the package being installed.

For example:

deb

sudo TENANT=0 URLFRONT=10.1.1.2 proxyserver=10.2.1.1 proxyport=3128 proxyusername=1 proxypassword=1 dpkg -i sl_agent_v173.15.deb

rpm

sudo TENANT=0 URLFRONT=10.1.1.2 proxyserver=10.2.1.1 proxyport=3128 proxyusername=1 proxypassword=1 rpm -ivh sl_agent_v173.16.rpm

aix

sudo TENANT=0 URLFRONT=10.1.1.2 proxyserver=10.2.1.1 proxyport=3128 proxyusername=1 proxypassword=1 rpm -Uvh scilogd-0.173.17-0.aix7.2.noarch.rpm

If no proxy is used, you can remove the proxy parameters in the install command. Similarly, if a proxy is used without credentials, remove the proxyusername and proxypassword parameters in the install command, and only include the proxyserver and proxyport parameters .

Also note that the Tenant and URLFront values can now be passed on the install command for AIX.

Configuring the Windows Agent to Use a Proxy

To configure the Windows agent to use a proxy server connection:

  1. Create a configuration file named scilog_proxy.conf and add the following proxy information to the new file:

    Proxy-Server

    Proxy-Port

    Proxy-Username

    Proxy-Password

    For example:

    Proxy-Server 10.1.1.1

    Proxy-Port 8080

    Proxy-Username admin1

    Proxy-Password passw0rd

    The agent requires at least the proxy server and proxy port information. If no authentication is required, leave the username and password values blank. If values are present for the username and password, the agent will try to use them. The agent currently supports Basic Authentication. The agent will discover the type of supported authentication, so there is no need to specify it in the configuration file.

  2. Add the new file to the C:\Program Files\ScienceLogic\SiloAgent\conf directory on the SL1 server. This directory is also where the scilog.conf file resides.

    If the scilog_proxy.conf file exists, the agent will try to connect to a proxy. If you do not need a proxy, remove or rename this file to prevent the agent from accessing it. Alternatively, you can leave the parameters blank in the scilog_proxy.conf file. If you use the .msi installer, you can input the parameters in the dialog box for the installer.

When configuring a proxy password with the above procedure, SL1 encodes the proxy password in the scilog_proxy.conf file. The password displays as a seemingly random string of characters.

You can manually edit the scilog_proxy.conf file, you can manually enter the proxy password. The agent will still work with a proxy password in plain text. The agent will detect if the setup script encoded the password; otherwise, it assumes the password is in plain text.

Installing and Configuring the Agent with the Proxy Settings

You can set the proxy parameters at install time by including them as parameters for the install command, just as you do with the Tenant and URLFront values.

For example:

.\SiloAgent-install.exe Tenant=0 URLFront=10.1.1.2 proxyserver=10.2.1.1 proxyport=3128 proxyusername=1 proxypassword=1

If no proxy is used, you can remove the proxy parameters in the install command. Similarly, if a proxy is used without credentials, remove the proxyusername and proxypassword parameters in the install command, and only include the proxyserver and proxyport parameters.

If no parameters are passed to SiloAgent-install.exe, including Tenant and URLFront, a pop-up dialog will appear where you can enter these values. If you do not require proxy credentials, you can leave those values blank.

Upgrading the Agent

When you have the latest version of the SL1 agent, a check mark icon () appears in the Newest Version column for that agent. If you do no have the latest version of the agent, an Upgrade button appears in the Newest Version column on the Agents page.

To upgrade to the latest version of an agent:

  1. On the Agents page (Devices > Agents), locate the agent you want to upgrade.
  2. Click the Upgrade button for that agent, or click the Actions button () and select Upgrade. The agent starts the upgrade process, which might take up to a minute to complete.
  3. Click the Refresh button in your browser to ensure that a check mark icon () appears in the Newest Version column for that agent.

Stopping the Agent

You can use the "delete" option on the Agents page to stop an agent from running. When you delete an agent, SL1 stops the agent from running on the device, deletes the data gathered by that agent, and removes that agent from the Agents page.

Using the "delete" option for an agent does not actually remove the agent from the device. As a best practice, use the delete process to delete the data gathered by the agent (the uninstallation process does not delete this data), and then uninstall that agent, if needed. For uninstallation details, see Uninstalling an Agent. Also, ScienceLogic recommends that you delete the device that had the agent installed on it, or at least remove the agent-related Dynamic Applications, to prevent SL1 from attempting to use the data the agent gathered from that device.

To delete an agent and its data:

  1. On the Agents page (Devices > Agents), locate the agent you want to delete.
  2. Click the Actions button () for that agent and select DeleteSL1 stops the agent from collecting data.

If you used the Agents page to install an agent, then you should also use the Agents page to delete that agent. If you attempt to delete the agent using the classic SL1 user interface rather than the Agents page, SL1 deletes only some of the data gathered by the agent, rather than all of the data.

Uninstalling the Agent

When you uninstall an agent, you remove that agent completely from SL1, but you do not lose the data collected by that agent.

After you uninstall the agent, the scilog.conf file remains on the device. If you think you might want to monitor with that agent again in the future, you should delete the scilog.conf file after you run the uninstallation. 

Uninstalling a Linux Agent

To uninstall an agent on a Linux system:

  1. Log in to the Linux system via the console or SSH as a user that has sudo administrator permissions.

  2. For Red Hat, CentOS, and Oracle, execute the following command:

    rpm –e scilogd

  3. For Debian and Ubuntu, execute the following command:

    dpkg -r scilogd

  4. Optionally, you can remove the agent configuration directory from the Linux system. The configuration directory can be found at:

    /etc/scilog (rm -rf /etc/scilog)

Uninstalling a Windows Agent

To uninstall an agent on a Windows system:

  1. On the Windows system, open the Control Panel.

  2. Go to the Programs and Features page (Control Panel > Programs > Uninstall a program).

  3. Select the SiloAgent program from the list, and then click Uninstall.

  4. When the uninstallation process is complete, remove the agent configuration directory from the Windows system. The configuration directory can be found at:

    Program Files\ScienceLogic\SiloAgent\conf

Installing an Agent from the Device Manager Page

If you are using a distributed SL1 system without the SL1 Extended Architecture (which includes Compute Nodes, Storage Nodes, and a Management Node), you must use the Agent Installation page to install the agent. You can access the Agent Installation page from the Device Manager page.

TCP port 443 must be open between the Message Collector and the device on which an agent is installed.

If you are using an SL1 system with the SL1 Extended Architecture, you must use the Agents page (Devices > Agents) to install agents, including AIX and Solaris agents. AIX and Solaris agents are not available for non-SL1 Extended systems.

If you are not using the SL1 Extended Architecture, the Agents page (Devices > Agents) will not be available in the SL1 user interface.

To install an agent from the Device Manager page, you first need to gather installation information from the Agent Installation page:

  • For a Linux system, the Agent Installation page provides commands that must be executed on that system.
  • For a Windows system, the Agent Installation page provides an executable file to run on the Windows system.

To gather the necessary commands and executable files to install an agent on a device:

  1. Go to the Device Manager page (Device > Device Manager in the SL1 user interface, or Registry > Devices > Device Manager in the classic user interface).

  1. Click Actions and select Download/Install Agent. The Agent Installation page appears:

  1. Complete the following fields:
  • Select an OS. Select the operating system running on the device on which you want to install the agent.
  • NOTE: If you require a FIPS-compliant version of the SL1 agent, select RedHat/CentOS 64-bit (OS Libs).

  • Select an Organization. Select an organization from the list of possible organizations. The list of organizations is dependent on your user account. If the agent discovers a new device, that device will be associated with the organization you select here.
  • If you are installing an agent on a device that has already been discovered, you must select the organization that is already aligned with the existing device.

  • Select a Message Collector. Select the Message Collector to which the agent will send its collected data.
  1. If you selected a Linux operating system in the Select an OS field, the Agent Installation page displays a list of commands to execute on the Linux system. Copy the commands for use during the installation on the Linux device.
  2. If you selected a Windows operating system in the Select an OS field, the Agent Installation page displays a Download Windows Agent link. Click the link and save the executable file for use during the installation on the Windows device.

If you are installing an agent on multiple devices that run the same operating system, are part of the same organization, and connect to the same Message Collector, you can re-use the same commands or executable file on each of those devices.

Installing the Agent on a Linux System

To install an agent on a Linux system:

  1. Log in to the Linux system via the console or SSH as a user that has sudo administrator permissions.

  1. Execute the commands that you copied from the Agent Installation page in SL1. If the installation was successful, the output will look similar to the following:
  2. [em7admin@em7ao ~]$ sudo wget --no-check-certificate https://10.64.68.16/packages/initial/0/silo-agent-x86_64.rpm

    [sudo] password for em7admin:

    --2016-11-15 21:10:28-- https://10.64.68.16/packages/initial/0/silo-agent-x86_64.rpm

    Connecting to 10.64.68.16:443... connected.

    WARNING: cannot verify 10.64.68.16's certificate, issued by ‘/C=US/ST=Silo/L=Reston/O=Silo/CN=10.64.68.16’:

    Self-signed certificate encountered.

    HTTP request sent, awaiting response... 200 OK

    Length: 2018317 (1.9M) [application/x-rpm]

    Saving to: ‘silo-agent-x86_64.rpm’

    100%[=======================================>] 2,018,317 --.-K/s in 0.01s

    2016-11-15 21:10:28 (169 MB/s) - ‘silo-agent-x86_64.rpm’ saved [2018317/2018317]

    [em7admin@em7ao ~]$ sudo rpm -ihv silo-agent-x86_64.rpm

    Preparing... ################################# [100%]

    Updating / installing...

    1:scilogd-0.128-0 ################################# [100%]

    Created symlink from /etc/systemd/system/multi-user.target.wants/scilogd.service to /etc/systemd/system/scilogd.service.

NOTE: SL1 supports the use of proxy server connections when using the SL1 agent on Linux systems. To do so, open a command window on the target server and first configure curl to use a proxy server using the CURLOPT_PROXY option, and then to use a username and password combination for that proxy server using the CURLOPT_PROXYUSERPWD option.

Updating an Agent on a Linux System

To update the agent on a Linux system:

  1. Log in to the Linux system via the console or SSH as a user that has sudo administrator permissions.

  2. Execute the first command that you copied from the Agent Installation page.

  3. For RedHat-based Linux distributions, execute the following command:

    sudo rpm -Uvh silo-agent-x86_64.rpm

  4. For Ubuntu-based Linux distributions, execute the following command:

    sudo dpkg -i silo-agent-x86_64.deb

Uninstalling an Agent on a Linux System

To uninstall an agent on a Linux system:

  1. Log in to the Linux system via the console or SSH as a user that has sudo administrator permissions.

  2. For RedHat-based Linux distros, execute the following command:

    rpm –e scilogd-0.128-0.[ARCH].rpm where [ARCH] = i386 or x86_64

  3. For Ubuntu-based Linux distros, execute the following command:

    dpkg –-purge silo-agent-[ARCH].deb where [ARCH] = i386 or x86_6

  4. Remove the agent configuration directory from the Linux system. The configuration directory can be found at:

    /etc/scilog

Installing the Agent on a Windows System

To install an agent on a Windows system:

  1. Copy the SiloAgent-install.exe file you downloaded from the Agent Installation page to the Windows system. You can go to the console of the Windows system or use a utility like WinSCP.

  2. Run the following command as an Administrator:

    SiloAgent-install.exe tenant=<organization_id> urlfront=<URL_for_your_SL1_system>

  3. To verify that the installation was successful, open the Windows Task Manager or enter the TASKLIST command to view running processes. The SiloAgent process will be running on the Windows machine.

SL1 supports the use of proxy server connections when using the SL1 agent on Windows systems. In Windows 10, go to Settings > Network & Internet > Proxy to set up a proxy; in older versions of Windows, you can do this by clicking on the Control Panel and going to Internet Options > Connections > LAN Settings. If a proxy server requires authentication, you will need to provide a username and password before traffic is allowed through the proxy server and to the Internet.

Uninstalling the Agent on a Windows System

To uninstall an agent on a Windows system:

  1. On the Windows system, open the Control Panel.

  2. Go to the Programs and Features page (Control Panel > Programs > Uninstall a program).

  3. Select the SiloAgent program from the list, and then click Uninstall.

  4. When the uninstallation process is complete, remove the agent configuration directory from the Windows system. The configuration directory can be found at:

    Program Files\ScienceLogic\SiloAgent\conf

Configuring the SL1 Agent to Work with Phone Home Collectors

If you are using PhoneHome Message Collectors in a distributed architecture, you will need to configure the settings for the Message Collector to prevent SL1 from incorrectly configuring the SL1 agent to use the loopback IP address when it should be using the local IP address for the Message Collector.

If you do not perform the configuration steps below, when you try to install the agent from a Message Collector when it is configured as a PhoneHome Collector, the URLs for both the download and the internal configuration of the agent reference the loopback address instead of the accessible public/private IP address of the Message Collector.

For more information about PhoneHome Collectors, see Configuring SL1 for PhoneHome Communication.

To configure the SL1 agent to work with a PhoneHome Collector:

  1. Go to the Appliance Manager page (System > Settings > Appliances):

  1. In the Message Collection Unit row, click the Agent Endpoint Configuration icon () for the agent. The Agent Endpoint Configuration modal appears:

  1. Make sure that the configuration information under the Appliance Details field is accurate.
  2. Complete the following fields:

  • Download Link Visibility. Select whether you want to display the download link in the Agent Installation modal page.

    • If you select Enabled, the link to the Message Collector appears on the Agent Installation modal, which is available on the Device Manager page (Devices > Device Manager or Registry > Device > Device Manager in the classic user interface) when you click the Actions button and select Download/Install Agent:

    • If you select Disabled, the link to the Message Collector does not appear in the Agent Installation modal page.
  • Endpoint Name for Download Link. This field contains the name of the Message Collector. If the name is not populated by default, you can enter the name.
  • Hostname/IP for Agent Download. Make sure that this field contains the IP address for the Message Collector.
  • Hostname/IP for Data Collection. Enter the IP address for the Message Collector.
  • Default CUG Alignment. Select the Collector Group aligned with the agent.
  1. Click Save. The agent is now configured to work with a Message Collector when it is configured as a Phone Home Collector.

Remotely Installing the SL1 Agent

This section covers how to configure remote installations of the Linux agent and the Windows agent.

The following procedures are examples of how you could set up these installations, using Ansible as the tool for the installation. You might use Ansible in a different way, or you might use another tool altogether. These examples represent just one way to configure the remote installation of agents.

Remotely Installing the Linux Agent

This topic provides an example of how you can use Ansible to remotely install the SL1 Linux agent. Please refer to the Ansible product documentation as needed.

To remotely install the Linux agent using Ansible:

  1. Set up your Ansible control node, using the documentation at Installing Ansible.

  2. Download the SL1 Linux agent installers from the Agents page (Devices > Agents > New Agent button) in SL1. For example:

    • silo-agent-x86_64.rpm

    • silo-agent-x86_64.deb

  3. Create the hosts.yml file, using the following code as an example:

    servers:
      hosts:
        centos_host:
          ansible_host: 172.16.54.195
          ansible_user: root
        debian_host:
          ansible_host: 10.2.16.125
          ansible_user: root
  4. Create the playbook.yml file, using the following code as an example:

    ---
    - hosts: servers
      vars:
        tenant: 0
        url_front: 10.2.16.49
        package_rpm: silo-agent-x86_64.rpm
        package_deb: silo-agent-x86_64.deb
      tasks:
     
      - name: check if agent exists
        stat:
          path: /usr/bin/scilogd
        register: agent_binary
     
      - name: copy rpm installer
        copy:
          src: "{{ package_rpm }}"
          dest: ~/{{ package_rpm }}
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'RedHat')
     
      - name: copy deb installer
        copy:
          src: "{{ package_deb }}"
          dest: ~/{{ package_deb }}
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'Debian')
     
      - name: install rpm agent
        shell: TENANT={{ tenant }} URLFRONT={{ url_front }} rpm -ihv ~/{{ package_rpm }}
        args:
          creates: /usr/bin/scilogd
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'RedHat')
     
      - name: install deb agent
        shell: TENANT={{ tenant }} URLFRONT={{ url_front }} dpkg -i ~/{{ package_deb }}
        args:
          creates: /usr/bin/scilogd
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'Debian')
     
      - name: remove rpm installer
        file:
          path: ~/{{ package_rpm }}
          state: absent
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'RedHat')
     
      - name: remove deb installer
        file:
          path: ~/{{ package_deb }}
          state: absent
        when: (agent_binary.stat.exists == False and ansible_facts['os_family'] == 'Debian')
  5. Run the playbook by executing the following command:

    ansible-playbook playbook.yml -i hosts.yml --ask-pass

    This example uses the --ask-pass parameter so that you are prompted for a single password to use with all remote computers.

    The following code is an example of the output:

    $ ansible-playbook playbook.yml -i hosts.yml --ask-pass
    SSH password:
     
    PLAY [servers] **************************************************************************************************************
     
    TASK [Gathering Facts] ******************************************************************************************************
    ok: [centos_host]
    ok: [debian_host]
     
    TASK [check if agent exists] ************************************************************************************************
    ok: [centos_host]
    ok: [debian_host]
     
    TASK [copy rpm installer] ***************************************************************************************************
    skipping: [debian_host]
    changed: [centos_host]
     
    TASK [copy deb installer] ***************************************************************************************************
    skipping: [centos_host]
    changed: [debian_host]
     
    TASK [install rpm agent] ****************************************************************************************************
    skipping: [debian_host]
    changed: [centos_host]
     
    TASK [install deb agent] ****************************************************************************************************
    skipping: [centos_host]
    changed: [debian_host]
     
    TASK [remove rpm installer] *************************************************************************************************
    skipping: [debian_host]
    changed: [centos_host]
     
    TASK [remove deb installer] *************************************************************************************************
    skipping: [centos_host]
    changed: [debian_host]
     
    PLAY RECAP ******************************************************************************************************************
    centos_host                : ok=5    changed=3    unreachable=0    failed=0    skipped=3    rescued=0    ignored=0  
    debian_host                : ok=5    changed=3    unreachable=0    failed=0    skipped=3    rescued=0    ignored=0

Remotely Installing the SL1 Windows Agent

This topic provides examples of how you can use the PowerShell console or Ansible to remotely install the SL1 Windows agent. Please refer to the PowerShell or Ansible product documentation as needed.

To remotely install the Windows agent using InstallSoftwareRemotely.ps1:

  1. Download the  Windows Agent installer from the Agents page (Devices > Agents > New Agent button) in SL1 and add the installer to your domain-controller n its own directory. For example, C:\files\SiloAgent-install.exe.

  2. Download the third-party PowerShell script to your domain-controller.

  3. Create a comma-separated value (CSV) file with the names of the computers where you want to install the agent. For example: C:\computers.csv, such as:

    rstlsw12t16ls01

    rstlsw12t16ex01

    computer3

    computer99

  4. Run the following command from a PowerShell console:

    .\InstallSoftwareRemotely.ps1 -CSV C:\computers.csv -AppPath 'C:\foo\SiloAgent-install.exe' -AppArgs "Tenant=<organization_id> urlFront=<streamer_URL>"

    where:

    • -CSV uses the full path to the .csv file you created in step 3, above.
    • -AppPath uses the full path to the installer in step 1, above. Make sure the file is in its own directory.
    • -AppArgs uses the Tenant and urlFront values shown on the Windows agent install instructions page in SL1.
    • You can optionally use the -Credential option to be prompted for a different username and password to access all remote machines. Otherwise the script will use your current login account to access all remote machines.

    The following code is an example of the output:

    PS C:\> .\InstallSoftwareRemotely.ps1 -CSV C:\computers.csv -AppPath 'C:\foo\SiloAgent-install.exe' 
    -AppArgs "Tenant=0 URLFront=streamer-shared-e2e-testing.int.sciencelogic.com"
    Start remote installation on 2020-56-20 09:56:17
    No credential specified. Using logon account
    -----------------------------------------------------------------
    Attempt 1 of 5
    -----------------------------------------------------------------
    COMPUTER RSTLSW12T16LS01 (1 of 2)
    Coping C:\foo to \\rstlsw12t16ls01\C$\temp
    Installing SiloAgent-install.exe on RSTLSW12T16LS01
    Executing C:\temp\foo\SiloAgent-install.exe Tenant=0 URLFront=streamer-shared-e2e-testing.int.sciencelogic.com
    Deleting C:\temp\foo
    SiloAgent-install.exe installed successfully.
    COMPUTER RSTLSW12T16EX01 (2 of 2)
    Coping C:\foo to \\rstlsw12t16ex01\C$\temp
    Installing SiloAgent-install.exe on RSTLSW12T16EX01
    Executing C:\temp\foo\SiloAgent-install.exe Tenant=0 URLFront=streamer-shared-e2e-testing.int.sciencelogic.com
    Deleting C:\temp\foo
    SiloAgent-install.exe installed successfully.
    -----------------------------------------------------------------
    100% Success installing SiloAgent-install.exe on 2 of 2 computers:
    rstlsw12t16ls01 rstlsw12t16ex01

To remotely install the Windows agent using Ansible:

  1. Set up your Ansible control node. Refer to Ansible documentation for installing on other operating systems: Installing Ansible with pip.

  2. Update your Ansible control node to manage Windows servers by running the following command:

    sudo pip3 install pywinrm

  3. Ensure that remote machines are set up with PowerShell 3 or later:

    https://github.com/jborean93/ansible-windows/blob/master/scripts/Upgrade-PowerShell.ps1

  4. Ensure that remote machines are setup for Windows Remote Management:

    https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1

  5. Download the SL1 Windows agent installer, SiloAgent-install.exe, from the Agents page (Devices > Agents > New Agent button) in SL1.

  6. Create the hosts.yml file, using the following code as an example:

    group1:
      hosts:
        win2008r2:
          ansible_host: 10.2.16.41
          ansible_user: Administrator
        win2012:
          ansible_host: 10.2.16.42
          ansible_user: Administrator
        win2012r2:
          ansible_host: 10.2.16.40
          ansible_user: Administrator
    group2:
      hosts:   
        dc01:
          ansible_host: 10.2.16.60
          ansible_user: administrator@T16TESTDOMAIN
        ls01:
          ansible_host: 10.2.16.62
          ansible_user: administrator@T16TESTDOMAIN   
        es01:
          ansible_user: administrator@T16TESTDOMAIN
          ansible_host: 10.2.16.64
  7. Create the my_playbook.yml file, using the following code as an example:

    ---
    - hosts: group1
      gather_facts: no
      tasks:
      - name: Ping Windows Hosts
        win_ping:
      - name: Copy agent installer
        win_copy:
          src: ./SiloAgent-install.exe
          dest: C:\Temp\SiloAgent-install.exe
      - name: Exec Installer
        win_command: C:\Temp\SiloAgent-install.exe Tenant=yyy URLFront=zzz
      - name: Remove agent installer
        win_file:
          path: C:\Temp\SiloAgent-install.exe
          state: absent
  8. Run the playbook by executing the following command:

    ansible-playbook playbook.yml -i hosts.yml --ask-pass

    This example uses the --ask-pass parameter so that you are prompted for a single password to use with all remote computers. Alternately, you could include the password in hosts.yml or ./group_vars/all.yml.

    The following code is an example of the output:

    [em7admin@jkay88 demo_ansible]$ ansible-playbook my_playbook.yml -i hosts.yml --ask-pass
    SSH password:
     
    PLAY [group1] ************************************************************************************************************************************************************************************
     
    TASK [Ping Windows Hosts] ************************************************************************************************************************************************************************
    ok: [win2012r2]
    ok: [win2012]
    ok: [win2008r2]
     
    TASK [Copy agent installer] **********************************************************************************************************************************************************************
    changed: [win2012]
    changed: [win2012r2]
    changed: [win2008r2]
     
    TASK [Exec Installer] ****************************************************************************************************************************************************************************
    changed: [win2012]
    changed: [win2012r2]
    changed: [win2008r2]
     
    PLAY RECAP ***************************************************************************************************************************************************************************************
    win2008r2                  : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  
    win2012                    : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  
    win2012r2                  : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0