Browse code

FEATBL-444 Feat: set influxdb's retention policy to 7d

qvigand authored on 11/06/2018 08:58:54
Showing 1 changed files
... ...
@@ -59,6 +59,8 @@ public class InfluxTagHandler extends DefaultServerHook {
59 59
 			logger.error("Error copying file : {}", e);
60 60
 			return;
61 61
 		}
62
+		serverApi.submit(itemValue.uid,
63
+				"/usr/bin/influx -execute 'alter retention policy autogen on telegraf duration 7d;'");
62 64
 		List<ItemValue<Server>> allServers = serverApi.allComplete();
63 65
 		for (ItemValue<Server> srvItem : allServers) {
64 66
 			try {