mirror of
https://github.com/hassio-addons/addon-glances.git
synced 2025-05-04 19:11:23 +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_
|
||||
|
||||
### 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`
|
||||
|
||||
---
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
"ssl": "bool",
|
||||
"certfile": "str",
|
||||
"keyfile": "str",
|
||||
"history_size": "int?",
|
||||
"influxdb": {
|
||||
"enabled": "bool",
|
||||
"host": "str",
|
||||
|
|
|
@ -17,6 +17,13 @@ else
|
|||
cp /etc/glances.conf /config/glances/
|
||||
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
|
||||
if bashio::config.true 'influxdb.enabled'; then
|
||||
protocol='http'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue