AlarmStateTransitionedEvent timestamp now in ms

This will ensure a unique timestamp. Influx V9 will only keep one
entry with the same timestamp

Change-Id: I9c59e3bf15e731c1f636418c0ffad90356010441
This commit is contained in:
Craig Bryant 2015-04-14 11:17:55 -06:00
parent 468dd8b031
commit 26225d6247
3 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ public class InfluxV8AlarmRepo extends InfluxAlarmRepo {
this.influxV8RepoWriter.logColValues(series[0]);
}
this.influxV8RepoWriter.write(TimeUnit.SECONDS, series);
this.influxV8RepoWriter.write(TimeUnit.MILLISECONDS, series);
}
}

View File

@ -82,7 +82,7 @@ public class InfluxV9AlarmRepo extends InfluxAlarmRepo {
valueMap.put("reason", event.stateChangeReason);
valueMap.put("reason_data", "{}");
DateTime dateTime = new DateTime(event.timestamp * 1000, DateTimeZone.UTC);
DateTime dateTime = new DateTime(event.timestamp, DateTimeZone.UTC);
String dateString = this.dateFormatter.print(dateTime);
Map<String, String> tags = new HashMap<>();

View File

@ -52,7 +52,7 @@ influxDbConfiguration:
# Version and retention policy must be set for V9. If no
# version set then defaults to V8.
# version can be (V8 | V9)
version: V8
version: V9
# Retention policy may be left blank to indicate default policy.
retentionPolicy:
# Used only if version is V9.