Class AlertEvent

java.lang.Object
org.acemq.rabbitmq.admin.alerts.AlertEvent

public final class AlertEvent extends Object
A rule that breached, and the measurement that breached it.

One per label combination, so a rule about queue depth produces one of these per deep queue rather than one for the broker. That is the difference between "something is backing up" and "orders.new is backing up", and it is the whole reason the detailed metrics endpoint is worth its cost.

  • Method Details

    • rule

      public AlertRule rule()
      Returns:
      the rule that fired
    • sample

      public MetricSample sample()
      Returns:
      the measurement that breached it
    • value

      public double value()
      Returns:
      the value observed
    • labels

      public Map<String,String> labels()
      Returns:
      which queue, connection or node this is about
    • queue

      public Optional<String> queue()
      Returns:
      the queue, when the metric was about one
    • observedAt

      public Instant observedAt()
      Returns:
      when the scrape this came from was taken
    • message

      public String message()
      Returns:
      a line fit for a log, a Slack message or a CLI: what fired, where, what the value was, and why it matters
    • toString

      public String toString()
      Overrides:
      toString in class Object