Spanish Total.js
English
Documentation For AI agents
Contents

Checks and statistics

Components that check your server and services and measure your messages.

.md GitHub
On this page

Components that check your server and services and measure your messages. This page holds the catalogue groups Checks, Stats, Linux, Dashboard.

Each entry lists the inputs and outputs of the component, its main settings and the text of its readme. To add a component to a FlowStream, see Download components.

API

component

checkfreespace.html · version 1

Checks the free space on a disk.
ParameterTypeDescription
warning? Number Minimal free space. Default: 10000

Inputs: input (Test).

Outputs: error (Error).

This component checks a freespace on HDD.

component

checklog.html · version 1

Reads new lines of a log file and reports the ones that contain your keywords.
ParameterTypeDescription
path? String A path to the log file. Default: /var/log/auth.log
error? String Error message. Default: Log error: {0}
keywords? String Keywords. Default: Error, error, ERROR
remember? Boolean Remember file position. Default: true

Inputs: input (Test).

Outputs: error (Error).

This component checks a file and tries to find a

component

checkpg.html · version 1

Checks the connection to a PostgreSQL database.
ParameterTypeDescription
connection? String Connection string. Default: postgresql://user:pass@hostname:5432/database
sql? String SQL statement. Default: SELECT 1
error? String Error message format. Default: PostgreSQL error: {0}

Inputs: input (Test).

Outputs: error (Error).

Flow installs the npm package querybuilderpg when you add the component.

This component checks PostgreSQL database connection.

component

checkurl.html · version 1

Checks that a URL address responds.
ParameterTypeDescription
url? String URL address. Default: https://www.totaljs.com
error? String Error message format. Default: URL error: {0}

Inputs: input (Test).

Outputs: error (Error).

This component checks URL address.

component

csvdataset.html · version 2

Stores incoming data as a CSV dataset in the private folder.
ParameterTypeDescription
name? String Name.
unit? String Unit.
icon? String Icon.
color? String Color.
decimals? Number Decimals. Default: 2
type? String Type. One of: lastvalue (Last value only), logger (Logger), hourly (Hourly), daily (Daily), weekly (Weeekly), monthly (Monthly), yearly (Yearly). Default: daily
sum? Number Calculate the sum. One of: 0 (Disabled), 1 (Periodical sum), 2 (Total sum). Default: 0
hours? Number Hours. Default: 48
days? Number Days. Default: 12
months? Number Months. Default: 12
years? Number Years. Default: 6

Inputs: input (Value), live (Live stats), stats (Stats).

Outputs: stats (Output).

The component stores data as CSV Dataset for e.g. Dashboard application. Dataset is stored in /private/ path that is available with the help of the Flow access token.

CSV file contains only processed values (according to the period) and the .meta file contains meta data + last value.

Input for data processing:

{
    key: String,    // optional, e.g. device_id | device_name
    value: Number   // measured value
}

CSV columns

  • a = key {String}
  • b = value {Number}
  • c = min {Number}
  • d = max {Number}
  • e = sum {Number}
  • f = count {Number}
  • g = tshour {Number}in the form yyyyMMddhh
  • h = tsday {Number} in the form yyyyMMdd
  • i = tsweek {Number} in the form yyyyww
  • j = tsmonth {Number} in the form yyyyMM
  • k = tsyear {Number} in the form yyyy
component

duration.html · version 1

Measures how long messages take to pass through the FlowStream.

Inputs: input (Input).

Outputs: output (Stats).

The component counts the duration of the message. All values except count are defined in seconds. Place this component at the end of the flow.

Output:

{
    min: Number,
    max: Number,
    avg: Number,
    last: Number,
    count: Number
}
component

measuretime.html · version 1

Measures the time taken to create and send a message.

Inputs: input (Input).

Outputs: output (Output).

This component measures the time taken to create and send a message.

component

norepeat.html · version 1

Stops the same content from being sent again within a short time.
ParameterTypeDescription
expire? Number Expire in minutes. Default: 1

Inputs: input (Input).

Outputs: output (Output).

This component prevents the same content from being sent again in a short amount of time.

component

nvidiasmi.html · version 1

Collects NVIDIA GPU statistics at regular intervals.

Inputs: none.

Outputs: output (Stats).

A FlowStream can hold only one node of this component.

This component periodically collects hardware statistics.

component

stopwatch.html · version 3

Measures the time taken to create and send a message.
ParameterTypeDescription
name? String Name. Default: Stopwatch
delay? Number Idle time delay (milliseconds). Default: 1000

Inputs: input (Counter).

Outputs: none.

This component measures the time taken to create and send a message.

Made in Europe