Host monitoring for STEM: CPU temperature, network latency and nightly system updates.
system-chain watches the machine STEM runs on and the Linux servers around it. It warns when the host CPU gets too hot, measures the network latency and updates configured servers every night. Other plugins (for example web-api) read the latest values from it.
| Module | Interval | What it does |
|---|---|---|
| Temperature | every 20 seconds | Runs a command via SSH, takes the hottest value and raises information blocks at 95, 98 and 100 °C |
| Network | every 10 seconds | Runs a ping command via SSH and stores the average round trip time |
| System update | daily at 02:30 | Runs the STEM script update_linux-system for every configured server |
- Information blocks (display + user notification) for high CPU temperature and failed updates
SystemUpdateEvent(exitCode, hostname, port)is fired after every server update- Every module can be switched off separately
| Requirement | Version |
|---|---|
| STEM | 1.2.0 or newer (stem-api) |
| Plugins | none |
- Build the plugin with
mvn clean package(or take the build from Jenkins). - Copy
target/system-chain.jarinto thepluginsfolder of STEM. - Start STEM once to create the configuration files in
plugins/system-chain/. - Adjust the configuration and restart STEM (plugins are only loaded at startup).
| Key | Default | Description |
|---|---|---|
module.temperature |
true |
Enable the CPU temperature module |
module.network |
true |
Enable the network latency module |
module.update |
true |
Enable the nightly system update |
SSH target and command used to read the CPU temperatures. Every output line that contains a number is treated as one temperature value, the highest one is used. Example:
hostname: 10.0.0.1
username: stem
port: 22
command: "sensors | grep Core | awk '{print $3}'"SSH target and ping command. The average is read from the ping summary line
(rtt min/avg/max/mdev = 1.2/2.3/3.4/0.1 ms). Example:
hostname: 10.0.0.1
username: stem
port: 22
command: "ping -c 3 1.1.1.1 | tail -1"Servers that are updated every night at 02:30. Example:
systems:
webserver:
hostname: 10.0.0.20
port: 22
nas:
hostname: 10.0.0.30
port: 2222| Method | Description |
|---|---|
NetworkScheduler.getLastPing() |
Average ping in ms, -1 if the last measurement failed |
TemperatureScheduler.getHottestCore() |
Hottest CPU value of the last measurement in °C |
| Event | Fired when |
|---|---|
SystemUpdateEvent |
an update of a configured server finished |
Copyright (c) MirraNET, Niklas Linz. Licensed under the GNU Lesser General Public License v3.0.
