mirror of
https://github.com/hassio-addons/addon-glances.git
synced 2025-05-05 03:21:36 +00:00
🔨Add optional configuration for history_size
This commit is contained in:
parent
dbe6d21d70
commit
aef593030f
3 changed files with 13 additions and 0 deletions
|
@ -120,6 +120,11 @@ The private key file to use for SSL.
|
||||||
|
|
||||||
**Note**: _The file MUST be stored in `/ssl/`, which is the default_
|
**Note**: _The file MUST be stored in `/ssl/`, which is the default_
|
||||||
|
|
||||||
|
### Option: `history_size`
|
||||||
|
|
||||||
|
If specified changes the time Glances will retain data. Default if not set is
|
||||||
|
28800: 1 day with 1 point every 3 seconds.
|
||||||
|
|
||||||
### Option group `influxdb`
|
### Option group `influxdb`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
"ssl": "bool",
|
"ssl": "bool",
|
||||||
"certfile": "str",
|
"certfile": "str",
|
||||||
"keyfile": "str",
|
"keyfile": "str",
|
||||||
|
"history_size": "int?",
|
||||||
"influxdb": {
|
"influxdb": {
|
||||||
"enabled": "bool",
|
"enabled": "bool",
|
||||||
"host": "str",
|
"host": "str",
|
||||||
|
|
|
@ -17,6 +17,13 @@ else
|
||||||
cp /etc/glances.conf /config/glances/
|
cp /etc/glances.conf /config/glances/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set History Size
|
||||||
|
history_size=28800
|
||||||
|
if bashio::config.exists 'history_size'; then
|
||||||
|
history_size=$(bashio::config 'history_size')
|
||||||
|
fi
|
||||||
|
sed -i "s#history_size=28800#history_size=${history_size}#g" /etc/glances.conf
|
||||||
|
|
||||||
# Export Glances data to InfluxDB
|
# Export Glances data to InfluxDB
|
||||||
if bashio::config.true 'influxdb.enabled'; then
|
if bashio::config.true 'influxdb.enabled'; then
|
||||||
protocol='http'
|
protocol='http'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue