"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5482],{82697:(W,x,o)=>{o.d(x,{a:()=>M});var e=o(66681),A=o(85960),a=o(47257),h=o(44211);const M=({label:f,description:C,children:L,className:$,size:D="xl"})=>{const R=(0,a.wW)(E),[b,O]=(0,A.useState)(!0),s=()=>O(!b);return A.createElement("div",{className:(0,e.cx)(R.wrapper,$)},A.createElement(h.U,{className:R.toggle,size:D,onToggle:s,isCollapsed:b,text:f}),C&&A.createElement("p",{className:R.description},C),A.createElement("div",{className:b?R.hidden:R.content},L))},E=f=>({wrapper:(0,e.css)`
    margin-top: ${f.spacing(1)};
    padding-bottom: ${f.spacing(1)};
  `,toggle:(0,e.css)`
    margin: ${f.spacing(1,0)};
    padding: 0;
  `,hidden:(0,e.css)`
    display: none;
  `,description:(0,e.css)`
    color: ${f.colors.text.secondary};
    font-size: ${f.typography.size.sm};
    font-weight: ${f.typography.fontWeightRegular};
    margin: 0;
  `,content:(0,e.css)`
    padding-left: ${f.spacing(3)};
  `})},8506:(W,x,o)=>{o.d(x,{t:()=>F});var e=o(66681),A=o(56375),a=o(85960),h=o(53285),M=o(20519),E=o(47257),f=o(55973),C=o(24956),L=o(96130),$=o(27436),D=o(23351),R=o(7073),b=o(29165),O=o(90504);const s=({value:t,onChange:m,readOnly:c=!1})=>{const T=(0,E.wW)(i),[K,d]=(0,a.useState)(n(t));(0,a.useEffect)(()=>d(n(t)),[t]);const u=S=>{m(r(S))},P=S=>{const k=K.slice(),I=k.splice(S,1)[0];d(k),I[0]&&u(k)},_=(S,k)=>{const I=K[k],p=K.map((y,U)=>U===k?S:y);d(p),(S[0]||I[0])&&u(p)};return a.createElement("div",null,!!K.length&&a.createElement("table",{className:T.table},a.createElement("thead",null,a.createElement("tr",null,a.createElement("th",null,"Name"),a.createElement("th",null,"Value"),!c&&a.createElement("th",null))),a.createElement("tbody",null,K.map(([S,k],I)=>a.createElement("tr",{key:I},a.createElement("td",null,a.createElement(C.I,{readOnly:c,value:S,onChange:p=>_([p.currentTarget.value,k],I)})),a.createElement("td",null,a.createElement(C.I,{readOnly:c,value:k,onChange:p=>_([S,p.currentTarget.value],I)})),!c&&a.createElement("td",null,a.createElement(O.A,{icon:"trash-alt",tooltip:"delete",onClick:()=>P(I)})))))),!c&&a.createElement(b.zx,{className:T.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>d([...K,["",""]])},"Add"))},i=t=>({addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `,table:(0,e.css)`
    tbody td {
      padding: 0 ${t.spacing(1)} ${t.spacing(1)} 0;
    }
  `}),r=t=>{const m={};for(const[c,T]of t)c&&(m[c]=T);return m},n=t=>Object.entries(t??{}),l=({value:t,onChange:m,readOnly:c=!1})=>{const T=(0,E.wW)(g),K=u=>{if(!t)return;const P=t.slice();P.splice(u,1),m(P)},d=(u,P)=>{t&&m(t.map((_,S)=>S===P?u:_))};return a.createElement("div",null,!!t?.length&&t.map((u,P)=>a.createElement("div",{key:P,className:T.row},a.createElement(C.I,{readOnly:c,value:u,onChange:_=>d(_.currentTarget.value,P)}),!c&&a.createElement(O.A,{className:T.deleteIcon,icon:"trash-alt",tooltip:"delete",onClick:()=>K(P)}))),!c&&a.createElement(b.zx,{className:T.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>m([...t??[],""])},"Add"))},g=t=>({row:(0,e.css)`
    display: flex;
    flex-direction: row;
    margin-bottom: ${t.spacing(1)};
    align-items: center;
  `,deleteIcon:(0,e.css)`
    margin-left: ${t.spacing(1)};
  `,addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `});var v=o(96406),w=o(82697);const N=t=>({collapsibleSection:(0,e.css)`
    margin: 0;
    padding: 0;
  `,wrapper:(0,e.css)`
    margin: ${t.spacing(2,0)};
    padding: ${t.spacing(1)};
    border: solid 1px ${t.colors.border.medium};
    border-radius: ${t.shape.radius.default};
    position: relative;
  `,description:(0,e.css)`
    color: ${t.colors.text.secondary};
    font-size: ${t.typography.size.sm};
    font-weight: ${t.typography.fontWeightRegular};
    margin: 0;
  `,deleteIcon:(0,e.css)`
    position: absolute;
    right: ${t.spacing(1)};
    top: ${t.spacing(1)};
  `,addButton:(0,e.css)`
    margin-top: ${t.spacing(1)};
  `}),V=({option:t,pathPrefix:m,errors:c,defaultValues:T,readOnly:K=!1})=>{const d=(0,E.wW)(N),u=`${m}${t.propertyName}`,P=(0,h.Gc)(),{fields:_,append:S,remove:k}=(0,v.R)({name:u,formAPI:P,defaults:T});return a.createElement("div",{className:d.wrapper},a.createElement(w.a,{className:d.collapsibleSection,label:`${t.label} (${_.length})`,description:t.description},(_??T??[]).map((I,p)=>a.createElement("div",{key:p,className:d.wrapper},!K&&a.createElement(O.A,{"data-testid":`${u}.${p}.delete-button`,icon:"trash-alt",tooltip:"delete",onClick:()=>k(p),className:d.deleteIcon}),t.subformOptions?.map(y=>a.createElement(F,{readOnly:K,defaultValue:I?.[y.propertyName],key:y.propertyName,option:y,pathPrefix:`${u}.${p}.`,error:c?.[p]?.[y.propertyName]})))),!K&&a.createElement(b.zx,{"data-testid":`${u}.add-button`,className:d.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>S({__id:String(Math.random())})},"Add")))},q=({option:t,pathPrefix:m,errors:c,defaultValue:T,readOnly:K=!1})=>{const d=(0,E.wW)(N),u=`${m}${t.propertyName}`,{watch:P}=(0,h.Gc)(),_=P(u),S=_===void 0?T:_,[k,I]=(0,a.useState)(!!S);return a.createElement("div",{className:d.wrapper,"data-testid":`${u}.container`},a.createElement("h6",null,t.label),t.description&&a.createElement("p",{className:d.description},t.description),k&&a.createElement(a.Fragment,null,!K&&a.createElement(O.A,{"data-testid":`${u}.delete-button`,icon:"trash-alt",tooltip:"delete",onClick:()=>I(!1),className:d.deleteIcon}),(t.subformOptions??[]).map(p=>a.createElement(F,{readOnly:K,defaultValue:T?.[p.propertyName],key:p.propertyName,option:p,pathPrefix:`${u}.`,error:c?.[p.propertyName]}))),!k&&!K&&a.createElement(b.zx,{className:d.addButton,type:"button",variant:"secondary",icon:"plus",size:"sm",onClick:()=>I(!0),"data-testid":`${u}.add-button`},"Add"))},F=({option:t,invalid:m,pathPrefix:c,pathSuffix:T="",error:K,defaultValue:d,readOnly:u=!1,customValidator:P})=>{const _=`${c}${T}`;return t.element==="subform"?a.createElement(q,{readOnly:u,defaultValue:d,option:t,errors:K,pathPrefix:_}):t.element==="subform_array"?a.createElement(V,{readOnly:u,defaultValues:d,option:t,pathPrefix:_,errors:K}):a.createElement(M.g,{label:t.element!=="checkbox"&&t.element!=="radio"?t.label:void 0,description:t.description||void 0,invalid:!!K,error:K?.message,"data-testid":`${_}${t.propertyName}`},a.createElement(z,{id:`${_}${t.propertyName}`,defaultValue:d,option:t,invalid:m,pathPrefix:_,readOnly:u,pathIndex:c,customValidator:P}))},z=({option:t,invalid:m,id:c,pathPrefix:T="",pathIndex:K="",readOnly:d=!1,customValidator:u})=>{const P=(0,E.wW)(G),{control:_,register:S,unregister:k,getValues:I}=(0,h.Gc)(),p=`${T}${t.propertyName}`;switch((0,a.useEffect)(()=>()=>{k(p,{keepValue:!1})},[k,p]),t.element){case"checkbox":return a.createElement(f.X,{id:c,readOnly:d,disabled:d,className:P.checkbox,...S(p),label:t.label,description:t.description});case"input":return a.createElement(C.I,{id:c,readOnly:d||j(t,I,K),invalid:m,type:t.inputType,...S(p,{required:H(t,I,K),validate:{validationRule:y=>t.validationRule?B(y,t.validationRule):!0,customValidator:y=>u?u(y):!0},setValueAs:t.setValueAs}),placeholder:t.placeholder});case"select":return a.createElement(L.g,{render:({field:{onChange:y,ref:U,...Y}})=>a.createElement($.Ph,{disabled:d,options:t.selectOptions??void 0,invalid:m,onChange:J=>y(J.value),...Y}),control:_,name:p,defaultValue:t.defaultValue,rules:{validate:{customValidator:y=>u?u(y):!0}}});case"radio":return a.createElement(a.Fragment,null,a.createElement("legend",{className:P.legend},t.label),a.createElement(L.g,{render:({field:{ref:y,...U}})=>a.createElement(D.x,{disabled:d,options:t.selectOptions??[],...U}),control:_,defaultValue:t.defaultValue?.value,name:p,rules:{required:t.required?"Option is required":!1,validate:{validationRule:y=>t.validationRule?B(y,t.validationRule):!0,customValidator:y=>u?u(y):!0}}}));case"textarea":return a.createElement(R.K,{id:c,readOnly:d,invalid:m,placeholder:t.placeholder,...S(p,{required:t.required?"Required":!1,validate:y=>t.validationRule!==""?B(y,t.validationRule):!0})});case"string_array":return a.createElement(L.g,{render:({field:{value:y,onChange:U}})=>a.createElement(l,{readOnly:d,value:y,onChange:U}),control:_,name:p});case"key_value_map":return a.createElement(L.g,{render:({field:{value:y,onChange:U}})=>a.createElement(s,{readOnly:d,value:y,onChange:U}),control:_,name:p});default:return console.error("Element not supported",t.element),null}},G=t=>({checkbox:(0,e.css)`
    height: auto; // native checkbox has fixed height which does not take into account description
  `,legend:(0,e.css)`
    font-size: ${t.typography.h6.fontSize};
  `}),B=(t,m)=>RegExp(m).test(t)?!0:"Invalid format",H=(t,m,c)=>t.dependsOn?(0,A.isEmpty)(m(`${c}secureFields`))?!m(`${c}secureSettings.${t.dependsOn}`)&&t.required?"Required":!1:!m(`${c}secureFields.${t.dependsOn}`)&&t.required?"Required":!1:t.required?"Required":!1,j=(t,m,c)=>t.dependsOn?(0,A.isEmpty)(m(`${c}secureFields`))?m(`${c}secureSettings.${t.dependsOn}`):m(`${c}secureFields.${t.dependsOn}`):!1},90504:(W,x,o)=>{o.d(x,{A:()=>h});var e=o(85960),A=o(14607),a=o(29165);const h=({tooltip:M,icon:E,to:f,target:C,onClick:L,className:$,tooltipPlacement:D="top",...R})=>{const b=typeof M=="string"?M:void 0;return e.createElement(A.u,{content:M,placement:D},f?e.createElement(a.Qj,{variant:"secondary",fill:"text",icon:E,href:f,size:"sm",target:C,...R,"aria-label":b}):e.createElement(a.zx,{className:$,variant:"secondary",fill:"text",size:"sm",icon:E,type:"button",onClick:L,...R,"aria-label":b}))}},96406:(W,x,o)=>{o.d(x,{R:()=>M});var e=o(56375),A=o.n(e),a=o(85960);const h=[];function M(E){const{name:f,formAPI:C,defaults:L,softDelete:$}=E,{watch:D,getValues:R,reset:b,setValue:O}=C,s=D(f)??L??h,i=(0,a.useCallback)(r=>{const n=JSON.parse(JSON.stringify(R())),l=r(s??[]);b((0,e.set)(n,f,l))},[R,f,b,s]);return{fields:s,append:(0,a.useCallback)(r=>i(n=>[...n,r]),[i]),remove:(0,a.useCallback)(r=>{$?O(`${f}.${r}.__deleted`,!0):i(n=>{const l=n.slice();return l.splice(r,1),l})},[i,f,O,$])}}},8764:(W,x,o)=>{o.d(x,{g:()=>E,k:()=>M});var e=o(42797);const A=(0,e.K)("basic_auth","Basic auth","Sets the `Authorization` header with the configured username and password. Password and password_file are mutually exclusive.",{element:"subform",subformOptions:[(0,e.K)("username","Username",""),(0,e.K)("password","Password",""),(0,e.K)("password_file","Password file","")]}),a=(0,e.K)("tls_config","TLS config","Configures the TLS settings.",{element:"subform",subformOptions:[(0,e.K)("ca_file","CA file","CA certificate to validate the server certificate with."),(0,e.K)("cert_file","Cert file","Certificate for client cert authentication to the server."),(0,e.K)("key_file","Key file","Key file for client cert authentication to the server."),(0,e.K)("server_name","Server name","ServerName extension to indicate the name of the server."),(0,e.K)("insecure_skip_verify","Skip verify","Disable validation of the server certificate.",{element:"checkbox"})]}),h=(0,e.K)("http_config","HTTP Config","Note that `basic_auth`, `bearer_token` and `bearer_token_file` options are mutually exclusive.",{element:"subform",subformOptions:[(0,e.K)("bearer_token","Bearer token","Sets the `Authorization` header with the configured bearer token."),(0,e.K)("bearer_token_file","Bearer token file","Sets the `Authorization` header with the bearer token read from the configured file."),(0,e.K)("proxy_url","Proxy URL","Optional proxy URL."),A,a]}),M=[{name:"Email",description:"Send notification over SMTP",type:"email",info:"",heading:"Email settings",options:[(0,e.K)("to","To",'The email address to send notifications to. You can enter multiple addresses using a "," separator',{required:!0}),(0,e.K)("from","From","The sender address."),(0,e.K)("smarthost","SMTP host","The SMTP host through which emails are sent."),(0,e.K)("hello","Hello","The hostname to identify to the SMTP server."),(0,e.K)("auth_username","Username","SMTP authentication information"),(0,e.K)("auth_password","Password","SMTP authentication information"),(0,e.K)("auth_secret","Secret","SMTP authentication information"),(0,e.K)("auth_identity","Identity","SMTP authentication information"),(0,e.K)("require_tls","Require TLS","The SMTP TLS requirement",{element:"checkbox"}),(0,e.K)("html","Email HTML body","The HTML body of the email notification.",{placeholder:'{{ template "email.default.html" . }}',element:"textarea"}),(0,e.K)("text","Email text body","The text body of the email notification.",{element:"textarea"}),(0,e.K)("headers","Headers","Further headers email header key/value pairs. Overrides any headers previously set by the notification implementation.",{element:"key_value_map"}),a]},{name:"PagerDuty",description:"Send notifications to PagerDuty",type:"pagerduty",info:"",heading:"PagerDuty settings",options:[(0,e.K)("routing_key","Routing key","The PagerDuty integration key (when using PagerDuty integration type `Events API v2`)"),(0,e.K)("service_key","Service key","The PagerDuty integration key (when using PagerDuty integration type `Prometheus`)."),(0,e.K)("url","URL","The URL to send API requests to"),(0,e.K)("client","Client","The client identification of the Alertmanager.",{placeholder:'{{ template "pagerduty.default.client" . }}'}),(0,e.K)("client_url","Client URL","A backlink to the sender of the notification.",{placeholder:'{{ template "pagerduty.default.clientURL" . }}'}),(0,e.K)("description","Description","A description of the incident.",{placeholder:'{{ template "pagerduty.default.description" .}}'}),(0,e.K)("severity","Severity","Severity of the incident.",{placeholder:"error"}),(0,e.K)("details","Details","A set of arbitrary key/value pairs that provide further detail about the incident.",{element:"key_value_map"}),(0,e.K)("images","Images","Images to attach to the incident.",{element:"subform_array",subformOptions:[(0,e.K)("href","URL","",{required:!0}),(0,e.K)("source","Source","",{required:!0}),(0,e.K)("alt","Alt","",{required:!0})]}),(0,e.K)("links","Links","Links to attach to the incident.",{element:"subform_array",subformOptions:[(0,e.K)("href","URL","",{required:!0}),(0,e.K)("text","Text","",{required:!0})]}),h]},{name:"Pushover",description:"Send notifications to Pushover",type:"pushover",info:"",heading:"Pushover settings",options:[(0,e.K)("user_key","User key","The recipient user\u2019s user key.",{required:!0}),(0,e.K)("token","Token","Your registered application\u2019s API token, see https://pushover.net/app",{required:!0}),(0,e.K)("title","Title","Notification title.",{placeholder:'{{ template "pushover.default.title" . }}'}),(0,e.K)("message","Message","Notification message.",{placeholder:'{{ template "pushover.default.message" . }}'}),(0,e.K)("url","URL","A supplementary URL shown alongside the message.",{placeholder:'{{ template "pushover.default.url" . }}'}),(0,e.K)("priority","Priority","Priority, see https://pushover.net/api#priority",{placeholder:'{{ if eq .Status "firing" }}2{{ else }}0{{ end }}'}),(0,e.K)("retry","Retry","How often the Pushover servers will send the same notification to the user. Must be at least 30 seconds.",{placeholder:"1m"}),(0,e.K)("expire","Expire","How long your notification will continue to be retried for, unless the user acknowledges the notification.",{placeholder:"1h"}),h]},{name:"Slack",description:"Send notifications to Slack",type:"slack",info:"",heading:"Slack settings",options:[(0,e.K)("api_url","Webhook URL","The Slack webhook URL."),(0,e.K)("channel","Channel","The #channel or @user to send notifications to.",{required:!0}),(0,e.K)("icon_emoji","Emoji icon",""),(0,e.K)("icon_url","Icon URL",""),(0,e.K)("link_names","Names link","",{element:"checkbox"}),(0,e.K)("username","Username","",{placeholder:'{{ template "slack.default.username" . }}'}),(0,e.K)("callback_id","Callback ID","",{placeholder:'{{ template "slack.default.callbackid" . }}'}),(0,e.K)("color","Color","",{placeholder:'{{ if eq .Status "firing" }}danger{{ else }}good{{ end }}'}),(0,e.K)("fallback","Fallback","",{placeholder:'{{ template "slack.default.fallback" . }}'}),(0,e.K)("footer","Footer","",{placeholder:'{{ template "slack.default.footer" . }}'}),(0,e.K)("mrkdwn_in","Mrkdwn fields","An array of field names that should be formatted by mrkdwn syntax.",{element:"string_array"}),(0,e.K)("pretext","Pre-text","",{placeholder:'{{ template "slack.default.pretext" . }}'}),(0,e.K)("short_fields","Short fields","",{element:"checkbox"}),(0,e.K)("text","Message body","",{element:"textarea",placeholder:'{{ template "slack.default.text" . }}'}),(0,e.K)("title","Title","",{placeholder:'{{ template "slack.default.title" . }}'}),(0,e.K)("title_link","Title link","",{placeholder:'{{ template "slack.default.titlelink" . }}'}),(0,e.K)("image_url","Image URL",""),(0,e.K)("thumb_url","Thumbnail URL",""),(0,e.K)("actions","Actions","",{element:"subform_array",subformOptions:[(0,e.K)("text","Text","",{required:!0}),(0,e.K)("type","Type","",{required:!0}),(0,e.K)("url","URL","Either url or name and value are mandatory."),(0,e.K)("name","Name",""),(0,e.K)("value","Value",""),(0,e.K)("confirm","Confirm","",{element:"subform",subformOptions:[(0,e.K)("text","Text","",{required:!0}),(0,e.K)("dismiss_text","Dismiss text",""),(0,e.K)("ok_text","OK text",""),(0,e.K)("title","Title","")]}),(0,e.K)("style","Style","")]}),(0,e.K)("fields","Fields","",{element:"subform_array",subformOptions:[(0,e.K)("title","Title","",{required:!0}),(0,e.K)("value","Value","",{required:!0}),(0,e.K)("short","Short","",{element:"checkbox"})]}),h]},{name:"OpsGenie",description:"Send notifications to OpsGenie",type:"opsgenie",info:"",heading:"OpsGenie settings",options:[(0,e.K)("api_key","API key","The API key to use when talking to the OpsGenie API."),(0,e.K)("api_url","API URL","The host to send OpsGenie API requests to."),(0,e.K)("message","Message","Alert text limited to 130 characters."),(0,e.K)("description","Description","A description of the incident.",{placeholder:'{{ template "opsgenie.default.description" . }}'}),(0,e.K)("source","Source","A backlink to the sender of the notification.",{placeholder:'{{ template "opsgenie.default.source" . }}'}),(0,e.K)("details","Details","A set of arbitrary key/value pairs that provide further detail about the incident.",{element:"key_value_map"}),(0,e.K)("tags","Tags","Comma separated list of tags attached to the notifications."),(0,e.K)("note","Note","Additional alert note."),(0,e.K)("priority","Priority","Priority level of alert. Possible values are P1, P2, P3, P4, and P5."),(0,e.K)("responders","Responders","List of responders responsible for notifications.",{element:"subform_array",subformOptions:[(0,e.K)("type","Type",'"team", "user", "escalation" or schedule".',{required:!0}),(0,e.K)("id","ID","Exactly one of these fields should be defined."),(0,e.K)("name","Name","Exactly one of these fields should be defined."),(0,e.K)("username","Username","Exactly one of these fields should be defined.")]}),h]},{name:"VictorOps",description:"Send notifications to VictorOps",type:"victorops",info:"",heading:"VictorOps settings",options:[(0,e.K)("api_key","API key","The API key to use when talking to the VictorOps API."),(0,e.K)("api_url","API URL","The VictorOps API URL."),(0,e.K)("routing_key","Routing key","A key used to map the alert to a team.",{required:!0}),(0,e.K)("message_type","Message type","Describes the behavior of the alert (CRITICAL, WARNING, INFO)."),(0,e.K)("entity_display_name","Entity display name","Contains summary of the alerted problem.",{placeholder:'{{ template "victorops.default.entity_display_name" . }}'}),(0,e.K)("state_message","State message","Contains long explanation of the alerted problem.",{placeholder:'{{ template "victorops.default.state_message" . }}'}),(0,e.K)("monitoring_tool","Monitoring tool","The monitoring tool the state message is from.",{placeholder:'{{ template "victorops.default.monitoring_tool" . }}'}),h]},{name:"Webhook",description:"Send notifications to a webhook",type:"webhook",info:"",heading:"Webhook settings",options:[(0,e.K)("url","URL","The endpoint to send HTTP POST requests to.",{required:!0}),(0,e.K)("max_alerts","Max alerts","The maximum number of alerts to include in a single webhook message. Alerts above this threshold are truncated. When leaving this at its default value of 0, all alerts are included.",{placeholder:"0",validationRule:"(^\\d+$|^$)"}),h]},{name:"Discord",description:"Sends notifications to Discord",type:"discord",info:"",heading:"Discord settings",options:[(0,e.K)("title","Title","Templated title of the message",{placeholder:'{{ template "discord.default.title" . }}'}),(0,e.K)("message","Message Content","Mention a group using @ or a user using <@ID> when notifying in a channel",{placeholder:'{{ template "discord.default.message" . }}'}),(0,e.K)("webhook_url","Webhook URL","",{placeholder:"Discord webhook URL",required:!0}),h]},{name:"Cisco Webex Teams",description:"Sends notifications to Cisco Webex Teams",type:"webex",info:"",heading:"Cisco Webex Teams settings",options:[(0,e.K)("api_url","API URL","The Webex Teams API URL",{placeholder:"https://webexapis.com/v1/messages"}),(0,e.K)("room_id","Room ID","ID of the Webex Teams room where to send the messages",{required:!0}),(0,e.K)("message","Message","Message template",{placeholder:'{{ template "webex.default.message" .}}'}),{...h,required:!0}]},{name:"Telegram",description:"Sends notifications to Telegram",type:"telegram",info:"",heading:"Telegram settings",options:[(0,e.K)("api_url","API URL","The Telegram API URL",{placeholder:"https://api.telegram.org"}),(0,e.K)("bot_token","Bot token","Telegram bot token",{required:!0}),(0,e.K)("chat_id","Chat ID","ID of the chat where to send the messages",{required:!0,setValueAs:f=>typeof f=="string"?parseInt(f,10):0}),(0,e.K)("message","Message","Message template",{placeholder:'{{ template "webex.default.message" .}}'}),(0,e.K)("disable_notifications","Disable notifications","Disable telegram notifications",{element:"checkbox"}),(0,e.K)("parse_mode","Parse mode","Parse mode for telegram message",{element:"select",defaultValue:{label:"MarkdownV2",value:"MarkdownV2"},selectOptions:[{label:"MarkdownV2",value:"MarkdownV2"},{label:"Markdown",value:"Markdown"},{label:"HTML",value:"HTML"},{label:"plain text",value:""}]}),h]},{name:"Amazon SNS",description:"Sends notifications to Amazon SNS",type:"sns",info:"",heading:"Amazon SNS settings",options:[(0,e.K)("api_url","API URL","The Amazon SNS API URL"),(0,e.K)("sigv4","SigV4 authentication","Configures AWS's Signature Verification 4 signing process to sign requests",{element:"subform",subformOptions:[(0,e.K)("region","Region","The AWS region. If blank, the region from the default credentials chain is used"),(0,e.K)("access_key","Access key",'The AWS API access_key. If blank the environment variable "AWS_ACCESS_KEY_ID" is used'),(0,e.K)("secret_key","Secret key",'The AWS API secret_key. If blank the environment variable "AWS_ACCESS_SECRET_ID" is used'),(0,e.K)("profile","Profile","Named AWS profile used to authenticate"),(0,e.K)("role_arn","Rule ARN","AWS Role ARN, an alternative to using AWS API keys")]}),(0,e.K)("topic_arn","SNS topic ARN","If you don't specify this value, you must specify a value for the phone_number or target_arn. If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes to prevent messages with the same group key being deduplicated by the SNS default deduplication window"),(0,e.K)("phone_number","Phone number","Phone number if message is delivered via SMS in E.164 format. If you don't specify this value, you must specify a value for the topic_arn or target_arn"),(0,e.K)("target_arn","Target ARN","The  mobile platform endpoint ARN if message is delivered via mobile notifications. If you don't specify this value, you must specify a value for the topic_arn or phone_number"),(0,e.K)("subject","Subject","Subject line when the message is delivered to email endpoints",{placeholder:'{{ template "sns.default.subject" .}}'}),(0,e.K)("message","Message","The message content of the SNS notification",{placeholder:'{{ template "sns.default.message" .}}'}),(0,e.K)("attributes","Attributes","SNS message attributes",{element:"key_value_map"}),h]},{name:"WeChat",description:"Sends notifications to WeChat",type:"wechat",info:"",heading:"WeChat settings",options:[(0,e.K)("api_url","API URL","The WeChat API URL"),(0,e.K)("api_secret","API Secret","The API key to use when talking to the WeChat API"),(0,e.K)("corp_id","Corp ID","The corp id for authentication"),(0,e.K)("message","Message","API request data as defined by the WeChat API",{placeholder:'{{ template "wechat.default.message" . }}'}),(0,e.K)("message_type","Message type","Type of the message type",{element:"select",defaultValue:{label:"Text",value:"text"},selectOptions:[{label:"Text",value:"text"},{label:"Markdown",value:"markdown"}]}),(0,e.K)("agent_id","Agent ID","",{placeholder:'{{ template "wechat.default.agent_id" . }}'}),(0,e.K)("to_user","to user","",{placeholder:'{{ template "wechat.default.to_user" . }}'}),(0,e.K)("to_party","to party","",{placeholder:'{{ template "wechat.default.to_party" . }}'}),(0,e.K)("to_tag","to tag","",{placeholder:'{{ template "wechat.default.to_tag" . }}'})]},{name:"Microsoft Teams",description:"Sends notifications to Microsoft Teams",type:"msteams",info:"",heading:"Microsoft Teams settings",options:[(0,e.K)("webhook_url","Webhook URL","The incoming webhook URL."),(0,e.K)("title","Title","Message title template.",{placeholder:'{{ template "teams.default.title" . }}'}),(0,e.K)("text","Text","Message body template.",{placeholder:'{{ template "teams.default.text" . }}'})]}],E=[(0,e.K)("smtp_from","SMTP from","The default SMTP From header field."),(0,e.K)("smtp_smarthost","SMTP smarthost","The default SMTP smarthost used for sending emails, including port number. Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). Example: smtp.example.org:587"),(0,e.K)("smtp_hello","SMTP hello","The default hostname to identify to the SMTP server.",{placeholder:"localhost"}),(0,e.K)("smtp_auth_username","SMTP auth username","SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server."),(0,e.K)("smtp_auth_password","SMTP auth password","SMTP Auth using LOGIN and PLAIN."),(0,e.K)("smtp_auth_identity","SMTP auth identity","SMTP Auth using PLAIN."),(0,e.K)("smtp_auth_secret","SMTP auth secret","SMTP Auth using CRAM-MD5."),(0,e.K)("smtp_require_tls","SMTP require TLS","The default SMTP TLS requirement. Note that Go does not support unencrypted connections to remote SMTP endpoints.",{element:"checkbox"}),(0,e.K)("slack_api_url","Slack API URL",""),(0,e.K)("victorops_api_key","VictorOps API key",""),(0,e.K)("victorops_api_url","VictorOps API URL","",{placeholder:"https://alert.victorops.com/integrations/generic/20131114/alert/"}),(0,e.K)("pagerduty_url","PagerDuty URL","https://events.pagerduty.com/v2/enqueue"),(0,e.K)("opsgenie_api_key","OpsGenie API key",""),(0,e.K)("opsgenie_api_url","OpsGenie API URL","",{placeholder:"https://api.opsgenie.com/"}),(0,e.K)("wechat_api_url","WeChat API URL","",{placeholder:"https://qyapi.weixin.qq.com/cgi-bin/"}),(0,e.K)("wechat_api_secret","WeChat API secret",""),(0,e.K)("wechat_api_corp_id","WeChat API corp id",""),(0,e.K)("webex_api_url","Cisco Webex Teams API URL",""),(0,e.K)("telegram_api_url","The Telegram API URL",""),h,(0,e.K)("resolve_timeout","Resolve timeout","ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt.",{placeholder:"5m"})]},42797:(W,x,o)=>{o.d(x,{K:()=>e});function e(A,a,h,M={}){return{propertyName:A,label:a,description:h,element:"input",inputType:"",required:!1,secure:!1,placeholder:"",validationRule:"",showWhen:{field:"",is:""},dependsOn:"",...M}}},2232:(W,x,o)=>{o.d(x,{e2:()=>D,gN:()=>h,iL:()=>E,md:()=>a,oP:()=>b,qX:()=>M,zg:()=>f});var e=o(56375),A=o.n(e);function a(s,i){const r={};let n=1;return[{name:s.name,items:s.grafana_managed_receiver_configs?.map(g=>{const v=String(n++);r[v]=g;const w=i.find(({type:N})=>N===g.type);return $(v,g,w)})??[]},r]}function h(s,i){const r={};let n=1;const l=Object.entries(s).filter(([v])=>v.endsWith("_configs")&&v!=="grafana_managed_receiver_configs").map(([v,w])=>[v.replace("_configs",""),w]).map(([v,w])=>w.map(N=>{const V=String(n++);if(r[V]={type:v,config:N},!i.find(F=>F.type===v))throw new Error(`unknown cloud notifier: ${v}`);return L(V,v,N)})).flat();return[{name:s.name,items:l},r]}function M(s,i,r,n){return{name:s.name,grafana_managed_receiver_configs:(s.items??[]).map(l=>{const g=i[l.__id],v=n.find(w=>w.type===l.type);return D(l,r,s.name,g,v)})}}function E(s,i){const r={name:s.name};return s.items.forEach(({__id:n,type:l,settings:g,sendResolved:v})=>{const w=b({...g,send_resolved:v??i.sendResolved});`${l}_configs`in r?r[`${l}_configs`]?.push(w):r[`${l}_configs`]=[w]}),r}function f(s,i,r){const n=s.alertmanager_config.receivers??[];if(i.name!==r&&n.find(({name:g})=>g===i.name))throw new Error(`Duplicate receiver name ${i.name}`);if(r&&!n.find(({name:g})=>g===r))throw new Error(`Expected receiver ${r} to exist, but did not find it in the config`);const l={...s,alertmanager_config:{...s.alertmanager_config,receivers:r?n.map(g=>g.name===r?i:g):[...n,i]}};return l.alertmanager_config.route&&r&&i.name!==r&&(l.alertmanager_config.route=C(l.alertmanager_config.route,r,i.name)),l}function C(s,i,r){const n={...s};return n.receiver===i&&(n.receiver=r),n.routes&&(n.routes=n.routes.map(l=>C(l,i,r))),n}function L(s,i,r){return{__id:s,type:i,settings:{...r},secureFields:{},secureSettings:{},sendResolved:r.send_resolved}}function $(s,i,r){const n={__id:s,type:i.type,provenance:i.provenance,secureSettings:{},settings:{...i.settings},secureFields:{...i.secureFields},disableResolveMessage:i.disableResolveMessage};return r?.options.forEach(l=>{l.secure&&n.secureSettings[l.propertyName]&&(delete n.settings[l.propertyName],n.secureFields[l.propertyName]=!0),l.secure&&n.settings[l.propertyName]&&(n.secureSettings[l.propertyName]=n.settings[l.propertyName],delete n.settings[l.propertyName])}),n}function D(s,i,r,n,l){const g={settings:b({...n&&n.type===s.type?n.settings??{}:{},...s.settings??{}}),secureSettings:O(s.secureSettings,n?.secureFields),type:s.type,name:r,disableResolveMessage:s.disableResolveMessage??n?.disableResolveMessage??i.disableResolveMessage},v=l?.options.filter(N=>N.secure).map(N=>N.propertyName)??[],w=(0,e.pick)(g.settings,v);return g.secureSettings={...w,...g.secureSettings},g.settings=(0,e.omit)(g.settings,v),n&&(g.uid=n.uid),g}const R=s=>(0,e.isNil)(s)||s==="";function b(s){return(0,e.isArray)(s)?s.forEach(b):typeof s=="object"&&s!==null&&Object.entries(s).forEach(([i,r])=>{R(r)?delete s[i]:b(r)}),s}function O(s={},i={}){return(0,e.omitBy)(s,(r,n)=>R(r)&&!(n in i))}}}]);

//# sourceMappingURL=5482.324e75790e285cde7d30.js.map