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

# Controlli e statistiche

> Componenti che controllano il tuo server e i tuoi servizi e misurano i tuoi messaggi.

Componenti che controllano il tuo server e i tuoi servizi e misurano i tuoi messaggi. Questa pagina contiene i gruppi del catalogo **Checks**, **Stats**, **Linux**, **Dashboard**.

Ogni voce elenca gli ingressi e le uscite del componente, le sue impostazioni principali e il testo del suo readme. Per aggiungere un componente a un FlowStream, consulta [Scaricare i componenti](/flow/11-1/guides/download-components/).

## API

### checkfreespace.html · version 1

Type: `component`

Controlla lo spazio libero su un disco.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `warning` | `Number` | no | `10000` | Spazio libero minimo. |

**Ingressi:** `input` (Test).  
**Uscite:** `error` (Error).

Questo componente controlla lo spazio libero sul disco.

### checklog.html · version 1

Type: `component`

Legge le nuove righe di un file di log e segnala quelle che contengono le tue parole chiave.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `path` | `String` | no | `/var/log/auth.log` | Percorso del file di log. |
| `error` | `String` | no | `Log error: {0}` | Messaggio di errore. |
| `keywords` | `String` | no | `Error, error, ERROR` | Parole chiave. |
| `remember` | `Boolean` | no | `true` | Ricorda la posizione nel file. |

**Ingressi:** `input` (Test).  
**Uscite:** `error` (Error).

Questo componente controlla un file e prova a trovare un

### checkpg.html · version 1

Type: `component`

Controlla la connessione a un database PostgreSQL.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `connection` | `String` | no | `postgresql://user:pass@hostname:5432/database` | Stringa di connessione. |
| `sql` | `String` | no | `SELECT 1` | Istruzione SQL. |
| `error` | `String` | no | `PostgreSQL error: {0}` | Formato del messaggio di errore. |

**Ingressi:** `input` (Test).  
**Uscite:** `error` (Error).

Flow installa il pacchetto npm `querybuilderpg` quando aggiungi il componente.

Questo componente controlla la connessione al database PostgreSQL.

### checkurl.html · version 1

Type: `component`

Controlla che un indirizzo URL risponda.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `String` | no | `https://www.totaljs.com` | Indirizzo URL. |
| `error` | `String` | no | `URL error: {0}` | Formato del messaggio di errore. |

**Ingressi:** `input` (Test).  
**Uscite:** `error` (Error).

Questo componente controlla un indirizzo URL.

### csvdataset.html · version 2

Type: `component`

Salva i dati in arrivo come dataset CSV nella cartella privata.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | no |  | Nome. |
| `unit` | `String` | no |  | Unità. |
| `icon` | `String` | no |  | Icona. |
| `color` | `String` | no |  | Colore. |
| `decimals` | `Number` | no | `2` | Decimali. |
| `type` | `String` | no | `daily` | Tipo. Uno tra: `lastvalue` (Last value only), `logger` (Logger), `hourly` (Hourly), `daily` (Daily), `weekly` (Weeekly), `monthly` (Monthly), `yearly` (Yearly). |
| `sum` | `Number` | no | `0` | Calcola la somma. Uno tra: `0` (Disabled), `1` (Periodical sum), `2` (Total sum). |
| `hours` | `Number` | no | `48` | Ore. |
| `days` | `Number` | no | `12` | Giorni. |
| `months` | `Number` | no | `12` | Mesi. |
| `years` | `Number` | no | `6` | Anni. |

**Ingressi:** `input` (Value), `live` (Live stats), `stats` (Stats).  
**Uscite:** `stats` (Output).

Il componente salva i dati come dataset CSV, per esempio per l'applicazione Dashboard. Il dataset viene salvato nel percorso `/private/`, accessibile con il token di accesso di Flow.

Il file CSV contiene solo i valori elaborati (in base al periodo) e il file `.meta` contiene i metadati + l'ultimo valore.

__Ingresso per l'elaborazione dei dati__:

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

**Colonne CSV**

- `a` = `key {String}`
- `b` = `value {Number}`
- `c` = `min {Number}`
- `d` = `max {Number}`
- `e` = `sum {Number}`
- `f` = `count {Number}`
- `g` = `tshour {Number}`nel formato `yyyyMMddhh`
- `h` = `tsday {Number}` nel formato `yyyyMMdd`
- `i` = `tsweek {Number}` nel formato `yyyyww`
- `j` = `tsmonth {Number}` nel formato `yyyyMM`
- `k` = `tsyear {Number}` nel formato `yyyy`

### duration.html · version 1

Type: `component`

Misura quanto tempo impiegano i messaggi ad attraversare il FlowStream.

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Stats).

Il componente conta la durata del messaggio. Tutti i valori tranne il conteggio sono espressi in secondi. Metti questo componente alla fine del flusso.

__Uscita__:

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

### measuretime.html · version 1

Type: `component`

Misura il tempo impiegato per creare e inviare un messaggio.

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output).

Questo componente misura il tempo impiegato per creare e inviare un messaggio.

### norepeat.html · version 1

Type: `component`

Impedisce che lo stesso contenuto venga inviato di nuovo entro poco tempo.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `expire` | `Number` | no | `1` | Scadenza in minuti. |

**Ingressi:** `input` (Input).  
**Uscite:** `output` (Output).

Questo componente impedisce che lo stesso contenuto venga inviato di nuovo in poco tempo.

### nvidiasmi.html · version 1

Type: `component`

Raccoglie a intervalli regolari le statistiche delle GPU NVIDIA.

**Ingressi:** nessuno.  
**Uscite:** `output` (Stats).

Un FlowStream può contenere un solo nodo di questo componente.

Questo componente raccoglie periodicamente le statistiche dell'hardware.

### stopwatch.html · version 3

Type: `component`

Misura il tempo impiegato per creare e inviare un messaggio.

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | `String` | no | `Stopwatch` | Nome. |
| `delay` | `Number` | no | `1000` | Ritardo di inattività (millisecondi). |

**Ingressi:** `input` (Counter).  
**Uscite:** nessuna.

Questo componente misura il tempo impiegato per creare e inviare un messaggio.
