Deploy server agent

Deploy server agent

By installing an agent (Servwatch agent) on the monitored server, Servwatch enables process and resource monitoring.

This section describes how to install the agent.

Compatible environments

The Servwatch agent is compatible with Linux distributions that support systemctl.

Also, x86/arm64 architecture supported.

  • CentOS 9/10

  • Debian 10 and later

  • Ubuntu 18 and later

  • Amazon Linux 2

  • Raspberry Pi 5 (Tested@Debian 12 bookworm)

  • Raspberry Pi 3A+ (Tested@Raspbian GNU/Linux 10 buster)

The agent is built in golang and works independently without requiring any external libraries. It automatically detects the architecture and installs the agent binaries during installation.

Deploy an agent

To deploy the Servwatch agent, execute the following script directly on the monitored server.

  1. Go to the console, move to "Server->" New Server Registration "and deploy the agent to the monitored server by following the steps from Step 2 of" Automatic Registration (usually select this) ".

  2. Execute the script with root privileges on the terminal of the monitored server. The host name is set automatically, but if you want to set it manually, change the red part and execute.

    1. To setting the host name automatically (normally select this)

      sudo curl -fsSL https://m.thingscale.io/agent/setup_servwatch_agent.sh | SERVWATCH_USERID='****' SERVWATCH_DEVICETOKEN='****' sh
    2. To setting the host name manually

      sudo curl -fsSL https://m.thingscale.io/agent/setup_servwatch_agent.sh | SERVWATCH_USERID='****' SERVWATCH_DEVICEID='<SET_YOUR_HOSTNAME>' SERVWATCH_DEVICETOKEN='****' sh

       

  3. If you return to the “Manage servers” page and the agent status is OK or UP, it is registered normally.

    スクリーンショット 2026-01-25 165241.png
    Check agent is properly installed.

Deploy an agent to docker container

To deploying the agent to the docker container, set the container start option as follows.

(example:Launch centos7 image with privileged mode)

docker run -it -d --privileged --name centos7 centos:centos7 /sbin/init


Uninstalling an agent

Uninstalling a Servwatch agent

systemctl stop servwatch systemctl disable servwatch rm /etc/systemd/system/servwatch.service systemctl daemon-reload systemctl reset-failed rm -rf /opt/servwatch-agent





© 2014-2022 SENSINICS,LLC