Alerting Config
Configs: main | alerting | metrics | oauth | probes | rds | servers | surfacer | targets | tlsconfig | utils | validators
|
Language: |
cloudprober.alerting.AlertConf #
# Name of the alert. Default is to use the probe name. If you have multiple # alerts for the same probe, you must specify a name for each alert.name: <string># Condition for the alert. Default is to alert on any failure. # Example: # # Alert if 6 out of 10 probes fail. # condition { # failures: 6 # total: 10 # }condition: <cloudprober.alerting.Condition># How to notify in case of alert.notify: <cloudprober.alerting.NotifyConfig># Dashboard URL template. # Default: http://localhost:9313/status?probe=@probe@dashboard_url_template: <string> playbook_url_template: <string># Default: Cloudprober alert "@alert@" for "@target@"summary_template: <string># Default: # Cloudprober alert "@alert@" for "@target@": # Failures: @failures@ out of @total@ probes # Failing since: @since@ # Probe: @probe@ # Dashboard: @dashboard_url@ # Playbook: @playbook_url@details_template: <string># Key values to be included in the alert. These fields are expanded # using the same template expansion rules as summary_template and # details_template (see above).other_info: <cloudprober.alerting.AlertConf.OtherInfoEntry> severity: (UNKNOWN_SEVERITY|CRITICAL|ERROR|WARNING|INFO): <enum># How often to repeat notification for the same alert. Default is 1hr. # To disable any kind of notification throttling, set this to 0.repeat_interval_sec: <int32>
cloudprober.alerting.AlertConf.OtherInfoEntry #
key: <string> value: <string>
cloudprober.alerting.Condition #
failures: <int32> total: <int32>
cloudprober.alerting.Email #
# Email addresses to send the alert to.to: <string># From address in the alert email. # If not set, defaults to the value of smtp_user if smtp_user is set, # otherwise defaults to cloudprober-alert@<hostname>.from: <string># Default: Environment variable SMTP_SERVERsmtp_server: <string># Default: Environment variable SMTP_USERNAMEsmtp_username: <string># Default: Environment variable SMTP_PASSWORDsmtp_password: <string>
cloudprober.alerting.NotifyConfig #
# Command to run when alert is fired. You can use this command to do # various things, e.g.: # - Send a notification using a method not supported by Cloudprober. # - Collect more information, e.g. send mtr report on ping failures. # - Attempt fix the issue, e.g. restart a pod or clear cache. # # In the command line following fields are substituted: # @alert@: Alert name # @probe@: Probe name # @target@: Target name, or target and port if port is specified. # @target.label.<label>@: Label <label> value, e.g. target.label.role. # @failures@: Count of failures. # @total@: Out of. # @since@: Time since the alert condition started. # @json@: JSON representation of the alert fields. # # For example, if you want to send an email when an alert is fired, you can # use the following command: # command: "/usr/bin/mail -s 'Alert @alert@ fired for @target@' [email protected]"command: <string># Email notification configuration.email: <cloudprober.alerting.Email># PagerDuty configuration.pager_duty: <cloudprober.alerting.PagerDuty># Slack configuration.slack: <cloudprober.alerting.Slack># Opsgenie configuration.opsgenie: <cloudprober.alerting.Opsgenie># Notify using an HTTP request. HTTP request fields are expanded using the # same template expansion rules as "command" above: # For example, to send a notification using rest API: # http_notify { # url: "http://localhost:8080/alert" # method: POST # header { # key: "Authorization" # value: "Bearer {{env 'AUTH_TOKEN'}}" # } # data: "{\"message\": \"@alert@ fired for @target@\", \"details\": \"name\"}" # }http_notify: <cloudprober.utils.httpreq.HTTPRequest>
cloudprober.alerting.Opsgenie #
# API key to access Opsgenie. It's usually tied to a team and is # obtained by creating a new API integration or using an existing one.api_key: <string># Environment variable name Default: OPSGENIE_API_KEYapi_key_env_var: <string># Opsgenie responders. Opsgenie uses the responders to route the alerts if # API key doesn't belong to a team integration. # Example: # responders { # id: "4513b7ea-3b91-438f-b7e4-e3e54af9147c" # type: TEAM # }responders: <cloudprober.alerting.Opsgenie.Responder># Opsgenie API URL. # Default: https://api.opsgenie.com/v2/alertsapi_url: <string># Whether to send resolve notifications or not. Default is to send resolve # notifications.disable_send_resolved: <bool>
cloudprober.alerting.Opsgenie.Responder #
[id <string> | name <string>]: <oneof> type: (UNKNOWN_RESPONDER|USER|TEAM|ESCALATION|SCHEDULE): <enum>
cloudprober.alerting.PagerDuty #
# PagerDuty Routing Key. # The routing key is used to authenticate to PagerDuty and is tied to a # service. You can obtain the routing key from the service page, under the # integrations tab. # Note: set either routing_key or routing_key_env_var. routing_key # takes precedence over routing_key_env_var.routing_key: <string># The environment variable containing the pagerduty routing key. # Default: PAGERDUTY_ROUTING_KEY;routing_key_env_var: <string># PagerDuty API URL. # Used to overwrite the default PagerDuty API URL.api_url: <string># Whether to send resolve notifications or not. Default is to send resolve # notifications.disable_send_resolved: <bool>
cloudprober.alerting.Slack #
# Webhook URL # The Slack notifications use a webhook URL to send the notifications to # a Slack channel. The webhook URL can be found in the Slack console under # the "Incoming Webhooks" section. # https://api.slack.com/messaging/webhooks # Note: set either webhook_url or webhook_url_env_var. webhook_url # takes precedence over webhook_url_env_var.webhook_url: <string># The environment variable that is used to contain the slack webhook URL.webhook_url_env_var: <string>
cloudprober.alerting.AlertConf #
# Name of the alert. Default is to use the probe name. If you have multiple # alerts for the same probe, you must specify a name for each alert.name: <string># Condition for the alert. Default is to alert on any failure. # Example: # # Alert if 6 out of 10 probes fail. # condition { # failures: 6 # total: 10 # }condition: <cloudprober.alerting.Condition># How to notify in case of alert.notify: <cloudprober.alerting.NotifyConfig># Dashboard URL template. # Default: http://localhost:9313/status?probe=@probe@dashboard_url_template: <string> playbook_url_template: <string># Default: Cloudprober alert "@alert@" for "@target@"summary_template: <string># Default: # Cloudprober alert "@alert@" for "@target@": # Failures: @failures@ out of @total@ probes # Failing since: @since@ # Probe: @probe@ # Dashboard: @dashboard_url@ # Playbook: @playbook_url@details_template: <string># Key values to be included in the alert. These fields are expanded # using the same template expansion rules as summary_template and # details_template (see above).other_info: <cloudprober.alerting.AlertConf.OtherInfoEntry> severity: (UNKNOWN_SEVERITY|CRITICAL|ERROR|WARNING|INFO): <enum># How often to repeat notification for the same alert. Default is 1hr. # To disable any kind of notification throttling, set this to 0.repeat_interval_sec: <int32>
cloudprober.alerting.AlertConf.OtherInfoEntry #
key: <string> value: <string>
cloudprober.alerting.Condition #
failures: <int32> total: <int32>
cloudprober.alerting.Email #
# Email addresses to send the alert to.to: <string># From address in the alert email. # If not set, defaults to the value of smtp_user if smtp_user is set, # otherwise defaults to cloudprober-alert@<hostname>.from: <string># Default: Environment variable SMTP_SERVERsmtp_server: <string># Default: Environment variable SMTP_USERNAMEsmtp_username: <string># Default: Environment variable SMTP_PASSWORDsmtp_password: <string>
cloudprober.alerting.NotifyConfig #
# Command to run when alert is fired. You can use this command to do # various things, e.g.: # - Send a notification using a method not supported by Cloudprober. # - Collect more information, e.g. send mtr report on ping failures. # - Attempt fix the issue, e.g. restart a pod or clear cache. # # In the command line following fields are substituted: # @alert@: Alert name # @probe@: Probe name # @target@: Target name, or target and port if port is specified. # @target.label.<label>@: Label <label> value, e.g. target.label.role. # @failures@: Count of failures. # @total@: Out of. # @since@: Time since the alert condition started. # @json@: JSON representation of the alert fields. # # For example, if you want to send an email when an alert is fired, you can # use the following command: # command: "/usr/bin/mail -s 'Alert @alert@ fired for @target@' [email protected]"command: <string># Email notification configuration.email: <cloudprober.alerting.Email># PagerDuty configuration.pager_duty: <cloudprober.alerting.PagerDuty># Slack configuration.slack: <cloudprober.alerting.Slack># Opsgenie configuration.opsgenie: <cloudprober.alerting.Opsgenie># Notify using an HTTP request. HTTP request fields are expanded using the # same template expansion rules as "command" above: # For example, to send a notification using rest API: # http_notify { # url: "http://localhost:8080/alert" # method: POST # header { # key: "Authorization" # value: "Bearer {{env 'AUTH_TOKEN'}}" # } # data: "{\"message\": \"@alert@ fired for @target@\", \"details\": \"name\"}" # }http_notify: <cloudprober.utils.httpreq.HTTPRequest>
cloudprober.alerting.Opsgenie #
# API key to access Opsgenie. It's usually tied to a team and is # obtained by creating a new API integration or using an existing one.api_key: <string># Environment variable name Default: OPSGENIE_API_KEYapi_key_env_var: <string># Opsgenie responders. Opsgenie uses the responders to route the alerts if # API key doesn't belong to a team integration. # Example: # responders { # id: "4513b7ea-3b91-438f-b7e4-e3e54af9147c" # type: TEAM # }responders: <cloudprober.alerting.Opsgenie.Responder># Opsgenie API URL. # Default: https://api.opsgenie.com/v2/alertsapi_url: <string># Whether to send resolve notifications or not. Default is to send resolve # notifications.disable_send_resolved: <bool>
cloudprober.alerting.Opsgenie.Responder #
[id <string> | name <string>]: <oneof> type: (UNKNOWN_RESPONDER|USER|TEAM|ESCALATION|SCHEDULE): <enum>
cloudprober.alerting.PagerDuty #
# PagerDuty Routing Key. # The routing key is used to authenticate to PagerDuty and is tied to a # service. You can obtain the routing key from the service page, under the # integrations tab. # Note: set either routing_key or routing_key_env_var. routing_key # takes precedence over routing_key_env_var.routing_key: <string># The environment variable containing the pagerduty routing key. # Default: PAGERDUTY_ROUTING_KEY;routing_key_env_var: <string># PagerDuty API URL. # Used to overwrite the default PagerDuty API URL.api_url: <string># Whether to send resolve notifications or not. Default is to send resolve # notifications.disable_send_resolved: <bool>
cloudprober.alerting.Slack #
# Webhook URL # The Slack notifications use a webhook URL to send the notifications to # a Slack channel. The webhook URL can be found in the Slack console under # the "Incoming Webhooks" section. # https://api.slack.com/messaging/webhooks # Note: set either webhook_url or webhook_url_env_var. webhook_url # takes precedence over webhook_url_env_var.webhook_url: <string># The environment variable that is used to contain the slack webhook URL.webhook_url_env_var: <string>