package builder

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. builder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package custom
  2. package yaml

Type Members

  1. trait AlertConfig extends AnyRef
  2. case class AlertConfigBuilder(serviceName: String, handlers: 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[Option[String]] with Product with Serializable
  3. sealed trait AlertSeverity extends AnyRef

    An enumeration of sorts that encapsulates all the possible alert severities supported by alert-config

  4. sealed trait AlertType extends AnyRef
  5. sealed trait AlertingPlatform extends AnyRef
  6. case class AverageCPUThreshold(count: Int = Int.MaxValue, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    count

    The average percentage CPU used by all instances of your microservice

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  7. trait Builder[T] extends AnyRef
  8. case class ContainerKillThreshold(count: Int = Int.MaxValue, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    count

    The number of container kills to alert on

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  9. sealed trait Environment extends AnyRef
  10. case class EnvironmentAlertBuilder(handlerName: String, command: Option[JsValue] = None, enabledEnvironments: Map[Environment, Set[Severity]] = Map((Environment.Production, Set(Severity.Ok, Severity.Warning, Severity.Critical))), customEnvironmentNames: Map[Environment, String] = Map((Environment.Production, "aws_production")), handlerFilters: Map[Environment, JsValue] = Map((Environment.Production, JsString("occurrences")))) extends Product with Serializable
  11. case class ErrorsLoggedThreshold(count: Int = Int.MaxValue, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable
  12. case class ExceptionThreshold(count: Int = 2, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    count

    The number of exceptions thrown that this alert will trigger on

    severity

    Whether to raise the alert as critical or warning

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  13. case class Http5xxPercentThreshold(percentage: Double = 100.0, minimumHttp5xxCountThreshold: Int = 0, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    percentage

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

    minimumHttp5xxCountThreshold

    The minimum count of 5xxs that must be present for the percentThreshold check to kick in. Useful if, for example, you don't want to alert on just a one-off 5xx in the middle of the night. Only supported on Grafana-based alerts.

    severity

    Whether to raise the alert as critical or warning

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  14. case class Http5xxThreshold(count: Int = Int.MaxValue, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    count

    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 platform this alert will target. We are migrating towards Grafana and away from Sensu

  15. case class Http90PercentileResponseTimeThreshold(warning: Option[Int], critical: Option[Int], timePeriod: Int = 15, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    One or both of warning and critical must be given.

    warning

    The response time in millisecond above which a warning level alert will be raised

    critical

    The response time in millisecond above which a critical level alert will be raised

    timePeriod

    How far back to consider in minutes. Default is 15 minutes. Range: 1 - 15 (inclusive)

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  16. case class HttpAbsolutePercentSplitDownstreamHodThreshold(percentThreshold: Double = 100.0, crossOver: Int = 0, absoluteThreshold: Int = Int.MaxValue, hysteresis: Double = 1.0, excludeSpikes: Int = 0, errorFilter: String = "status:>498", target: String = "", severity: AlertSeverity = AlertSeverity.Critical) extends Product with Serializable
  17. case class HttpAbsolutePercentSplitDownstreamServiceThreshold(percentThreshold: Double = 100.0, crossOver: Int = 0, absoluteThreshold: Int = Int.MaxValue, hysteresis: Double = 1.0, excludeSpikes: Int = 0, errorFilter: String = "status:>498", target: String = "", severity: AlertSeverity = AlertSeverity.Critical) extends Product with Serializable
  18. case class HttpAbsolutePercentSplitThreshold(percentThreshold: Double = 100.0, crossOver: Int = 0, absoluteThreshold: Int = Int.MaxValue, hysteresis: Double = 1.0, excludeSpikes: Int = 0, errorFilter: String = "status:>498", severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable
  19. sealed trait HttpMethod extends AnyRef
  20. case class HttpStatusPercentThreshold(httpStatus: HTTP_STATUS, percentage: Double = 100.0, severity: AlertSeverity = AlertSeverity.Critical, httpMethod: HttpMethod = HttpMethod.All, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    httpStatus

    The http status code that this alert will trigger on (429, 499-504)

    percentage

    The percentage of all http responses with the given status code to alert on

    severity

    Whether to raise the alert as critical or warning

    httpMethod

    The http method to filter all requests by (one of All, Post, Get, Put, Delete)

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  21. case class HttpStatusThreshold(httpStatus: HTTP_STATUS, count: Int = 1, severity: AlertSeverity = AlertSeverity.Critical, httpMethod: HttpMethod = HttpMethod.All, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    httpStatus

    The http status code that this alert will trigger on (429, 499-504)

    count

    The number of http responses with the given status code to alert on

    severity

    Whether to raise the alert as critical or warning

    httpMethod

    The http method to filter all requests by (one of All, Post, Get, Put, Delete)

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  22. case class HttpTrafficThreshold(warning: Option[Int], critical: Option[Int], maxMinutesBelowThreshold: Int = 5, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    warning

    The number of http requests below which a warning level alert will be raised

    critical

    The number of http requests below which a critical level alert will be raised

    maxMinutesBelowThreshold

    The number of minutes over which the threshold breaching triggers an alert

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  23. case class LogMessageThreshold(message: String, count: Int, lessThanMode: Boolean = false, severity: AlertSeverity = AlertSeverity.Critical, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    By default we alert if the count of messages is >= threshold. If lessThanMode is set we alert if < threshold

    message

    The substring to search for in the log message

    count

    The threshold above which an alert will be raised

    lessThanMode

    If true, 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 platform this alert will target. We are migrating towards Grafana and away from Sensu

  24. class Logger extends AnyRef
  25. case class MetricsThreshold(name: String, query: String, warning: Option[Double] = None, critical: Option[Double] = None, invert: Boolean = false, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    One or both of warning and critical must be given.

    name

    A unique name to give this alert, which will be used as the name of the alert in PagerDuty

    query

    The metric path to use to trigger this alert

    warning

    The response time in millisecond above which a warning level alert will be raised

    critical

    The response time in millisecond above which a critical level alert will be raised

    invert

    Set to true to invert the threshold (trigger on below instead of above)

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

  26. sealed trait Severity extends AnyRef
  27. case class TeamAlertConfigBuilder(services: Seq[String], handlers: 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
  28. case class TotalHttpRequestThreshold(count: Int = Int.MaxValue, alertingPlatform: AlertingPlatform = AlertingPlatform.Default) extends Product with Serializable

    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.

    count

    The number of all http requests to alert on

    alertingPlatform

    The platform this alert will target. We are migrating towards Grafana and away from Sensu

Value Members

  1. val alertSeverityFormat: JsonFormat[AlertSeverity]
  2. implicit val alertingPlatformFormat: JsonFormat[AlertingPlatform]
  3. val httpMethodFormat: JsonFormat[HttpMethod]
  4. val httpStatusFormat: JsonFormat[HTTP_STATUS]
  5. object AlertSeverity
  6. object AlertType
  7. object AlertingPlatform

    Configuration object to select an alerting platform Defaults can be seen in GrafanaMigration

    Configuration object to select an alerting platform Defaults can be seen in GrafanaMigration

    See also

    GrafanaMigration.scala

  8. object AllEnvironmentAlertConfigBuilder
  9. object AppConfigValidator
  10. object Environment
  11. object ExceptionThresholdProtocol
  12. object GrafanaMigration

    This class determines which standard alerts go where in each environment.

    This class determines which standard alerts go where in each environment.

    This is so that the Telemetry team can safely migrate alerts gradually rather than "big bang"ing them out

  13. object Http5xxPercentThresholdProtocol
  14. object Http5xxThresholdProtocol
  15. object Http90PercentileResponseTimeThresholdProtocol
  16. object HttpAbsolutePercentSplitDownstreamHodThresholdProtocol
  17. object HttpAbsolutePercentSplitDownstreamServiceThresholdProtocol
  18. object HttpAbsolutePercentSplitThresholdProtocol
  19. object HttpMethod
  20. object HttpStatus
  21. object HttpStatusPercentThresholdProtocol
  22. object HttpStatusThresholdProtocol
  23. object HttpTrafficThresholdProtocol
  24. object LogMessageThresholdProtocol
  25. object MetricsThresholdProtocol extends DefaultJsonProtocol
  26. object ObjectScanner
  27. object Severity
  28. object TeamAlertConfigBuilder extends Serializable
  29. object ZoneToServiceDomainMapper

Inherited from AnyRef

Inherited from Any

Ungrouped