Getting Started

Getting Started

Start server monitoring simply with Servwatch!

This section describes the procedure for adding a monitored server to Servwatch, viewing metric values, and receiving alert notifications.

Glossary

Servwatch uses the following terms:

  • Device: Represents a monitored server. Servwatch recognizes the server host name as the device ID.

  • Agent: An agent program that runs on the monitored server. Communicates with the Servwatch cloud using the MQTT protocol.

  • Channel: A data store (metric store) that stores metric values (such as CPU load and service status) sent from the server via the agent. Channels must be created manually and tied to the device.

  • Event: A function that sets a threshold for metrics and notifies alerts. You can set an event for all the metric values that Servwatch collects.

1.Loggin in Console

Log in to the management console with the account information provided in your email when you sign up online.

  • Free plan: You can monitor up to 3 devices (servers)

  • Pro plan: You can monitor up to 40 devices (servers)

2. Create a new device(server)

Servwatch manages the server as a "device".

From the console, click "Server"-> "Register New Server" to go to the creation page.

Follow the steps in "Automatic registration (usually select this)" to deploy the agent.

Deploy server agent
  1. Check your server must support systemctl before installing the agent. Follow the agent procedure for details. Please refer:Server Agent

  2. Execute the script string 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. When 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. When manually setting the host name

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

       

  3. You can check if the agent is installed correctly with the following command: journalctl -u servwatch -f

  4. Finally, return to the server management page and wait for a minute, the agent status is N/A and metrics is NO_MAP, it is registered normally.

    Agent successfully installed
  5. Proceed to the next step (creating a new channel).

Do not include symbols such as. * ~ / In the host name.

3. Create a new channel

Create a new channel to store the metric values sent by the agent.

  1. From the console, click "Channel"-> "New Registration" to go to the creation page.

  2. After setting the channel ID to an integer value of 0 or more and the Name to the server name, click the "Create" button to complete the creation.

    スクリーンショット 2025-10-03 14.01.56.png
    Create a new channel
  3. Click "Channel" from the left navigation and confirm that the channel has been created.

4. Map a channel to device

Map the channel created in step 3 to the device.

From the console, click "Server"-> the device name registered in step 1 to go to the device edit page.

Edit device


Set the following:

  • Description: Enter the name and role of the server in a descriptive name.

  • Disabled: The device automatically registered by the agent is false in the initial state, so enable it as true.

  • Metrics: Assign the channels created in step 3 to the device.

  • Click the "Save" button to complete the device settings.

After about 3 minute, the metric values (server resource monitoring values and process monitoring values) will be accumulated in the mapped channel.

5. Check metrics

Click "Metrics" from the console to go to the metrics page, you can check the metrics.

The types of metrics are as follows:

  • CPU Load(%)

  • Memory (used/total bytes)

  • Disk usage(used%)

  • Network I/O(tx/rx bytes per sec)

スクリーンショット 2025-10-03 14.06.26.png
Metrics
  • Metrics: Select the channel you want to check.

  • Range: Specify any time.

  • Reset: Resets the display range. (1hour / 6hour / 12hour / 1day)

6. Add an event(alert)

Now you can add the monitored server to Servwatch and collect the metrics.

Create an event to set a threshold on the metric value and notify you of an alert.

Click "Event->" New Registration "from the console to go to the event creation page.

Click the "Create" button when the settings are complete

スクリーンショット 2025-10-03 14.04.37.png
Add an event

Set the following:

  • Configuration

    • Description: Set the name of the event (eg sshd is down !!). This setting is embedded in the body of the email notification.

    • Metric: Specify the metric channel you want to monitor.

    • Enabled: Set to true. If the event is disabled, the notification operation will not be performed.

  • Condition

    • Metrics: Enter the metrics for the monitored item. You can also select and enter from the auto-completed list.

      The metrics can be specified as follows.

      Example: Choose metrics of “cpu:user”
      • cpu:* CPU related metrics

      • mem:* Memory related metrics

      • disk:* Disk related metrics

      • network:* Network related metrics

      • service:* Service(Process) check metrics

    • IF:Specifies a conditional expression that contains a threshold for the metric.

    • THEN:Specify the action when the conditional expression is satisfied.

  • Notification email address setting

    • From the console, click the "Settings" navigation to go to the admin page.

      スクリーンショット 2025-09-24 16.45.49.png
      • Set the notification destination email address in Alert notification destination 1. Optionally, you can add additional address in Alert notification destination 2

      • Set the notification destination Slack’s incoming webhook URL in Slack webhook URL.

      • Click "Save" to complete the settings.

  • Sample slack notification are below:

    スクリーンショット 2025-10-03 14.50.23.png
    Sample event notification

7. Enable dead notification

After completing all the steps, start the server alive monitoring by enabling the monitoring of the agent (Servwatch agent) running on the server.

Once you have enabled agent monitoring, you do not have to do it every time you add a server.

  1. Go to the "Administrator Page" from the "Settings" navigation on the console.

  2. Set “Others”-> “Agent settings” → Dead Notification to true.

    スクリーンショット 2025-10-03 13.45.59.png
  3. Click "Change settings" to complete the settings.

  4. If the Keepalive communication between the agent and Servwatch is disconnected, the email address set in step 6 will be notified.

Keepalive is done by the MQTT protocol. Alert notifications may occur even when the server has not been restarted due to a network path problem. In that case, set "Disconnection notification" to "false".

Agent monitoring notifications will be sent to email and Slack (if configured).

  1. Follow these steps to test the dead notification:

    1. In target server, type systemctl stop servwatch to stop agent.

    2. To start agent, type systemctl start servwatch

    3. Check notify.(eg. Slack)

      スクリーンショット 2025-10-03 13.35.57.png
      Sample dead notification

8. Add a processs monitoring

  1. To add a service monitor, add the monitored service to the agent settings file on the monitored server and restart the agent.

  • Navigate to the location of the configuration file.

    • cd /opt/servwatch-agent/config
  • Edit configuration file

    • vim default.json
  • Add the service name (example: httpd) you want to monitor in the following places.

    • { "device_id":"hostname", "user_id":"U000***", "device_token":"************************", "watch_service": "httpd" // List the services you want to monitor, separated by commas. }
  • Restarting the agent

    • systemctl restart servwatch

2. The metric "service: <service name>" is now available in the condition settings when creating the event. The event threshold can be set as OK for operational and NG for critical state.

  • Click "Event->" New Registration "from the console to go to the event creation page.

    Click the "Create" button when the settings are complete.Below is an example of adding a httpd service monitor as service:httpd.

    • Description: The name of the event. This will be noticeable in the Slack notification, so be thoughtful.

    • Metrics: Specify the service name you configured in the previous step. In this case,set as service:httpd

    • IF: Specify the conditions under which the alert will fire. Specify NG when the process is down, and OK when it is up.

    • THEN: Specify the notification destination for the alert.

      • email: Sent to your email

      • slack: Sent to Slack

      • both: Sent to email and Slack

スクリーンショット 2025-10-03 13.19.59.png
Add service monitoring event
  • Sample slack alert is below:

スクリーンショット 2025-10-03 14.51.33.png
Sample service down alert

 

9. Using the API

Servwatch uses the IoT platform "ThingScale" to collect server metrics.

By operating the REST API of "ThingScale", it is possible to set the bulk of the server and import the metric value into the original system.

Please refer to the following for specific usage.

API Reference (V2.0.0)

 

 







© 2014-2022 SENSINICS,LLC