1"use strict";(self.webpackChunkopsimate_docs=self.webpackChunkopsimate_docs||[]).push([[2769],{3023:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>l});var i=n(3696);const s={},r=i.createContext(s);function d(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),i.createElement(r.Provider,{value:t},e.children)}},9293:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>d,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"alerts/actions","title":"Actions","description":"An action is a configured integration (Slack webhook, Teams webhook, Jira, generic HTTP) that is fired against an Alert.","source":"@site/docs/alerts/actions.md","sourceDirName":"alerts","slug":"/alerts/actions","permalink":"/docs/alerts/actions","draft":false,"unlisted":false,"editUrl":"https://github.com/OpsiMate/documentation/edit/main/opsimate-docs/docs/alerts/actions.md","tags":[],"version":"current","lastUpdatedAt":1788383105000,"sidebarPosition":5,"frontMatter":{"sidebar_position":5},"sidebar":"tutorialSidebar","previous":{"title":"TV Mode View","permalink":"/docs/alerts/tv-mode"},"next":{"title":"Silences and Mute Policies","permalink":"/docs/alerts/silences-and-mute-policies"}}');var s=n(2540),r=n(3023);const d={sidebar_position:5},l="Actions",a={},c=[{value:"Scope",id:"scope",level:2},{value:"Action types and what they need",id:"action-types-and-what-they-need",level:2},{value:"Variable substitution in action payloads",id:"variable-substitution-in-action-payloads",level:2},{value:"Alert fields",id:"alert-fields",level:3},{value:"Tags",id:"tags",level:3},{value:"Running an action from an alert",id:"running-an-action-from-an-alert",level:2},{value:"Alert History Timeline",id:"alert-history-timeline",level:2}];function o(e){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"actions",children:"Actions"})}),"\n",(0,s.jsx)(t.p,{children:"An action is a configured integration (Slack webhook, Teams webhook, Jira, generic HTTP) that is fired against an Alert."}),"\n",(0,s.jsx)(t.h2,{id:"scope",children:"Scope"}),"\n",(0,s.jsx)(t.p,{children:"Each action can be limited to certain alerts by name or criteria."}),"\n",(0,s.jsx)(t.h2,{id:"action-types-and-what-they-need",children:"Action types and what they need"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Required"}),(0,s.jsx)(t.th,{children:"Optional"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Slack"}),(0,s.jsx)(t.td,{children:"Webhook URL"}),(0,s.jsx)(t.td,{children:"Channel, Message template"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Teams"}),(0,s.jsx)(t.td,{children:"Webhook URL"}),(0,s.jsx)(t.td,{children:"Title template, Message template"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Jira"}),(0,s.jsx)(t.td,{children:"Base URL, Email, API token, Project key, Issue type"}),(0,s.jsx)(t.td,{children:"Summary template, Description template"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"HTTP"}),(0,s.jsx)(t.td,{children:"URL, Method"}),(0,s.jsx)(t.td,{children:"Headers, Body template"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"variable-substitution-in-action-payloads",children:"Variable substitution in action payloads"}),"\n",(0,s.jsxs)(t.p,{children:["Templates use: ",(0,s.jsx)(t.code,{children:"{{name}}"})]}),"\n",(0,s.jsx)(t.h3,{id:"alert-fields",children:"Alert fields"}),"\n",(0,s.jsxs)(t.p,{children:["Every field is available under a short name and an ",(0,s.jsx)(t.code,{children:"alert."})," prefixed alias. Both forms\nresolve to the same value."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Variable"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{name}}"})}),(0,s.jsx)(t.td,{children:"Alert name"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{id}}"})}),(0,s.jsx)(t.td,{children:"Alert ID"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{status}}"})}),(0,s.jsxs)(t.td,{children:["e.g. ",(0,s.jsx)(t.code,{children:"firing"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{type}}"})}),(0,s.jsx)(t.td,{children:"Alert type"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{severity}}"})}),(0,s.jsx)(t.td,{children:"Alert severity"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{summary}}"})}),(0,s.jsx)(t.td,{children:"Alert summary"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{service}}"})}),(0,s.jsx)(t.td,{children:"Service the alert relates to"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{startsAt}}"})}),(0,s.jsx)(t.td,{children:"When the alert started"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{createdAt}}"})}),(0,s.jsx)(t.td,{children:"When the alert was created"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{updatedAt}}"})}),(0,s.jsx)(t.td,{children:"When the alert was last updated"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{url}}"})}),(0,s.jsx)(t.td,{children:"Link to the alert in OpsiMate"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{runbookUrl}}"})}),(0,s.jsx)(t.td,{children:"Link to the runbook, if set"})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"tags",children:"Tags"}),"\n",(0,s.jsxs)(t.p,{children:["Tag values are available under three prefixes, all equivalent. Replace ",(0,s.jsx)(t.code,{children:"env"})," with your tag's name:"]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Variable"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{label.env}}"})}),(0,s.jsxs)(t.td,{children:["Tag value, ",(0,s.jsx)(t.code,{children:"label."})," prefix"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{tag.env}}"})}),(0,s.jsxs)(t.td,{children:["Tag value, ",(0,s.jsx)(t.code,{children:"tag."})," prefix"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"{{alert.tags.env}}"})}),(0,s.jsx)(t.td,{children:"Tag value, full path"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"running-an-action-from-an-alert",children:"Running an action from an alert"}),"\n",(0,s.jsx)(t.p,{children:"In the alert details panel there's a collapsible Actions section (with a count). Expanding it shows a button per action. Clicking one opens a dialog. The dialog builds a preview, lets you edit the fields, and you hit Send. Success or failure appears as a notification. There's also a Manage link to the Actions page, and if nothing's configured you get a prompt to create one."}),"\n",(0,s.jsx)(t.h2,{id:"alert-history-timeline",children:"Alert History Timeline"}),"\n",(0,s.jsx)(t.p,{children:"Each entry is labelled as Action run with a description line and the timestamp followed by who ran it."}),"\n",(0,s.jsx)(t.p,{children:"Action-run entries land on the Activity side rail, not the main lifecycle rail. So filtering to Activity isolates them."})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.