package builder
- Alphabetic
- Public
- Protected
Type Members
- trait AlertConfig extends AnyRef
- case class AlertConfigBuilder(serviceName: String, integrations: Seq[String] = Nil, errorsLoggedThreshold: Option[ErrorsLoggedThreshold] = None, exceptionThreshold: Option[ExceptionThreshold] = Some(ExceptionThreshold(2)), http5xxThreshold: Option[Http5xxThreshold] = None, http5xxPercentThreshold: Option[Http5xxPercentThreshold] = Some(Http5xxPercentThreshold(100.0)), http90PercentileResponseTimeThresholds: Seq[Http90PercentileResponseTimeThreshold] = Nil, httpAbsolutePercentSplitThresholds: Seq[HttpAbsolutePercentSplitThreshold] = Nil, httpAbsolutePercentSplitDownstreamServiceThresholds: Seq[HttpAbsolutePercentSplitDownstreamServiceThreshold] = Nil, httpAbsolutePercentSplitDownstreamHodThresholds: Seq[HttpAbsolutePercentSplitDownstreamHodThreshold] = Nil, containerKillThreshold: Option[ContainerKillThreshold] = Some(ContainerKillThreshold(1)), httpTrafficThresholds: Seq[HttpTrafficThreshold] = Nil, httpStatusThresholds: Seq[HttpStatusThreshold] = Nil, httpStatusPercentThresholds: Seq[HttpStatusPercentThreshold] = Nil, metricsThresholds: Seq[MetricsThreshold] = Nil, logMessageThresholds: Seq[LogMessageThreshold] = Nil, totalHttpRequestThreshold: Option[TotalHttpRequestThreshold] = None, averageCPUThreshold: Option[AverageCPUThreshold] = None, platformService: Boolean = false) extends Product with Serializable
- sealed trait AlertSeverity extends AnyRef
An enumeration of sorts that encapsulates all the possible alert severities supported by alert-config
- case class AverageCPUThreshold(count: Int) 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
- case class ContainerKillThreshold(count: Int) 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
- sealed trait Environment extends AnyRef
- case class EnvironmentAlertBuilder(integrationName: String, command: Option[JsValue] = None, enabledEnvironments: Map[Environment, Set[Severity]] = Map(), customEnvironmentNames: Map[Environment, String] = Map(), integrationFilters: Map[Environment, JsValue] = Map()) extends Product with Serializable
- case class ErrorsLoggedThreshold(count: Int) extends Product with Serializable
- case class ExceptionThreshold(count: Int, severity: AlertSeverity = AlertSeverity.Critical) 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
- case class Http5xxPercentThreshold(percentage: Double, minimumHttp5xxCountThreshold: Int = 0, severity: AlertSeverity = AlertSeverity.Critical) 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.
- severity
Whether to raise the alert as critical or warning
- case class Http5xxThreshold(count: Int, severity: AlertSeverity = AlertSeverity.Critical) 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
- case class Http90PercentileResponseTimeThreshold(warning: Option[Int], critical: Option[Int], timePeriod: Int = 15) 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)
- 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
- 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
- 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) extends Product with Serializable
- sealed trait HttpMethod extends AnyRef
- case class HttpStatusPercentThreshold(httpStatus: HTTP_STATUS, percentage: Double = 100.0, severity: AlertSeverity = AlertSeverity.Critical, httpMethod: HttpMethod = HttpMethod.All) 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)
- case class HttpStatusThreshold(httpStatus: HTTP_STATUS, count: Int = 1, severity: AlertSeverity = AlertSeverity.Critical, httpMethod: HttpMethod = HttpMethod.All) 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)
- case class HttpTrafficThreshold(warning: Option[Int], critical: Option[Int], maxMinutesBelowThreshold: Int = 5) 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
- case class LogMessageThreshold(message: String, count: Int, lessThanMode: Boolean = false, severity: AlertSeverity = AlertSeverity.Critical) 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
- class Logger extends AnyRef
- case class MetricsThreshold(name: String, query: String, warning: Option[Double] = None, critical: Option[Double] = None, invert: Boolean = false) 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)
- sealed trait Severity extends AnyRef
- case class TeamAlertConfigBuilder(services: Seq[String], integrations: Seq[String] = Nil, errorsLoggedThreshold: Option[ErrorsLoggedThreshold] = None, exceptionThreshold: Option[ExceptionThreshold] = Some(ExceptionThreshold(2)), http5xxThreshold: Option[Http5xxThreshold] = None, http5xxPercentThreshold: Option[Http5xxPercentThreshold] = Some(Http5xxPercentThreshold(100.0)), http90PercentileResponseTimeThresholds: Seq[Http90PercentileResponseTimeThreshold] = Nil, httpAbsolutePercentSplitThresholds: Seq[HttpAbsolutePercentSplitThreshold] = Nil, httpAbsolutePercentSplitDownstreamServiceThresholds: Seq[HttpAbsolutePercentSplitDownstreamServiceThreshold] = Nil, httpAbsolutePercentSplitDownstreamHodThresholds: Seq[HttpAbsolutePercentSplitDownstreamHodThreshold] = Nil, containerKillThreshold: Option[ContainerKillThreshold] = Some(ContainerKillThreshold(1)), httpTrafficThresholds: Seq[HttpTrafficThreshold] = Nil, httpStatusThresholds: Seq[HttpStatusThreshold] = Nil, httpStatusPercentThresholds: Seq[HttpStatusPercentThreshold] = Nil, metricsThresholds: Seq[MetricsThreshold] = Nil, logMessageThresholds: Seq[LogMessageThreshold] = Nil, totalHttpRequestThreshold: Option[TotalHttpRequestThreshold] = None, averageCPUThreshold: Option[AverageCPUThreshold] = None, platformService: Boolean = false) extends Product with Serializable
- case class TotalHttpRequestThreshold(count: Int) 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
Value Members
- object AlertSeverity
- object AllEnvironmentAlertConfigBuilder
- object AppConfigValidator
- object Environment
- object HttpMethod
- object HttpStatus
- object ObjectScanner
- object Severity
- object TeamAlertConfigBuilder extends Serializable