case class TeamAlertConfigBuilder(services: Seq[String], integrations: Seq[String] = Seq("noop"), errorsLoggedThreshold: ErrorsLoggedThreshold = ErrorsLoggedThreshold(), exceptionThreshold: ExceptionThreshold = ExceptionThreshold(), http5xxThreshold: Http5xxThreshold = Http5xxThreshold(), http5xxPercentThreshold: Http5xxPercentThreshold = Http5xxPercentThreshold(100.0), http90PercentileResponseTimeThresholds: Seq[Http90PercentileResponseTimeThreshold] = Nil, httpAbsolutePercentSplitThresholds: Seq[HttpAbsolutePercentSplitThreshold] = Nil, httpAbsolutePercentSplitDownstreamServiceThresholds: Seq[HttpAbsolutePercentSplitDownstreamServiceThreshold] = Nil, httpAbsolutePercentSplitDownstreamHodThresholds: Seq[HttpAbsolutePercentSplitDownstreamHodThreshold] = Nil, containerKillThreshold: ContainerKillThreshold = ContainerKillThreshold(1), httpTrafficThresholds: Seq[HttpTrafficThreshold] = Nil, httpStatusThresholds: Seq[HttpStatusThreshold] = Nil, httpStatusPercentThresholds: Seq[HttpStatusPercentThreshold] = Nil, metricsThresholds: Seq[MetricsThreshold] = Nil, logMessageThresholds: Seq[LogMessageThreshold] = Nil, totalHttpRequestThreshold: TotalHttpRequestThreshold = TotalHttpRequestThreshold(), averageCPUThreshold: AverageCPUThreshold = AverageCPUThreshold(), platformService: Boolean = false) extends Builder[Seq[AlertConfigBuilder]] with Product with Serializable

Linear Supertypes
Serializable, Product, Equals, Builder[Seq[AlertConfigBuilder]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TeamAlertConfigBuilder
  2. Serializable
  3. Product
  4. Equals
  5. Builder
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TeamAlertConfigBuilder(services: Seq[String], integrations: Seq[String] = Seq("noop"), errorsLoggedThreshold: ErrorsLoggedThreshold = ErrorsLoggedThreshold(), exceptionThreshold: ExceptionThreshold = ExceptionThreshold(), http5xxThreshold: Http5xxThreshold = Http5xxThreshold(), http5xxPercentThreshold: Http5xxPercentThreshold = Http5xxPercentThreshold(100.0), http90PercentileResponseTimeThresholds: Seq[Http90PercentileResponseTimeThreshold] = Nil, httpAbsolutePercentSplitThresholds: Seq[HttpAbsolutePercentSplitThreshold] = Nil, httpAbsolutePercentSplitDownstreamServiceThresholds: Seq[HttpAbsolutePercentSplitDownstreamServiceThreshold] = Nil, httpAbsolutePercentSplitDownstreamHodThresholds: Seq[HttpAbsolutePercentSplitDownstreamHodThreshold] = Nil, containerKillThreshold: ContainerKillThreshold = ContainerKillThreshold(1), httpTrafficThresholds: Seq[HttpTrafficThreshold] = Nil, httpStatusThresholds: Seq[HttpStatusThreshold] = Nil, httpStatusPercentThresholds: Seq[HttpStatusPercentThreshold] = Nil, metricsThresholds: Seq[MetricsThreshold] = Nil, logMessageThresholds: Seq[LogMessageThreshold] = Nil, totalHttpRequestThreshold: TotalHttpRequestThreshold = TotalHttpRequestThreshold(), averageCPUThreshold: AverageCPUThreshold = AverageCPUThreshold(), platformService: Boolean = false)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val averageCPUThreshold: AverageCPUThreshold
  6. def build: Seq[AlertConfigBuilder]
    Definition Classes
    TeamAlertConfigBuilderBuilder
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. val containerKillThreshold: ContainerKillThreshold
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. val errorsLoggedThreshold: ErrorsLoggedThreshold
  11. val exceptionThreshold: ExceptionThreshold
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. val http5xxPercentThreshold: Http5xxPercentThreshold
  14. val http5xxThreshold: Http5xxThreshold
  15. val http90PercentileResponseTimeThresholds: Seq[Http90PercentileResponseTimeThreshold]
  16. val httpAbsolutePercentSplitDownstreamHodThresholds: Seq[HttpAbsolutePercentSplitDownstreamHodThreshold]
  17. val httpAbsolutePercentSplitDownstreamServiceThresholds: Seq[HttpAbsolutePercentSplitDownstreamServiceThreshold]
  18. val httpAbsolutePercentSplitThresholds: Seq[HttpAbsolutePercentSplitThreshold]
  19. val httpStatusPercentThresholds: Seq[HttpStatusPercentThreshold]
  20. val httpStatusThresholds: Seq[HttpStatusThreshold]
  21. val httpTrafficThresholds: Seq[HttpTrafficThreshold]
  22. val integrations: Seq[String]
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. val logMessageThresholds: Seq[LogMessageThreshold]
  25. val metricsThresholds: Seq[MetricsThreshold]
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  29. val platformService: Boolean
  30. def productElementNames: Iterator[String]
    Definition Classes
    Product
  31. val services: Seq[String]
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. val totalHttpRequestThreshold: TotalHttpRequestThreshold
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. def withAverageCPUThreshold(averageCPUThreshold: Int, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when the average CPU used by all instances of your microservice exceeds a given threshold within a 5-minute window.

    This alert will notify when the average CPU used by all instances of your microservice exceeds a given threshold within a 5-minute window.

    averageCPUThreshold

    The average percentage CPU used by all instances of your microservice

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    Example:
    1.  .withAverageCPUThreshold(50) # alert if average CPU usage across all microservice instances is above 50% for the last 15 minutes
         
      

  38. def withContainerKillThreshold(containerKillThreshold: Int, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    All microservices are deployed to MDTP inside docker containers.

    All microservices are deployed to MDTP inside docker containers. If the docker container runs out of memory then the container will be killed with an out-of-memory exception. This alert will notify when a specified number of containers are killed within a 15-minute window.

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    returns

     .withContainerKillThreshold(5) # alert if 5 microservice instances are killed with an out-of-memory exception in a 15-minute
      window  
    

  39. def withErrorsLoggedThreshold(errorsLoggedThreshold: Int, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when your microservice logs a specified number of logs at ERROR log level within a 15-minute window.

    This alert will notify when your microservice logs a specified number of logs at ERROR log level within a 15-minute window.

    errorsLoggedThreshold

    The number of logs at ERROR level that this alert will trigger on

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    Example:
    1.  .withErrorsLoggedThreshold(5) # alert when 5 logs at ERROR level are logged in a 15-minute window  
      

  40. def withExceptionThreshold(exceptionThreshold: Int, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when your microservice throws a specified number of exceptions, at log level ERROR, within a 15-minute window.

    This alert will notify when your microservice throws a specified number of exceptions, at log level ERROR, within a 15-minute window.

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    Example:
    1.  .withExceptionThreshold(count: Int, severity: AlertSeverity = AlertSeverity.Critical)  
      

  41. def withHttp5xxPercentThreshold(percentThreshold: Double, minimumHttp5xxCountThreshold: Int = 0, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when the percentage of http responses returning a 5xx http status code exceeds a given threshold within a 15-minute window.

    This alert will notify when the percentage of http responses returning a 5xx http status code exceeds a given threshold within a 15-minute window.

    This alert is enabled by default at 100%, but can be disabled by setting it to >100.

    percentThreshold

    The %age of requests that must be 5xx to trigger the alarm

    minimumHttp5xxCountThreshold

    The minimum count of 5xxs that must be present for the percentThreshold check to kick in. Optional. If you want to create a 5xxPercentThreshold alert but only if you have a given count of 5xxs, this is the method to use. You want to use this parameter if, for example, you don't want to alert on just a one-off 5xx in the middle of the night Defaults to 0, which would mean the parameter has no effect. Only applies in Grafana-based alerting, NOT supported on Sensu.

    severity

    How severe the alert is

    alertingPlatform

    Which platform to direct the alert to

    returns

    Configured threshold object

    Example:
    1.  .withHttp5xxPercentThreshold(25.0) # alert when 25% of all requests return a 5xx status code in a 15-minute window
        .withHttp5xxPercentThreshold(25.0, AlertSeverity.Warning) # raise a warning alert when 25% of all requests return a 5xx status code in a
        15-minute window .withHttp5xxPercentThreshold(25.0, 5, AlertSeverity.Warning) # raise a warning alert when 25% of all requests return a 5xx
        status code in a 15-minute window, where there are at least 5 total 5xx status codes observed in the time window  
      

  42. def withHttp5xxThreshold(http5xxThreshold: Int, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when the number of http responses returning a 5xx http status code exceeds a given threshold within a 15-minute window.

    This alert will notify when the number of http responses returning a 5xx http status code exceeds a given threshold within a 15-minute window.

    http5xxThreshold

    The number of all http responses with a 5xx status code to alert on

    severity

    Whether to raise the alert as critical or warning

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    Example:
    1.  .withHttp5xxThreshold(5) # alert when 5 requests return a 5xx status code in a 15-minute window .withHttp5xxThreshold(5,
        AlertSeverity.Warning) # raise a warning alert when 5 requests return a 5xx status code in a 15-minute window  
      

  43. def withHttp90PercentileResponseTimeThreshold(threshold: Http90PercentileResponseTimeThreshold): TeamAlertConfigBuilder

    This alert will notify you when the 90th Percentile request time goes above the defined thresholds for the time period specified by the user.

    This alert will notify you when the 90th Percentile request time goes above the defined thresholds for the time period specified by the user.

    threshold

    Object representing the response time in milliseconds above which alerts will be raised at given severities for a given time period

    Example:
    1.  .withHttp90PercentileResponseTimeThreshold(Http90PercentileResponseTimeThreshold(warning = Some(1000), critical = Some(2000),
        timePeriod = 7))  
      

  44. def withHttpAbsolutePercentSplitDownstreamHodThreshold(threshold: HttpAbsolutePercentSplitDownstreamHodThreshold): TeamAlertConfigBuilder
  45. def withHttpAbsolutePercentSplitDownstreamServiceThreshold(threshold: HttpAbsolutePercentSplitDownstreamServiceThreshold): TeamAlertConfigBuilder
  46. def withHttpAbsolutePercentSplitThreshold(threshold: HttpAbsolutePercentSplitThreshold): TeamAlertConfigBuilder

    Example:
    1.  .withHttpAbsolutePercentSplitThreshold(HttpAbsolutePercentSplitThreshold(100.0, Int.MaxValue, 40, 1.0, 2, "status:499"))  
      

  47. def withHttpStatusPercentThreshold(threshold: HttpStatusPercentThreshold): TeamAlertConfigBuilder

    This alert will notify when the percentage of http responses with a given http status code exceeds a given threshold within a 15-minute window.

    This alert will notify when the percentage of http responses with a given http status code exceeds a given threshold within a 15-minute window.

    returns

     .withHttpStatusPercentThreshold(HttpStatusPercentThreshold(HTTP_STATUS_404, 25.0)) # alert when 25% of all requests return status
      code 404 in a 15-minute window .withHttpStatusPercentThreshold(HttpStatusPercentThreshold(HTTP_STATUS_500, 25.0)) # alert when 25% of all
      requests return status code 500 in a 15-minute window .withHttpStatusPercentThreshold(HttpStatusPercentThreshold(HTTP_STATUS_504, 25.0,
      AlertSeverity.Warning, httpMethod.Post)) # raise a warning alert when 25% of all Post requests return status code 500 in a 15-minute window 
    

  48. def withHttpStatusThreshold(threshold: HttpStatusThreshold): TeamAlertConfigBuilder

    This alert will notify when your microservice returns a specified number of requests with a given http status code (between 400 and 599) within a 15-minute window.

    This alert will notify when your microservice returns a specified number of requests with a given http status code (between 400 and 599) within a 15-minute window.

    threshold

    Object with fields httpStatus, count, severity and httpMethod

    Example:
    1.  .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_500, 5)) # alert when 5 occurences of status code 500 in a 15-minute
        window .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS(501), 5)) # alert when 5 occurences of status code 501 in a 15-minute window
        .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_502, 5, AlertSeverity.Warning)) # raise a warning alert when 5 occurences of status
        code 502 in a 15-minute window .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_503, 5, AlertSeverity.Warning, httpMethod.Post)) #
        raise a warning alert when 5 occurences of Post requests with response status code 503 in a 15-minute window  
      

  49. def withHttpTrafficThreshold(threshold: HttpTrafficThreshold): TeamAlertConfigBuilder

    This alert will notify you when the total number of requests received by the microservice is below a certain threshold.

    This alert will notify you when the total number of requests received by the microservice is below a certain threshold.

    One or both of warning and critical must be given.

    Example:
    1.  .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_500, 5)) # alert when 5 occurences of status code 500 in a 15-minute
        window .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS(501), 5)) # alert when 5 occurences of status code 501 in a 15-minute window
        .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_502, 5, AlertSeverity.Warning)) # raise a warning alert when 5 occurences of status
        code 502 in a 15-minute window .withHttpStatusThreshold(HttpStatusThreshold(HTTP_STATUS_503, 5, AlertSeverity.Warning, httpMethod.Post)) #
        raise a warning alert when 5 occurences of Post requests with response status code 503 in a 15-minute window 
      

  50. def withIntegrations(integrations: String*): TeamAlertConfigBuilder

    Sets integrations for the configuration, e.g.

    Sets integrations for the configuration, e.g. .withIntegrations("dass-cyclone")

  51. def withLogMessageThreshold(message: String, threshold: Int, lessThanMode: Boolean = false, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when the count of a given log message is logged exceeds a given threshold within a 15-minute window.

    This alert will notify when the count of a given log message is logged exceeds a given threshold within a 15-minute window.

    message

    The substring to search for in the log message

    threshold

    The threshold above which an alert will be raised

    lessThanMode

    Flips the logic so that an alert is raised if less than the threshold amount is detected

    severity

    The severity to set for this check in PagerDuty

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    returns

     .withLogMessageThreshold("Custom logs", 5) // occurrences of a specific log message in a 15-minute window
      .withLogMessageThreshold("heartbeat", 4, lessThanMode=true) // triggers if a specific log message appears less than 4 times in a 15-minute
      window .withLogMessageThreshold("MY_LOG_MESSAGE", 10, severity = AlertSeverity.Warning) // Raise warning alert in PagerDuty after 10 logs
      containing `MY_LOG_MESSAGE` are detected .withLogMessageThreshold("MY_LOG_MESSAGE", 2, alertingPlatform = AlertingPlatform.Grafan) // Raise an
      alert through Grafana when a service generates two or more logs containing the specified MY_LOG_MESSAGE within a 15-minute timeframe. 
    

  52. def withMetricsThreshold(threshold: MetricsThreshold): TeamAlertConfigBuilder

    This alert will notify when a given metric query exceeds a given threshold within a 15-minute window.

    This alert will notify when a given metric query exceeds a given threshold within a 15-minute window.

    returns

     .withMetricsThreshold(MetricsThreshold(name = "address_lookup_failed_audit", query =
      "sumSeries(play.address-lookup.ecs*.audit.failure.count)", warning = Some(4), critical = Some(6))) .withMetricsThreshold(MetricsThreshold(name
      = "address_lookup_failed_reject_audit", query = "integral(sumSeries(play.address-lookup.ecs*.audit.{failure,reject.count))", critical =
      Some(10))) } 
    

  53. def withTotalHttpRequestThreshold(threshold: Int, alertingPlatform: AlertingPlatform = AlertingPlatform.Default): TeamAlertConfigBuilder

    This alert will notify when your microservice receives a given number of requests within a 15-minute window.

    This alert will notify when your microservice receives a given number of requests within a 15-minute window.

    threshold

    The number of all http requests to alert on

    alertingPlatform

    The that platform this alert should go to (Sensu or Grafana)

    returns

     .withTotalHttpRequestThreshold(1000) # alert when 1000 requests are received in a 15-minute window  
    

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def isPlatformService(platformService: Boolean): TeamAlertConfigBuilder

    In order to generate an alert for a service, alert-config expects an entry in app-config-$ENV for that service.

    In order to generate an alert for a service, alert-config expects an entry in app-config-$ENV for that service. However, since platform services don't have app-config entries by design, the creation of alerts for these services can be forced by adding .isPlatformService(true) to your configBuilder.

    platformService

    True if you are defining alerts for something that is NOT a standard microservice

    Deprecated

    Custom alerting coming soon!

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Builder[Seq[AlertConfigBuilder]]

Inherited from AnyRef

Inherited from Any

Ungrouped