Switched from influx to victoria metrics (more light weight for pi)
This commit is contained in:
@@ -14,7 +14,7 @@ def cfg():
|
||||
'LATITUDE': float(os.getenv('LATITUDE', '0.0')),
|
||||
'LONGITUDE': float(os.getenv('LONGITUDE', '0.0')),
|
||||
'ALTITUDE': float(os.getenv('ALTITUDE', '0.0')),
|
||||
'VM_URL': os.getenv('VM_URL', 'http://localhost:8428'),
|
||||
'DB_HOST': os.getenv('DB_HOST', 'http://localhost:8428'),
|
||||
'GPS_PORT': os.getenv('GPS_PORT', '/dev/ttyS0'),
|
||||
'GPS_BAUD': int( os.getenv('GPS_BAUD', '9600')),
|
||||
'GAS_REFERENCE': int( os.getenv('GAS_REFERENCE', '250000')),
|
||||
@@ -46,7 +46,7 @@ def write(c, fields, collection='weather'):
|
||||
for k, v in fields.items() if v is not None
|
||||
)
|
||||
if not field_str: return
|
||||
requests.post(f"{c['VM_URL']}/write", data=f"{collection} {field_str}", timeout=2)
|
||||
requests.post(f"{c['DB_HOST']}/write", data=f"{collection} {field_str}", timeout=2)
|
||||
|
||||
# ── Helpers ───────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user