mirror of
https://github.com/kemko/keenetic-grafana-monitoring.git
synced 2026-01-01 15:45:43 +03:00
Disable drop db
This commit is contained in:
committed by
Vitaliy Skrypnyk
parent
fb446b6829
commit
74109908c4
@@ -12,7 +12,6 @@ class InfuxWritter(object):
|
||||
def init_database(self):
|
||||
print("Connecting to InfluxDB: " + self._configuration['host'])
|
||||
db_name = self._configuration['db']
|
||||
self._client.drop_database(db_name)
|
||||
|
||||
if db_name not in self._client.get_list_database():
|
||||
print("Creating InfluxDB database: " + db_name)
|
||||
|
||||
@@ -104,6 +104,8 @@ if __name__ == '__main__':
|
||||
print("Configuring metric: " + metric_configuration['command'])
|
||||
collectors.append(KeeneticCollector(infuxdb_writter, endpoint, metric_configuration))
|
||||
|
||||
print("Configuration done. Start collecting with interval: " + str(configuration['interval_sec']) + " sec")
|
||||
|
||||
while True:
|
||||
for collector in collectors: collector.collect()
|
||||
time.sleep(configuration['interval_sec'])
|
||||
|
||||
Reference in New Issue
Block a user