2022-07-20 19:58:36 +02:00
package channels_config
2021-05-04 17:28:39 +05:30
2021-05-20 09:12:08 +01:00
import (
2022-12-08 11:49:27 -05:00
"os"
2023-02-03 11:36:49 -05:00
alertingOpsgenie "github.com/grafana/alerting/receivers/opsgenie"
alertingTemplates "github.com/grafana/alerting/templates"
2021-05-20 09:12:08 +01:00
)
2021-05-04 17:28:39 +05:30
// GetAvailableNotifiers returns the metadata of all the notification channels that can be configured.
2022-08-19 11:21:02 -05:00
func GetAvailableNotifiers ( ) [ ] * NotifierPlugin {
2022-12-08 11:49:27 -05:00
hostname , _ := os . Hostname ( )
2022-08-19 11:21:02 -05:00
pushoverSoundOptions := [ ] SelectOption {
2021-05-19 17:48:46 +03:00
{
Value : "default" ,
Label : "Default" ,
} ,
{
Value : "pushover" ,
Label : "Pushover" ,
} , {
Value : "bike" ,
Label : "Bike" ,
} , {
Value : "bugle" ,
Label : "Bugle" ,
} , {
Value : "cashregister" ,
Label : "Cashregister" ,
} , {
Value : "classical" ,
Label : "Classical" ,
} , {
Value : "cosmic" ,
Label : "Cosmic" ,
} , {
Value : "falling" ,
Label : "Falling" ,
} , {
Value : "gamelan" ,
Label : "Gamelan" ,
} , {
Value : "incoming" ,
Label : "Incoming" ,
} , {
Value : "intermission" ,
Label : "Intermission" ,
} , {
Value : "magic" ,
Label : "Magic" ,
} , {
Value : "mechanical" ,
Label : "Mechanical" ,
} , {
Value : "pianobar" ,
Label : "Pianobar" ,
} , {
Value : "siren" ,
Label : "Siren" ,
} , {
Value : "spacealarm" ,
Label : "Spacealarm" ,
} , {
Value : "tugboat" ,
Label : "Tugboat" ,
} , {
Value : "alien" ,
Label : "Alien" ,
} , {
Value : "climb" ,
Label : "Climb" ,
} , {
Value : "persistent" ,
Label : "Persistent" ,
} , {
Value : "echo" ,
Label : "Echo" ,
} , {
Value : "updown" ,
Label : "Updown" ,
} , {
Value : "none" ,
Label : "None" ,
} ,
}
2022-08-19 11:21:02 -05:00
pushoverPriorityOptions := [ ] SelectOption {
2021-05-19 17:48:46 +03:00
{
Value : "2" ,
Label : "Emergency" ,
} ,
{
Value : "1" ,
Label : "High" ,
} ,
{
Value : "0" ,
Label : "Normal" ,
} ,
{
Value : "-1" ,
Label : "Low" ,
} ,
{
Value : "-2" ,
Label : "Lowest" ,
} ,
}
2022-08-19 11:21:02 -05:00
return [ ] * NotifierPlugin {
2021-05-04 17:28:39 +05:30
{
Type : "dingding" ,
Name : "DingDing" ,
Description : "Sends HTTP POST request to DingDing" ,
Heading : "DingDing settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
2022-07-21 10:25:58 +01:00
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Placeholder : "https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx" ,
PropertyName : "url" ,
Required : true ,
} ,
{
Label : "Message Type" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-04 17:28:39 +05:30
PropertyName : "msgType" ,
2022-08-19 11:21:02 -05:00
SelectOptions : [ ] SelectOption {
2021-05-04 17:28:39 +05:30
{
Value : "link" ,
Label : "Link" } ,
{
Value : "actionCard" ,
Label : "ActionCard" ,
} ,
} ,
} ,
2022-10-27 16:16:36 +02:00
{ // New in 9.3.
Label : "Title" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated title of the message" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 16:16:36 +02:00
PropertyName : "title" ,
} ,
2021-05-04 17:28:39 +05:30
{ // New in 8.0.
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2022-10-27 16:16:36 +02:00
Description : "Custom DingDing message. You can use template variables." ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-04 17:28:39 +05:30
PropertyName : "message" ,
} ,
} ,
} ,
2021-05-19 23:32:09 +05:30
{
Type : "kafka" ,
Name : "Kafka REST Proxy" ,
Description : "Sends notifications to Kafka Rest Proxy" ,
Heading : "Kafka settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 23:32:09 +05:30
{
Label : "Kafka REST Proxy" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-01-14 04:15:43 +05:30
Description : "Hint: If you are directly using v3 APIs hosted on a Confluent Kafka Server, you must append /kafka to the URL here. Example: https://localhost:8082/kafka" ,
2021-05-19 23:32:09 +05:30
Placeholder : "http://localhost:8082" ,
PropertyName : "kafkaRestProxy" ,
Required : true ,
} ,
{
Label : "Topic" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 23:32:09 +05:30
Placeholder : "topic1" ,
PropertyName : "kafkaTopic" ,
Required : true ,
} ,
2023-01-14 04:15:43 +05:30
{
Label : "Username" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
PropertyName : "username" ,
Required : false ,
} ,
{
Label : "Password" ,
Element : ElementTypeInput ,
InputType : InputTypePassword ,
Description : "The password to use when making a call to the Kafka REST Proxy" ,
PropertyName : "password" ,
Required : false ,
Secure : true ,
} ,
{
Label : "API version" ,
Element : ElementTypeSelect ,
InputType : InputTypeText ,
Description : "The API version to use when contacting the Kafka REST Server. By default v2 will be used." ,
PropertyName : "apiVersion" ,
Required : false ,
SelectOptions : [ ] SelectOption {
{
Value : "v2" ,
Label : "v2" ,
} ,
{
Value : "v3" ,
Label : "v3" ,
} ,
} ,
} ,
{
Label : "Cluster ID" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "v3 APIs require a clusterID to be specified." ,
Placeholder : "lkc-abcde" ,
PropertyName : "kafkaClusterId" ,
Required : true ,
ShowWhen : ShowWhen {
Field : "apiVersion" ,
Is : "v3" ,
} ,
} ,
2022-10-27 15:25:54 +02:00
{
Label : "Description" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated description of the Kafka message" ,
PropertyName : "description" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 15:25:54 +02:00
} ,
{
Label : "Details" ,
Element : ElementTypeTextArea ,
Description : "Custom details to include with the message. You can use template variables." ,
PropertyName : "details" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-10-27 15:25:54 +02:00
} ,
2021-05-19 23:32:09 +05:30
} ,
} ,
2021-05-04 17:28:39 +05:30
{
Type : "email" ,
Name : "Email" ,
Description : "Sends notifications using Grafana server configured SMTP settings" ,
Heading : "Email settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
Label : "Single email" ,
Description : "Send a single email to all recipients" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeCheckbox ,
2021-05-04 17:28:39 +05:30
PropertyName : "singleEmail" ,
} ,
{
Label : "Addresses" ,
2023-05-10 05:44:17 -03:00
Description : "You can enter multiple email addresses using a \";\", \"\\n\" or \",\" separator" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2021-05-04 17:28:39 +05:30
PropertyName : "addresses" ,
Required : true ,
} ,
2021-05-17 16:05:09 +05:30
{ // New in 8.0.
Label : "Message" ,
2023-06-20 11:20:01 +01:00
Description : "Optional message. You can use templates to customize this field. Using a custom message will replace the default message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2021-05-17 16:05:09 +05:30
PropertyName : "message" ,
} ,
2022-05-30 11:55:34 -04:00
{ // New in 9.0.
Label : "Subject" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-06-20 11:20:01 +01:00
Description : "Optional subject. You can use templates to customize this field" ,
2022-05-30 11:55:34 -04:00
PropertyName : "subject" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-05-30 11:55:34 -04:00
} ,
2021-05-04 17:28:39 +05:30
} ,
} ,
{
Type : "pagerduty" ,
Name : "PagerDuty" ,
Description : "Sends notifications to PagerDuty" ,
Heading : "PagerDuty settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
Label : "Integration Key" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Placeholder : "Pagerduty Integration Key" ,
PropertyName : "integrationKey" ,
Required : true ,
Secure : true ,
} ,
{
2022-12-05 11:02:20 -05:00
Label : "Severity" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-03-29 10:35:01 -03:00
Placeholder : "critical" ,
Description : "Severity of the event. It must be critical, error, warning, info - otherwise, the default is set which is critical. You can use templates" ,
2021-05-04 17:28:39 +05:30
PropertyName : "severity" ,
} ,
{ // New in 8.0.
Label : "Class" ,
Description : "The class/type of the event, for example 'ping failure' or 'cpu load'" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
PropertyName : "class" ,
} ,
{ // New in 8.0.
Label : "Component" ,
Description : "Component of the source machine that is responsible for the event, for example mysql or eth0" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Placeholder : "Grafana" ,
PropertyName : "component" ,
} ,
{ // New in 8.0.
Label : "Group" ,
Description : "Logical grouping of components of a service, for example 'app-stack'" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
PropertyName : "group" ,
} ,
{ // New in 8.0.
Label : "Summary" ,
Description : "You can use templates for summary" ,
2022-10-27 16:20:10 +02:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2021-05-04 17:28:39 +05:30
PropertyName : "summary" ,
} ,
2022-12-08 11:49:27 -05:00
{ // New in 9.4.
Label : "Source" ,
Description : "The unique location of the affected system, preferably a hostname or FQDN. You can use templates" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : hostname ,
PropertyName : "source" ,
} ,
{ // New in 9.4.
Label : "Client" ,
Description : "The name of the monitoring client that is triggering this event. You can use templates" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "Grafana" ,
PropertyName : "client" ,
} ,
{ // New in 9.4.
Label : "Client URL" ,
Description : "The URL of the monitoring client that is triggering this event. You can use templates" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "{{ .ExternalURL }}" ,
PropertyName : "client_url" ,
} ,
2023-03-29 10:35:01 -03:00
{ // New in 9.5.
Label : "Details" ,
Description : "A set of arbitrary key/value pairs that provide further detail about the incident." ,
Element : ElementTypeKeyValueMap ,
InputType : InputTypeText ,
PropertyName : "details" ,
} ,
2021-05-04 17:28:39 +05:30
} ,
} ,
2021-05-19 23:22:14 +05:30
{
Type : "victorops" ,
Name : "VictorOps" ,
Description : "Sends notifications to VictorOps" ,
Heading : "VictorOps settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 23:22:14 +05:30
{
2022-07-21 10:25:58 +01:00
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 23:22:14 +05:30
Placeholder : "VictorOps url" ,
PropertyName : "url" ,
Required : true ,
} ,
{ // New in 8.0.
Label : "Message Type" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-19 23:22:14 +05:30
PropertyName : "messageType" ,
2022-08-19 11:21:02 -05:00
SelectOptions : [ ] SelectOption {
2021-05-19 23:22:14 +05:30
{
Value : "CRITICAL" ,
Label : "CRITICAL" } ,
{
Value : "WARNING" ,
Label : "WARNING" ,
} ,
} ,
} ,
2022-10-27 16:12:14 +02:00
{ // New in 9.3.
Label : "Title" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated title to display" ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 16:12:14 +02:00
} ,
{ // New in 9.3.
Label : "Description" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated description of the message" ,
PropertyName : "description" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-10-27 16:12:14 +02:00
} ,
2021-05-19 23:22:14 +05:30
} ,
} ,
2021-05-19 17:48:46 +03:00
{
Type : "pushover" ,
Name : "Pushover" ,
Description : "Sends HTTP POST request to the Pushover API" ,
Heading : "Pushover settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 17:48:46 +03:00
{
Label : "API Token" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 17:48:46 +03:00
Placeholder : "Application token" ,
PropertyName : "apiToken" ,
Required : true ,
Secure : true ,
} ,
{
Label : "User key(s)" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 17:48:46 +03:00
Placeholder : "comma-separated list" ,
PropertyName : "userKey" ,
Required : true ,
Secure : true ,
} ,
{
Label : "Device(s) (optional)" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 17:48:46 +03:00
Placeholder : "comma-separated list; leave empty to send to all devices" ,
PropertyName : "device" ,
} ,
{
Label : "Alerting priority" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-19 17:48:46 +03:00
SelectOptions : pushoverPriorityOptions ,
PropertyName : "priority" ,
} ,
{
Label : "OK priority" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-19 17:48:46 +03:00
SelectOptions : pushoverPriorityOptions ,
PropertyName : "okPriority" ,
} ,
{
Description : "How often (in seconds) the Pushover servers will send the same alerting or OK notification to the user." ,
Label : "Retry (Only used for Emergency Priority)" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 17:48:46 +03:00
Placeholder : "minimum 30 seconds" ,
PropertyName : "retry" ,
} ,
{
Description : "How many seconds the alerting or OK notification will continue to be retried." ,
Label : "Expire (Only used for Emergency Priority)" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 17:48:46 +03:00
Placeholder : "maximum 86400 seconds" ,
PropertyName : "expire" ,
} ,
{
Label : "Alerting sound" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-19 17:48:46 +03:00
SelectOptions : pushoverSoundOptions ,
PropertyName : "sound" ,
} ,
{
Label : "OK sound" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
2021-05-19 17:48:46 +03:00
SelectOptions : pushoverSoundOptions ,
PropertyName : "okSound" ,
} ,
2022-10-27 19:07:01 +02:00
{ // New in 9.3.
Label : "Title" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 19:07:01 +02:00
PropertyName : "title" ,
} ,
2021-05-19 17:48:46 +03:00
{ // New in 8.0.
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-19 17:48:46 +03:00
PropertyName : "message" ,
} ,
} ,
} ,
2021-05-04 17:28:39 +05:30
{
Type : "slack" ,
Name : "Slack" ,
Description : "Sends notifications to Slack" ,
Heading : "Slack settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
Label : "Recipient" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-10-27 13:58:37 -03:00
Description : "Specify channel, private group, or IM channel (can be an encoded ID or a name) - required unless you provide a webhook" ,
2021-05-04 17:28:39 +05:30
PropertyName : "recipient" ,
2022-02-25 15:10:21 +01:00
Required : true ,
2022-04-20 09:40:57 +02:00
DependsOn : "url" ,
2021-05-04 17:28:39 +05:30
} ,
// Logically, this field should be required when not using a webhook, since the Slack API needs a token.
// However, since the UI doesn't allow to say that a field is required or not depending on another field,
// we've gone with the compromise of making this field optional and instead return a validation error
// if it's necessary and missing.
{
Label : "Token" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Provide a Slack API token (starts with \"xoxb\") - required unless you provide a webhook" ,
PropertyName : "token" ,
Secure : true ,
2022-02-25 15:10:21 +01:00
Required : true ,
2022-04-20 09:40:57 +02:00
DependsOn : "url" ,
2021-05-04 17:28:39 +05:30
} ,
{
Label : "Username" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Set the username for the bot's message" ,
PropertyName : "username" ,
} ,
{
Label : "Icon emoji" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Provide an emoji to use as the icon for the bot's message. Overrides the icon URL." ,
PropertyName : "icon_emoji" ,
} ,
{
Label : "Icon URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Provide a URL to an image to use as the icon for the bot's message" ,
PropertyName : "icon_url" ,
} ,
{
Label : "Mention Users" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Mention one or more users (comma separated) when notifying in a channel, by ID (you can copy this from the user's Slack profile)" ,
PropertyName : "mentionUsers" ,
} ,
{
Label : "Mention Groups" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Mention one or more groups (comma separated) when notifying in a channel (you can copy this from the group's Slack profile URL)" ,
PropertyName : "mentionGroups" ,
} ,
{
Label : "Mention Channel" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
SelectOptions : [ ] SelectOption {
2021-05-04 17:28:39 +05:30
{
Value : "" ,
Label : "Disabled" ,
} ,
{
Value : "here" ,
Label : "Every active channel member" ,
} ,
{
Value : "channel" ,
Label : "Every channel member" ,
} ,
} ,
Description : "Mention whole channel or just active members when notifying" ,
PropertyName : "mentionChannel" ,
} ,
{
Label : "Webhook URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Optionally provide a Slack incoming webhook URL for sending messages, in this case the token isn't necessary" ,
Placeholder : "Slack incoming webhook URL" ,
PropertyName : "url" ,
Secure : true ,
2022-02-25 15:10:21 +01:00
Required : true ,
2022-04-20 09:40:57 +02:00
DependsOn : "token" ,
2021-05-04 17:28:39 +05:30
} ,
2022-02-23 14:33:23 -08:00
{ // New in 8.4.
Label : "Endpoint URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-02-23 14:33:23 -08:00
Description : "Optionally provide a custom Slack message API endpoint for non-webhook requests, default is https://slack.com/api/chat.postMessage" ,
Placeholder : "Slack endpoint url" ,
PropertyName : "endpointUrl" ,
} ,
2021-05-04 17:28:39 +05:30
{ // New in 8.0.
Label : "Title" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Templated title of the slack message" ,
PropertyName : "title" ,
Placeholder : ` {{ template "slack.default.title" . }} ` ,
} ,
{ // New in 8.0.
Label : "Text Body" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2021-05-04 17:28:39 +05:30
Description : "Body of the slack message" ,
PropertyName : "text" ,
Placeholder : ` {{ template "slack.default.text" . }} ` ,
} ,
} ,
} ,
2021-05-18 17:31:51 +03:00
{
Type : "sensugo" ,
Name : "Sensu Go" ,
Description : "Sends HTTP POST request to a Sensu Go API" ,
Heading : "Sensu Go Settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-18 17:31:51 +03:00
{
Label : "Backend URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-18 17:31:51 +03:00
Placeholder : "http://sensu-api.local:8080" ,
PropertyName : "url" ,
Required : true ,
} ,
{
Label : "API Key" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypePassword ,
2021-05-18 17:31:51 +03:00
Description : "API key to auth to Sensu Go backend" ,
PropertyName : "apikey" ,
Required : true ,
Secure : true ,
} ,
{
Label : "Proxy entity name" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-18 17:31:51 +03:00
Placeholder : "default" ,
PropertyName : "entity" ,
} ,
{
Label : "Check name" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-18 17:31:51 +03:00
Placeholder : "default" ,
PropertyName : "check" ,
} ,
{
Label : "Handler" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-18 17:31:51 +03:00
PropertyName : "handler" ,
} ,
{
Label : "Namespace" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-18 17:31:51 +03:00
Placeholder : "default" ,
PropertyName : "namespace" ,
} ,
{ // New in 8.0.
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-18 17:31:51 +03:00
PropertyName : "message" ,
} ,
} ,
} ,
2021-05-04 17:28:39 +05:30
{
Type : "teams" ,
Name : "Microsoft Teams" ,
Description : "Sends notifications using Incoming Webhook connector to Microsoft Teams" ,
Heading : "Teams settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Placeholder : "Teams incoming webhook url" ,
PropertyName : "url" ,
Required : true ,
} ,
2022-04-27 18:03:15 +01:00
{
Label : "Title" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-04-27 18:03:15 +01:00
Description : "Templated title of the Teams message." ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-04-27 18:03:15 +01:00
} ,
{
Label : "Section Title" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-04-27 18:03:15 +01:00
Description : "Section title for the Teams message. Leave blank for none." ,
PropertyName : "sectiontitle" ,
} ,
2021-05-04 17:28:39 +05:30
{ // New in 8.0.
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-04 17:28:39 +05:30
PropertyName : "message" ,
} ,
} ,
} ,
{
Type : "telegram" ,
Name : "Telegram" ,
Description : "Sends notifications to Telegram" ,
Heading : "Telegram API settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
Label : "BOT API Token" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Placeholder : "Telegram BOT API Token" ,
PropertyName : "bottoken" ,
Required : true ,
Secure : true ,
} ,
{
Label : "Chat ID" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
Description : "Integer Telegram Chat Identifier" ,
PropertyName : "chatid" ,
Required : true ,
} ,
{ // New in 8.0.
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-04 17:28:39 +05:30
PropertyName : "message" ,
} ,
2022-12-14 10:44:39 -05:00
{
Label : "Parse Mode" ,
Element : ElementTypeSelect ,
SelectOptions : [ ] SelectOption {
{
Value : "None" ,
Label : "None" ,
} ,
{
Value : "HTML" ,
Label : "HTML" ,
} ,
{
Value : "Markdown" ,
Label : "Markdown" ,
} ,
{
Value : "MarkdownV2" ,
Label : "Markdown V2" ,
} ,
} ,
Description : ` Mode for parsing entities in the message text. Default is 'HTML' ` ,
PropertyName : "parse_mode" ,
} ,
{
Label : "Disable Notification" ,
Description : "Sends the message silently. Users will receive a notification with no sound." ,
Element : ElementTypeCheckbox ,
PropertyName : "disable_notification" ,
} ,
2021-05-04 17:28:39 +05:30
} ,
} ,
{
Type : "webhook" ,
2022-02-26 10:45:05 +01:00
Name : "Webhook" ,
2021-05-04 17:28:39 +05:30
Description : "Sends HTTP POST request to a URL" ,
Heading : "Webhook settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-04 17:28:39 +05:30
{
2022-07-21 10:25:58 +01:00
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
PropertyName : "url" ,
Required : true ,
} ,
{
2022-07-21 10:25:58 +01:00
Label : "HTTP Method" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
SelectOptions : [ ] SelectOption {
2021-05-04 17:28:39 +05:30
{
Value : "POST" ,
Label : "POST" ,
} ,
{
Value : "PUT" ,
Label : "PUT" ,
} ,
} ,
PropertyName : "httpMethod" ,
} ,
{
2022-07-21 10:25:58 +01:00
Label : "HTTP Basic Authentication - Username" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
PropertyName : "username" ,
} ,
{
2022-07-21 10:25:58 +01:00
Label : "HTTP Basic Authentication - Password" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypePassword ,
2021-05-04 17:28:39 +05:30
PropertyName : "password" ,
Secure : true ,
} ,
2022-07-21 10:25:58 +01:00
{ // New in 9.1
Label : "Authorization Header - Scheme" ,
Description : "Optionally provide a scheme for the Authorization Request Header. Default is Bearer." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-07-21 10:25:58 +01:00
PropertyName : "authorization_scheme" ,
Placeholder : "Bearer" ,
} ,
{ // New in 9.1
Label : "Authorization Header - Credentials" ,
Description : "Credentials for the Authorization Request header. Only one of HTTP Basic Authentication or Authorization Request Header can be set." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-07-21 10:25:58 +01:00
PropertyName : "authorization_credentials" ,
Secure : true ,
} ,
2021-05-04 17:28:39 +05:30
{ // New in 8.0. TODO: How to enforce only numbers?
Label : "Max Alerts" ,
Description : "Max alerts to include in a notification. Remaining alerts in the same batch will be ignored above this number. 0 means no limit." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-04 17:28:39 +05:30
PropertyName : "maxAlerts" ,
} ,
2022-11-03 10:52:07 +01:00
{ // New in 9.3.
Label : "Title" ,
Description : "Templated title of the message." ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-11-03 10:52:07 +01:00
} ,
{ // New in 9.3.
Label : "Message" ,
Description : "Custom message. You can use template variables." ,
Element : ElementTypeTextArea ,
PropertyName : "message" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-11-03 10:52:07 +01:00
} ,
2021-05-04 17:28:39 +05:30
} ,
} ,
2021-12-16 00:42:03 +08:00
{
Type : "wecom" ,
Name : "WeCom" ,
Description : "Send alerts generated by Grafana to WeCom" ,
Heading : "WeCom settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-12-16 00:42:03 +08:00
{
2022-10-19 12:17:37 +08:00
Label : "Webhook URL" ,
Description : "Required if using GroupRobot" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-12-16 00:42:03 +08:00
Placeholder : "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx" ,
PropertyName : "url" ,
2022-10-19 12:17:37 +08:00
Secure : true ,
Required : true ,
DependsOn : "secret" ,
} ,
{
Label : "Agent ID" ,
Description : "Required if using APIAPP, see https://work.weixin.qq.com/wework_admin/frame#apps create ApiApp" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "1000002" ,
PropertyName : "agent_id" ,
Required : true ,
DependsOn : "url" ,
} ,
{
Label : "Corp ID" ,
Description : "Required if using APIAPP, see https://work.weixin.qq.com/wework_admin/frame#profile" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "wwxxxxxxxxx" ,
PropertyName : "corp_id" ,
2021-12-16 00:42:03 +08:00
Required : true ,
2022-10-19 12:17:37 +08:00
DependsOn : "url" ,
} ,
{
Label : "Secret" ,
Description : "Required if using APIAPP" ,
Element : ElementTypeInput ,
InputType : InputTypePassword ,
Placeholder : "secret" ,
PropertyName : "secret" ,
2021-12-16 00:42:03 +08:00
Secure : true ,
2022-10-19 12:17:37 +08:00
Required : true ,
DependsOn : "url" ,
} ,
{
Label : "Message Type" ,
Element : ElementTypeSelect ,
PropertyName : "msgtype" ,
SelectOptions : [ ] SelectOption {
{
Value : "text" ,
Label : "Text" ,
} ,
{
Value : "markdown" ,
Label : "Markdown" ,
} ,
} ,
Placeholder : "Text" ,
2021-12-16 00:42:03 +08:00
} ,
{
Label : "Message" ,
Description : "Custom WeCom message. You can use template variables." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-12-16 00:42:03 +08:00
PropertyName : "message" ,
} ,
2022-07-06 23:54:46 +08:00
{ // New in 9.1.
Label : "Title" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2022-07-06 23:54:46 +08:00
Description : "Templated title of the message" ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-07-06 23:54:46 +08:00
} ,
2022-10-19 12:17:37 +08:00
{
Label : "To User" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "@all" ,
PropertyName : "touser" ,
} ,
2021-12-16 00:42:03 +08:00
} ,
} ,
2021-05-19 15:27:41 +02:00
{
2021-05-24 16:09:29 +03:00
Type : "prometheus-alertmanager" ,
2021-05-19 15:27:41 +02:00
Name : "Alertmanager" ,
Description : "Sends notifications to Alertmanager" ,
Heading : "Alertmanager Settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 15:27:41 +02:00
{
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 15:27:41 +02:00
Placeholder : "http://localhost:9093" ,
PropertyName : "url" ,
Required : true ,
} ,
2021-05-24 16:09:29 +03:00
{
Label : "Basic Auth User" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-24 16:09:29 +03:00
PropertyName : "basicAuthUser" ,
} ,
{
Label : "Basic Auth Password" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypePassword ,
2021-05-24 16:09:29 +03:00
PropertyName : "basicAuthPassword" ,
Secure : true ,
} ,
2021-05-19 15:27:41 +02:00
} ,
} ,
2021-05-19 08:31:55 -07:00
{
Type : "discord" ,
Name : "Discord" ,
Heading : "Discord settings" ,
Description : "Sends notifications to Discord" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2022-10-27 16:17:18 +02:00
{
Label : "Title" ,
Description : "Templated title of the message" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 16:17:18 +02:00
PropertyName : "title" ,
} ,
2021-05-19 08:31:55 -07:00
{
Label : "Message Content" ,
Description : "Mention a group using @ or a user using <@ID> when notifying in a channel" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2021-05-19 08:31:55 -07:00
PropertyName : "message" ,
} ,
{
Label : "Webhook URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 08:31:55 -07:00
Placeholder : "Discord webhook URL" ,
PropertyName : "url" ,
Required : true ,
2023-08-16 03:03:56 -04:00
Secure : true ,
2021-05-19 08:31:55 -07:00
} ,
2021-05-28 22:00:21 +01:00
{
Label : "Avatar URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-28 22:00:21 +01:00
PropertyName : "avatar_url" ,
} ,
2021-10-26 11:55:10 -07:00
{
Label : "Use Discord's Webhook Username" ,
Description : "Use the username configured in Discord's webhook settings. Otherwise, the username will be 'Grafana'" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeCheckbox ,
2021-10-26 11:55:10 -07:00
PropertyName : "use_discord_username" ,
} ,
2021-05-19 08:31:55 -07:00
} ,
} ,
2021-05-19 21:54:04 +05:30
{
Type : "googlechat" ,
Name : "Google Hangouts Chat" ,
Description : "Sends notifications to Google Hangouts Chat via webhooks based on the official JSON message format" ,
Heading : "Google Hangouts Chat settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 21:54:04 +05:30
{
2022-07-21 10:25:58 +01:00
Label : "URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 21:54:04 +05:30
Placeholder : "Google Hangouts Chat incoming webhook url" ,
PropertyName : "url" ,
Required : true ,
} ,
2022-01-05 09:47:08 -06:00
{
2022-10-27 16:19:48 +02:00
Label : "Title" ,
Description : "Templated title of the message" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 16:19:48 +02:00
PropertyName : "title" ,
} ,
{
2022-01-05 09:47:08 -06:00
Label : "Message" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-01-05 09:47:08 -06:00
PropertyName : "message" ,
} ,
2021-05-19 21:54:04 +05:30
} ,
} ,
2021-05-19 22:34:48 +05:30
{
Type : "LINE" ,
Name : "LINE" ,
Description : "Send notifications to LINE notify" ,
Heading : "LINE notify settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 22:34:48 +05:30
{
Label : "Token" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 22:34:48 +05:30
Placeholder : "LINE notify token key" ,
PropertyName : "token" ,
Required : true ,
Secure : true ,
2022-10-27 15:27:04 +02:00
} ,
{ // New in 9.3
Label : "Title" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated title of the message" ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 15:27:04 +02:00
} ,
{ // New in 9.3
Label : "Description" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated description of the message" ,
PropertyName : "description" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-10-27 15:27:04 +02:00
} ,
} ,
2021-05-19 22:34:48 +05:30
} ,
2021-05-19 23:50:52 +05:30
{
Type : "threema" ,
Name : "Threema Gateway" ,
2021-05-28 08:54:55 +02:00
Description : "Sends notifications to Threema using Threema Gateway (Basic IDs)" ,
2021-05-19 23:50:52 +05:30
Heading : "Threema Gateway settings" ,
Info : "Notifications can be configured for any Threema Gateway ID of type \"Basic\". End-to-End IDs are not currently supported." +
"The Threema Gateway ID can be set up at https://gateway.threema.ch/." ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-19 23:50:52 +05:30
{
Label : "Gateway ID" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 23:50:52 +05:30
Placeholder : "*3MAGWID" ,
2021-05-28 08:54:55 +02:00
Description : "Your 8 character Threema Gateway Basic ID (starting with a *)." ,
2021-05-19 23:50:52 +05:30
PropertyName : "gateway_id" ,
Required : true ,
ValidationRule : "\\*[0-9A-Z]{7}" ,
} ,
{
Label : "Recipient ID" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 23:50:52 +05:30
Placeholder : "YOUR3MID" ,
Description : "The 8 character Threema ID that should receive the alerts." ,
PropertyName : "recipient_id" ,
Required : true ,
ValidationRule : "[0-9A-Z]{8}" ,
} ,
{
Label : "API Secret" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-19 23:50:52 +05:30
Description : "Your Threema Gateway API secret." ,
PropertyName : "api_secret" ,
Required : true ,
Secure : true ,
} ,
2022-10-27 16:11:38 +02:00
{ // New in 9.3
Label : "Title" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated title of the message." ,
PropertyName : "title" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-10-27 16:11:38 +02:00
} ,
{ // New in 9.3
Label : "Description" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Description : "Templated description of the message." ,
PropertyName : "description" ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageEmbed ,
2022-10-27 16:11:38 +02:00
} ,
2021-05-19 23:50:52 +05:30
} ,
} ,
2021-05-20 09:12:08 +01:00
{
Type : "opsgenie" ,
Name : "OpsGenie" ,
Description : "Sends notifications to OpsGenie" ,
Heading : "OpsGenie settings" ,
2022-08-19 11:21:02 -05:00
Options : [ ] NotifierOption {
2021-05-20 09:12:08 +01:00
{
Label : "API Key" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-20 09:12:08 +01:00
Placeholder : "OpsGenie API Key" ,
PropertyName : "apiKey" ,
Required : true ,
Secure : true ,
} ,
{
2022-07-21 10:25:58 +01:00
Label : "Alert API URL" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2021-05-20 09:12:08 +01:00
Placeholder : "https://api.opsgenie.com/v2/alerts" ,
PropertyName : "apiUrl" ,
Required : true ,
} ,
2022-06-08 17:55:31 -03:00
{
Label : "Message" ,
Description : "Alert text limited to 130 characters." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
2023-02-03 11:36:49 -05:00
Placeholder : alertingTemplates . DefaultMessageTitleEmbed ,
2022-06-08 17:55:31 -03:00
PropertyName : "message" ,
} ,
{
Label : "Description" ,
Description : "A description of the incident." ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeTextArea ,
2022-06-08 17:55:31 -03:00
PropertyName : "description" ,
} ,
2021-05-20 09:12:08 +01:00
{
Label : "Auto close incidents" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeCheckbox ,
2021-05-20 09:12:08 +01:00
Description : "Automatically close alerts in OpsGenie once the alert goes back to ok." ,
PropertyName : "autoClose" ,
} , {
Label : "Override priority" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeCheckbox ,
2021-05-20 09:12:08 +01:00
Description : "Allow the alert priority to be set using the og_priority annotation" ,
PropertyName : "overridePriority" ,
} ,
{
Label : "Send notification tags as" ,
2022-08-19 11:21:02 -05:00
Element : ElementTypeSelect ,
SelectOptions : [ ] SelectOption {
2021-05-20 09:12:08 +01:00
{
2023-02-03 11:36:49 -05:00
Value : alertingOpsgenie . SendTags ,
2021-05-20 09:12:08 +01:00
Label : "Tags" ,
} ,
{
2023-02-03 11:36:49 -05:00
Value : alertingOpsgenie . SendDetails ,
2021-05-20 09:12:08 +01:00
Label : "Extra Properties" ,
} ,
{
2023-02-03 11:36:49 -05:00
Value : alertingOpsgenie . SendBoth ,
2021-05-20 09:12:08 +01:00
Label : "Tags & Extra Properties" ,
} ,
} ,
Description : "Send the common annotations to Opsgenie as either Extra Properties, Tags or both" ,
PropertyName : "sendTagsAs" ,
} ,
} ,
} ,
2022-11-11 17:27:13 +00:00
{
Type : "webex" ,
Name : "Cisco Webex Teams" ,
Description : "Sends notifications to Cisco Webex Teams" ,
Heading : "Webex settings" ,
Info : "Notifications can be configured for any Cisco Webex Teams" ,
Options : [ ] NotifierOption {
{
Label : "Cisco Webex API URL" ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "https://api.ciscospark.com/v1/messages" ,
Description : "API endpoint at which we'll send webhooks to." ,
PropertyName : "api_url" ,
} ,
{
Label : "Room ID" ,
Description : "The room ID to send messages to." ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : "GMtOWY0ZGJkNzMyMGFl" ,
PropertyName : "room_id" ,
Required : true ,
} ,
{
Label : "Bot Token" ,
Description : "Non-expiring access token of the bot that will post messages on our behalf." ,
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : ` GMtOWY0ZGJkNzMyMGFl-12535454-123213 ` ,
PropertyName : "bot_token" ,
Secure : true ,
Required : true ,
} ,
{
2023-01-18 17:26:34 +00:00
Label : "Notification Template" ,
Description : "Notification template to use. Markdown is supported." ,
2022-11-11 17:27:13 +00:00
Element : ElementTypeInput ,
InputType : InputTypeText ,
Placeholder : ` {{ template "default.message" . }} ` ,
PropertyName : "message" ,
} ,
} ,
} ,
2021-05-04 17:28:39 +05:30
}
}