collector/config.py

97 lines
2.4 KiB
Python
Raw Normal View History

2020-04-14 22:49:22 +00:00
# Collect interval in seconds
2020-04-17 16:16:58 +00:00
DEFAULT_INTERVAL = 30
2020-04-14 22:49:22 +00:00
# Database URL, which defines connection settings.
#
# sqlite:///my_database.db
# will create a SqliteDatabase instance for the file my_database.db in the current directory.
#
# sqlite:///:memory:
# will create an in-memory SqliteDatabase instance.
#
# postgresql://postgres:my_password@localhost:5432/my_database
# will create a PostgresqlDatabase instance. A username and password are provided, as well as the host and port to connect to.
#
# mysql://user:passwd@ip:port/my_db
# will create a MySQLDatabase instance for the local MySQL database my_db.
#
# mysql+pool://user:passwd@ip:port/my_db?max_connections=20&stale_timeout=300
# will create a PooledMySQLDatabase instance for the local MySQL database my_db with max_connections set to 20 and a
# stale_timeout setting of 300 seconds.
2020-04-18 20:52:27 +00:00
DATABASE_URL = 'postgresql://system_metrics_collector:theMetrixWriteer2123@localhost:5432/system_metrics'
2020-04-14 22:49:22 +00:00
# Plugin configuration
### CPU
2020-04-17 16:16:58 +00:00
CPU_INTERVAL = DEFAULT_INTERVAL
2020-04-14 22:49:22 +00:00
# Store statistics per CPU, not only combined
CPU_PER_CPU = True
CPU_RETAIN_DAYS = 180
2020-04-14 22:49:22 +00:00
### Disk
2020-04-17 16:16:58 +00:00
DISK_USAGE_INTERVAL = DEFAULT_INTERVAL * 10
DISK_USAGE_RETAIN_DAYS = 365*50
2020-04-17 16:16:58 +00:00
DISK_IO_INTERVAL = DEFAULT_INTERVAL
DISK_IO_RETAIN_DAYS = 180
2020-04-17 16:16:58 +00:00
### Memory
MEMORY_INTERVAL = DEFAULT_INTERVAL
MEMORY_RETAIN_DAYS = 365 * 5
2020-04-17 16:16:58 +00:00
### Network
NETWORK_INTERVAL = DEFAULT_INTERVAL
NETWORK_RETAIN_DAYS = 180
2020-04-14 22:49:22 +00:00
### Temperatures
2020-04-17 16:16:58 +00:00
TEMPERATURE_INTERVAL = DEFAULT_INTERVAL
TEMPERATURE_RETAIN_DAYS = 365 * 5
2020-04-17 16:16:58 +00:00
2020-04-14 22:49:22 +00:00
# If true, fahrenheit is used, otherwise celsius
TEMPERATURE_USE_FAHRENHEIT = False
### Ping
# Ping hosts
2020-04-17 16:16:58 +00:00
PING_INTERVAL = 5 * 60 # every 5 min
2020-04-14 22:49:22 +00:00
PING_HOSTS = [
'10.0.0.1',
'192.168.0.1',
'1.1.1.1',
'google.com',
2020-04-18 20:52:27 +00:00
'bing.com',
'tibich.com'
2020-04-14 22:49:22 +00:00
]
PING_RETAIN_DAYS = 365 * 50
### Speedtest
SPEEDTEST_INTERVAL = 10 * 60 # every 10 min
SPEEDTEST_RETAIN_DAYS = 365 * 50
2020-04-17 16:16:58 +00:00
### Stocks
STOCKS_INTERVAL = 12 * 60 * 60 # updates daily
STOCKS_TICKERS = {
'MCRO.L' : 'Micro Focus International PLC',
'^GSPC' : 'S&P 500',
'^SPEUP' : 'S&P 350 Europe',
'^SPG1200' : 'S&P 1200 Global',
'^IXIC' : 'NASDAQ Composite',
'BTC-USD' : 'Bitcoin USD',
'ETH-USD' : 'Ethereum USD',
}
2020-04-15 20:29:29 +00:00
STOCKS_RETAIN_DAYS = 365 * 50
2020-04-15 20:29:29 +00:00
### ROBOR
# Romanian Interbank Offer Rate
2020-04-17 16:16:58 +00:00
ROBOR_INTERVAL = 12 * 60 * 60 # updates daily, every 12 hours should be fine
ROBOR_RETAIN_DAYS = 365 * 50
2020-04-17 16:16:58 +00:00
2020-04-15 20:29:29 +00:00
ROBOR_FIELDS = [
'ROBOR 6M'
]