Initial commit

This commit is contained in:
2019-08-13 15:26:01 -04:00
commit 210d032703
8 changed files with 429 additions and 0 deletions

18
monitoring.py Normal file
View File

@@ -0,0 +1,18 @@
from influxdb import InfluxDBClient
client = InfluxDBClient("localhost", 8086, "root", "root", "chan_feed")
def init():
db_exists = False
for db in client.get_list_database():
if db["name"] == "chan_feed":
db_exists = True
break
if not db_exists:
client.create_database("chan_feed")
def log(event):
client.write_points(event)