---
title: Checks and statistics
project: Flow
version: 11.1
section: components
language: en
license: MIT
url: https://totaljs.es/docs/flow/11-1/components/checks-and-statistics/
updated: 2026-11-20T06:50:57.962Z
---

# Checks and statistics

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

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](/flow/11-1/guides/download-components/).

## API

### checkfreespace.html · version 1

Type: `component`

Checks the free space on a disk.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `warning` | `Number` | no | `10000` | Minimal free space. |

**Inputs:** `input` (Test).  
**Outputs:** `error` (Error).

This component checks a freespace on HDD.

### checklog.html · version 1

Type: `component`

Reads new lines of a log file and reports the ones that contain your keywords.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `/var/log/auth.log` | A path to the log file. |
| `error` | `String` | no | `Log error: {0}` | Error message. |
| `keywords` | `String` | no | `Error, error, ERROR` | Keywords. |
| `remember` | `Boolean` | no | `true` | Remember file position. |

**Inputs:** `input` (Test).  
**Outputs:** `error` (Error).

This component checks a file and tries to find a

### checkpg.html · version 1

Type: `component`

Checks the connection to a PostgreSQL database.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `connection` | `String` | no | `postgresql://user:pass@hostname:5432/database` | Connection string. |
| `sql` | `String` | no | `SELECT 1` | SQL statement. |
| `error` | `String` | no | `PostgreSQL error: {0}` | Error message format. |

**Inputs:** `input` (Test).  
**Outputs:** `error` (Error).

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

This component checks PostgreSQL database connection.

### checkurl.html · version 1

Type: `component`

Checks that a URL address responds.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | no | `https://www.totaljs.com` | URL address. |
| `error` | `String` | no | `URL error: {0}` | Error message format. |

**Inputs:** `input` (Test).  
**Outputs:** `error` (Error).

This component checks URL address.

### csvdataset.html · version 2

Type: `component`

Stores incoming data as a CSV dataset in the private folder.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | no |  | Name. |
| `unit` | `String` | no |  | Unit. |
| `icon` | `String` | no |  | Icon. |
| `color` | `String` | no |  | Color. |
| `decimals` | `Number` | no | `2` | Decimals. |
| `type` | `String` | no | `daily` | Type. One of: `lastvalue` (Last value only), `logger` (Logger), `hourly` (Hourly), `daily` (Daily), `weekly` (Weeekly), `monthly` (Monthly), `yearly` (Yearly). |
| `sum` | `Number` | no | `0` | Calculate the sum. One of: `0` (Disabled), `1` (Periodical sum), `2` (Total sum). |
| `hours` | `Number` | no | `48` | Hours. |
| `days` | `Number` | no | `12` | Days. |
| `months` | `Number` | no | `12` | Months. |
| `years` | `Number` | no | `6` | Years. |

**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__:

```js
{
	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`

### duration.html · version 1

Type: `component`

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__:

```js
{
	min: Number,
	max: Number,
	avg: Number,
	last: Number,
	count: Number
}
```

### measuretime.html · version 1

Type: `component`

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.

### norepeat.html · version 1

Type: `component`

Stops the same content from being sent again within a short time.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `expire` | `Number` | no | `1` | Expire in minutes. |

**Inputs:** `input` (Input).  
**Outputs:** `output` (Output).

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

### nvidiasmi.html · version 1

Type: `component`

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.

### stopwatch.html · version 3

Type: `component`

Measures the time taken to create and send a message.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | no | `Stopwatch` | Name. |
| `delay` | `Number` | no | `1000` | Idle time delay (milliseconds). |

**Inputs:** `input` (Counter).  
**Outputs:** none.

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