Package org.graylog2.system.traffic
Class TrafficCounterService
java.lang.Object
org.graylog2.system.traffic.TrafficCounterService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Constructor Summary
ConstructorsConstructorDescriptionTrafficCounterService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper) -
Method Summary
Modifier and TypeMethodDescriptionclusterTrafficOfLastDays(org.joda.time.Duration daysToIncludeDuration, TrafficCounterService.Interval interval) Method included for backwards compatibility in pre-5.0 Graylog versions.clusterTrafficOfLastDays(org.joda.time.Duration daysToIncludeDuration, TrafficCounterService.Interval interval, boolean includeToday) Queries traffic for the specified duration.voidupdateTraffic(org.joda.time.DateTime observationTime, NodeId nodeId, long inLastMinute, long outLastMinute, long decodedLastMinute)
-
Constructor Details
-
TrafficCounterService
@Inject public TrafficCounterService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper)
-
-
Method Details
-
updateTraffic
public void updateTraffic(org.joda.time.DateTime observationTime, NodeId nodeId, long inLastMinute, long outLastMinute, long decodedLastMinute) -
clusterTrafficOfLastDays
public TrafficCounterService.TrafficHistogram clusterTrafficOfLastDays(org.joda.time.Duration daysToIncludeDuration, TrafficCounterService.Interval interval) Method included for backwards compatibility in pre-5.0 Graylog versions. -
clusterTrafficOfLastDays
public TrafficCounterService.TrafficHistogram clusterTrafficOfLastDays(org.joda.time.Duration daysToIncludeDuration, TrafficCounterService.Interval interval, boolean includeToday) Queries traffic for the specified duration.
The from-date is considered to be the start of the day that the duration intersects with in the past. For example, if a duration of 1.5 days is specified, then traffic starting from the beginning of two days ago will be returned.
The to-date is considered to be the current date/time (now) whenincludeTodayfalse, otherwise then the end of the previous day will be used.
-