Server Monitoring Client

Track system metrics from Thinger.io Platform

The Linux Monitoring Client is a software module based on the Thinger.io Linux Client that tracks various system metrics and publishes them to the Thinger.io Platform, enabling the monitoring of individual servers, embedded Linux devices, or entire fleets.

Resource Tracking

The client tracks different metrics for System Information as well as for six different types of resources: general system information, CPU, system memory, network interfaces, filesystem mount points, and I/O drives.

Apart from uploading the resource information to Thinger.io Platform, the resources can be queried directly to the client or from the local server running the client at http://localhost:7890/monitor.

General System Information

There is some system information that can be relevant from a server administration standpoint.

Currently, the metrics the client is retrieving are:

  • Hostname.

  • Uptime.

  • OS version.

  • Quantity of normal and security updates (Ubuntu server).

  • If a reboot is required to apply updates (Ubuntu server).

CPU

To evaluate the performance of the CPU, these metrics are tracked:

  • Number of cores.

  • CPU usage.

  • CPU load for 1m, 5m and 15m.

System Memory (RAM)

As having reliable information about the system memory used is vital for capacity planning and maintaining the integrity of the servers, these metrics are collected:

  • Total, used and available memory capacity.

  • Memory usage.

  • Total, used and available swap memory capacity.

  • Swap memory usage.

Network Interfaces

For each network interface, the following is tracked:

  • Internal/Private IP.

  • Incoming and Outgoing network speed.

  • Incoming and Outgoing total network transfer.

It will also retrieve the public IP of the server.

Filesystem Mount Points

Each filesystem corresponds to one partition of a drive, from which it will track:

  • Capacity.

  • Capacity free.

  • Capacity used.

  • Capacity usage (percentage).

I/O Drives

To provide insight on how a server is performing, these I/O drive metrics are monitored:

  • Input and Output operation speed.

  • Disk usage.

Configuration

The basic device configuration is tracked over a JSON file located on the server. Additional configurations are tracked through the device properties to allow live configuration changes through the Thinger.io Platform.

Basic device configuration

The configuration will be auto-created on first launch when it is auto-provisioned.

The file structure is:

{
  "device": {
    "credentials": "<device_credentials>",
    "id": "<device_id>",
    "name": "<device_name>"
  },
  "server": {
    "ssl": true,
    "url": "<server_to_connect_url",
    "user": "<thinger.io_account>"
  }
}

If launched with root, the default path for the configuration file is: /etc/thinger_io/monitor/app.json

If launched with non-root, the default path for the configuration file is: /home/<user>/.config/thinger_io

Configuration properties

As mentioned before, the configuration for the resources will be in the device properties.

It contains five sections:

  • defaults: a boolean value indicating whether the name of the first element of each resource will have a default name instead of the resource name. Useful when tracking different devices with one dashboard.

  • interfaces: JSON array with the names of the network interfaces to track.

  • filesystems: JSON array with the mount point of the partitions to track.

  • drives: JSON array with the Linux devices to track.

  • server: Object containing the host IP to listen on and the port to launch the local server.

Here is an example resources property value:

{
  "defaults": true,
    "drives": [
      "xvda"
    ],
    "filesystems": [
      "/"
    ],
    "interfaces": [
      "eth0"
    ],
    "server": {
      "host": "0.0.0.0",
      "port": 7890
    }
}

First Launch

This module has the feature to auto-provision the device in the Thinger.io Platform, but also allows for inputting a configuration if it's already provisioned.

It is also capable of creating a system service so the monitor is always running regarding if the server has been rebooted.

With auto provision

Download the installation script from the last software release, and run the software as:

./install_thinger_monitor.sh -t '<create_device token>'

For update and reboot abilities, it needs to be run with the root user

Without auto-provision

If the device is already provisioned, we will need to set the user id, device id and credentials in the configuration file and launch the software as:

./thinger_monitor [-c <config file path>]

Last updated

Was this helpful?