Class AlarmPromQLCriteria

    • Method Detail

      • query

        public final String query()

        The PromQL query that the alarm evaluates. The query must return a result of vector type. Each entry in the vector result represents an alarm contributor.

        Returns:
        The PromQL query that the alarm evaluates. The query must return a result of vector type. Each entry in the vector result represents an alarm contributor.
      • pendingPeriod

        public final Integer pendingPeriod()

        The duration, in seconds, that a contributor must be continuously breaching before it transitions to the ALARM state.

        Returns:
        The duration, in seconds, that a contributor must be continuously breaching before it transitions to the ALARM state.
      • recoveryPeriod

        public final Integer recoveryPeriod()

        The duration, in seconds, that a contributor must continuously not be breaching before it transitions back to the OK state.

        Returns:
        The duration, in seconds, that a contributor must continuously not be breaching before it transitions back to the OK state.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)