Retention and storage
PlantBeat stores measurements, alarms, data records and the diagnostic buffer on the device itself. You set how long they are kept in the "Data retention" card. The "Data storage" page shows how full the storage is. Only an administrator can change either of them.
Data retention
You find the card under "Settings", section "Data", card Data retention.
| Field | Default | Meaning |
|---|---|---|
| Retention (days, 0 = unlimited) | 30 | Measurements in the history. Values with their own retention period follow that period, see Statistics per value. |
| Keep alarms (days, 0 = unlimited) | 90 | Alarm history. Unconfirmed faults are never deleted. |
| Upper limit of log rows (0 = none) | 20,000 | Emergency brake for the alarm history. Unconfirmed faults are always kept. If the upper limit takes effect, this is reported in the log. |
| Keep data records (days, 0 = unlimited) | 730 | Production data records. Can be overridden per source or model. |
| Diagnostic buffer: upper limit of entries per connection (0 = none) | 0 | By default, the diagnostic buffer is never deleted. With an upper limit, only the newest entries per connection are kept. |
A changed retention period applies as soon as you leave the field. If you shorten a period or lower an upper limit, PlantBeat asks first and tells you what will be deleted. Deleted data cannot be restored.
If the stored retention settings ever become unreadable, PlantBeat stops deleting anything and says so in the card. Check the retention periods and save them again with Save retention periods.
PlantBeat cleans up automatically every hour. With Clean up now you clean up the measurements immediately and return the space to the file system.
Warning
0 means: nothing is ever deleted. If the disk is full, PlantBeat stops storing and no longer acknowledges data records to the machine. The machine then waits instead of losing data records. With "unlimited", you have to make sure there is free space yourself. For data records, 0 is therefore only accepted if you also check Keep unlimited — I will take care of free space myself.
Note
A shorter retention period only affects the future. Deleted data records do not free up disk space. The file stays as large as it was and takes the next data records into the freed space.
"Data storage" page
The "Data storage" page ("Where measurements are stored") shows:
- Active target: where the measurements are stored. By default "Local" on the device.
- Used: how much space is used.
- Storage headroom: when the storage will probably be full if recording stays the same ("expected to be full on").
- Dropped measurements (buffer overflow): measurements that PlantBeat could not store fast enough. If there is a number here, reduce the interval or the number of values.
The configuration always stays local on the device, even if you store the measurements elsewhere.
Store measurements on a database server
Instead of storing them locally, PlantBeat can store the measurements in a database on a server run by your IT. The selection on the page shows which databases are supported.
- On the "Data storage" page, click Change storage target….
- Choose the database and enter Host, Port, Database, User name and Password.
- Choose the Transport security (next section).
- Click Test connection.
- Click Switch & migrate data. PlantBeat transfers the existing measurements to the server. A restart is required afterwards. Until then, PlantBeat keeps recording locally.
Caution
PlantBeat does not measure the space on a server. If it runs full, the machine backs up without warning. Agree on monitoring with your IT.
Transport security
From version 1.11, new targets connect encrypted and verify the certificate of the database server.
| Setting | When |
|---|---|
| Encrypted, certificate verified (recommended) | The server has a certificate that the device trusts. |
| Encrypted, own certificate (PEM) | The server has a certificate from your own certificate authority. You paste the certificate in PEM format. |
| Encrypted, certificate NOT verified (exception) | Only as an exception, for example for a test. |
Targets that were set up before the update to 1.11 behave as before ("As before the update (server not verified)") and show a notice. Switch them to a verified connection. For the active target, use Apply transport security: PlantBeat then changes only the transport security, without migrating data, and first tests the connection with the stored password. The new transport security applies after the restart.