Class TrafficCounterService

java.lang.Object
org.graylog2.system.traffic.TrafficCounterService

public class TrafficCounterService extends Object
  • Constructor Details

  • 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) when includeToday false, otherwise then the end of the previous day will be used.