This describes how to use the Python-based deployment script to install an agent. Using Python is a legacy deployment option that can have Python package dependencies incompatible with your environment. For script-based deployment without package or operating system dependencies, consider: Install an Agent using a Python Deployment Script.

Check for supported operating systems.

The following subsections describe the available installation and uninstall options.

Additional prerequisites

  • Python is required to run the script.
  • The host machine should have access to the API server to download the installer.

Install a root user agent

  1. From All Clients choose a client.

  2. Go to Setup > Download > Agent.

  3. In the Linux Agent Script tile, choose Python Script.

  4. Download and save the deployAgent.py script.

  5. Install the agent, enabling the features you want:

    • All features:

            python deployAgent.py
            
    • Specific features:

            python deployAgent.py -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the Infrastructure page displays the installed server.

Install a default non-root user agent

The default, non-root agent installation automatically creates the default user.

  1. From All Clients choose a client.

  2. Go to Setup > Download > Agent.

  3. In the Linux Agent Script tile, choose Python Script.

  4. Download and save the deployAgent.py script.

  5. Install the agent, enabling the features you want:

    • All features:

            python deployAgent.py -n yes
            
    • Specific features:

            python deployAgent.py -n yes -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the Infrastructure page displays the installed server.

Install a non-root custom user agent

To install the agent as a custom user with non-root privilege, create a new user and group before installing the agent.

  1. Create a new user group:

        groupadd --system {username}
        
  2. Create a custom user:

        useradd -g {username} -d /opt/opsramp -m {username} -s /bin/sh --system
        
  3. Set the user password:

        echo {username}:{password} | chpasswd
        
  4. From All Clients choose a client.

  5. Go to Setup > Download > Agent.

  6. In the Linux Agent Script tile, choose Python Script.

  7. Download and save the deployAgent.py script.

  8. Install the agent, enabling the features you want:

    • All features:

            python deployAgent.py -R {username}
            
    • Specific features:

            python deployAgent.py -R {username} -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the Infrastructure page displays the installed server.

View the installation logs in the /tmp/opsramp-agent_install.log file.

Uninstall an agent

  1. Remove the package, depending on your operating system:

    • Debian-based operating systems:

            dpkg -P opsramp-agent
            
    • Red Hat-based operating systems:

            rmp -e opsramp-agent
            
  2. Delete the folder:

        rmdir /opt/opsramp/agent
        

See the /tmp/opsramp-agent_uninstall.log file for uninstall progress.