Use the IT Agent Discovery to identify and track assets that connect to your network.
Prerequisites
Review the Discovery IT Agent requirements
Review the supported operating systems
Supported operating systems
.deb packages:
Debian 12 (x64, current stable and previous release)
Ubuntu 22.04 LTS (x64, current LTS and previous LTS)
.rpm packages:
Alpine Linux 3.19 (x64, current and previous stream release)
Azure Linux 3.0 (x64, current and previous stream release)
CentOS Stream 9 (x64, current and previous stream release)
Fedora 40 (x64, current and previous release)
openSUSE Leap 15.6 (x64, current and previous release)
Red Hat Enterprise Linux 8 (x64, current and previous minor release)
SUSE Linux Enterprise Server (SLES) 15 SP6 (x64, current and previous service pack)
Install the agent
On your preferred site, navigate to Discovery > Systems > Download Installers/Packages.
Select IT Agent Discovery > Download the Lansweeper repository package for the Linux Debian OS.
Open a terminal and install the package:
sudo dpkg -i ./lansweeper-repository.deb sudo apt updateOn your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.
Install the agent. Replace
cloudtokenvaluewith your actual linking code and run:sudo env LINKING_CODE=cloudtokenvalue apt install lansweeper-it-agentIf you're using a proxy server, add the
PROXY_SERVERandPROXY_PORTparameters:sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> apt install lansweeper-it-agent.x86_64
On your preferred site, navigate to Discovery > Systems > Download Installers/Packages.
Select IT Agent Discovery > Download Lansweeper repository package for the Linux Red Hat OS.
Open a terminal and install the repository package you copied to your machine:
sudo dnf install ./lansweeper-repository-x.0.0-0.x86_64.rpm sudo dnf updateOn your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.
Install the agent. Replace
cloudtokenvaluewith your actual linking code and run:sudo env LINKING_CODE=cloudtokenvalue dnf install lansweeper-it-agent.x86_64If you're using a proxy server, add the
PROXY_SERVERandPROXY_PORTparameters:sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> dnf install lansweeper-it-agent.x86_64
Copy the following script:
#!/bin/bash set -e # ---------------------------- # Lansweeper IT Agent Installer Script # ---------------------------- # Set your cloud token here cloudtoken="cloudtokenvalue" # Check system architecture ARCH=$(uname -m) if [[ "$ARCH" != "x86_64" && "$ARCH" != "amd64" ]]; then echo " Lansweeper IT Agent Discovery is only available for amd64 (x86_64)." echo " You are running: $ARCH" echo " Please use an x86_64 VM or Docker container with --platform linux/amd64." exit 1 fi # Check curl/wget if ! command -v curl &>/dev/null && ! command -v wget &>/dev/null; then echo " Neither curl nor wget found. Please install one of them." echo " Example (Debian/Ubuntu): sudo apt install curl -y" echo " Example (RHEL/Fedora): sudo dnf install curl -y" exit 1 fi # Detect distro family if [ -f /etc/debian_version ]; then PKGTYPE="deb" INSTALLER_URL="https://download.lansweeper.com/deb-repository/stable/latest" INSTALLER_PATH="/tmp/lansweeper-it-agent.deb" INSTALL_CMD="sudo dpkg -i $INSTALLER_PATH || sudo apt-get install -f -y" elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then PKGTYPE="rpm" INSTALLER_URL="https://download.lansweeper.com/rpm-repository/stable/latest" INSTALLER_PATH="/tmp/lansweeper-it-agent.rpm" INSTALL_CMD="sudo rpm -i $INSTALLER_PATH || sudo dnf install -f -y" else echo " Unsupported Linux distribution." exit 1 fi echo " Downloading Lansweeper IT Agent Discovery installer for $PKGTYPE..." # Download installer if command -v curl &>/dev/null; then curl -L -o "$INSTALLER_PATH" "$INSTALLER_URL" else wget -O "$INSTALLER_PATH" "$INSTALLER_URL" fi echo " Installing Lansweeper IT Agent Discovery with cloud token..." # Create config file with cloudtoken CONFIG_PATH="/etc/lansweeper-it-agent/itagent.conf" sudo mkdir -p /etc/lansweeper-it-agent cat <<EOF | sudo tee "$CONFIG_PATH" >/dev/null { "cloudtoken": "$cloudtoken" } EOF # Silent install eval "$INSTALL_CMD" # Remove installer rm -f "$INSTALLER_PATH" echo " Installation completed." echo " Cloud token has been set in: $CONFIG_PATH" echo " If your token changes, re-run this script to update it."On your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.
In the first section of the script, replace
cloudtokenvaluewith your copied linking code.Save your file as a Bash script, for example:
install-ls-it-agent.sh.Make the script executable by running:
chmod +x install-ls-it-agent.sh.Run the script with elevated permissions:
sudo ./install-ls-it-agent.sh.
Next steps
Now that your IT Agent is installed, you can create a discovery action to specify when discovery should occur.