[{"data":1,"prerenderedAt":242},["ShallowReactive",2],{"docs-\u002Fdocs\u002Falerting\u002Falert-rules":3,"docs-navigation":167},{"id":4,"title":5,"body":6,"description":158,"extension":159,"meta":160,"navTitle":161,"navigation":162,"path":163,"seo":164,"stem":165,"__hash__":166},"docs\u002Fdocs\u002F5.alerting\u002F1.alert-rules.md","Alerting",{"type":7,"value":8,"toc":155},"minimark",[9,18,23,31,148,151],[10,11,12,13,17],"p",{},"Threshold and absence rules are defined from the dashboard itself (Alerts\npage). No code required to create one. A background evaluator polls every\n30 seconds and fires ",[14,15,16],"strong",{},"only on state transitions"," (an incident opens when\na rule first goes out of bounds, and resolves when it recovers) so a rule\nthat stays broken for an hour doesn't re-notify every cycle.",[19,20,22],"h2",{"id":21},"webhook-delivery","Webhook delivery",[10,24,25,26,30],{},"Nafas does not send email, SMS, or Slack messages itself. When\n",[27,28,29],"code",{},"AlertWebhookUrl"," is set, every open or resolve event is POSTed there as\nJSON, and your own system takes it from there:",[32,33,38],"pre",{"className":34,"code":35,"language":36,"meta":37,"style":37},"language-json shiki shiki-themes github-light github-dark","{\n  \"ruleId\": 12,\n  \"ruleName\": \"High error rate\",\n  \"ruleType\": \"threshold\",\n  \"status\": \"open\",\n  \"detail\": \"error_rate is 8.4, threshold is 5\",\n  \"triggeredAtUtc\": \"2026-01-15T09:32:00Z\",\n  \"resolvedAtUtc\": null\n}\n","json","",[27,39,40,49,65,79,92,105,118,131,142],{"__ignoreMap":37},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sVt8B","{\n",[41,50,52,56,59,62],{"class":43,"line":51},2,[41,53,55],{"class":54},"sj4cs","  \"ruleId\"",[41,57,58],{"class":47},": ",[41,60,61],{"class":54},"12",[41,63,64],{"class":47},",\n",[41,66,68,71,73,77],{"class":43,"line":67},3,[41,69,70],{"class":54},"  \"ruleName\"",[41,72,58],{"class":47},[41,74,76],{"class":75},"sZZnC","\"High error rate\"",[41,78,64],{"class":47},[41,80,82,85,87,90],{"class":43,"line":81},4,[41,83,84],{"class":54},"  \"ruleType\"",[41,86,58],{"class":47},[41,88,89],{"class":75},"\"threshold\"",[41,91,64],{"class":47},[41,93,95,98,100,103],{"class":43,"line":94},5,[41,96,97],{"class":54},"  \"status\"",[41,99,58],{"class":47},[41,101,102],{"class":75},"\"open\"",[41,104,64],{"class":47},[41,106,108,111,113,116],{"class":43,"line":107},6,[41,109,110],{"class":54},"  \"detail\"",[41,112,58],{"class":47},[41,114,115],{"class":75},"\"error_rate is 8.4, threshold is 5\"",[41,117,64],{"class":47},[41,119,121,124,126,129],{"class":43,"line":120},7,[41,122,123],{"class":54},"  \"triggeredAtUtc\"",[41,125,58],{"class":47},[41,127,128],{"class":75},"\"2026-01-15T09:32:00Z\"",[41,130,64],{"class":47},[41,132,134,137,139],{"class":43,"line":133},8,[41,135,136],{"class":54},"  \"resolvedAtUtc\"",[41,138,58],{"class":47},[41,140,141],{"class":54},"null\n",[41,143,145],{"class":43,"line":144},9,[41,146,147],{"class":47},"}\n",[10,149,150],{},"A failed webhook delivery is logged and retried on the next transition;\nit never fails the request pipeline, and the incident still exists in the\ndashboard's own incident list regardless of whether delivery succeeded.",[152,153,154],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":37,"searchDepth":51,"depth":51,"links":156},[157],{"id":21,"depth":51,"text":22},"Threshold and absence rules authored from the dashboard, fired only on state transitions, delivered to your own webhook.","md",{},"Alert rules",true,"\u002Fdocs\u002Falerting\u002Falert-rules",{"title":5,"description":158},"docs\u002F5.alerting\u002F1.alert-rules","MEjBLiQW5xa6gMWNvq4WVCn_bLzx7KoLkBg_4OUdFWM",[168],{"title":169,"path":170,"stem":171,"children":172},"Docs","\u002Fdocs","docs",[173,176,194,207,220,233,238],{"title":174,"path":170,"stem":175},"Documentation","docs\u002Findex",{"title":177,"path":178,"stem":179,"children":180,"page":193},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[181,185,189],{"title":182,"path":183,"stem":184},"Why Nafas","\u002Fdocs\u002Fgetting-started\u002Fwhy-nafas","docs\u002F1.getting-started\u002F1.why-nafas",{"title":186,"path":187,"stem":188},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F2.quick-start",{"title":190,"path":191,"stem":192},"Requirements","\u002Fdocs\u002Fgetting-started\u002Frequirements","docs\u002F1.getting-started\u002F3.requirements",false,{"title":195,"path":196,"stem":197,"children":198,"page":193},"How It Works","\u002Fdocs\u002Fhow-it-works","docs\u002F2.how-it-works",[199,203],{"title":200,"path":201,"stem":202},"What gets captured, and how","\u002Fdocs\u002Fhow-it-works\u002Fwhat-gets-captured","docs\u002F2.how-it-works\u002F1.what-gets-captured",{"title":204,"path":205,"stem":206},"How it's built internally","\u002Fdocs\u002Fhow-it-works\u002Finternals","docs\u002F2.how-it-works\u002F2.internals",{"title":208,"path":209,"stem":210,"children":211,"page":193},"Configuration","\u002Fdocs\u002Fconfiguration","docs\u002F3.configuration",[212,216],{"title":213,"path":214,"stem":215},"Configuration options","\u002Fdocs\u002Fconfiguration\u002Foptions","docs\u002F3.configuration\u002F1.options",{"title":217,"path":218,"stem":219},"Security","\u002Fdocs\u002Fconfiguration\u002Fsecurity","docs\u002F3.configuration\u002F2.security",{"title":221,"path":222,"stem":223,"children":224,"page":193},"Deployment","\u002Fdocs\u002Fdeployment","docs\u002F4.deployment",[225,229],{"title":226,"path":227,"stem":228},"Multi-instance deployments","\u002Fdocs\u002Fdeployment\u002Fmulti-instance","docs\u002F4.deployment\u002F1.multi-instance",{"title":230,"path":231,"stem":232},"Desktop and other non-ASP.NET Core apps","\u002Fdocs\u002Fdeployment\u002Fdesktop-apps","docs\u002F4.deployment\u002F2.desktop-apps",{"title":5,"path":234,"stem":235,"children":236,"page":193},"\u002Fdocs\u002Falerting","docs\u002F5.alerting",[237],{"title":5,"path":163,"stem":165},{"title":239,"path":240,"stem":241},"Contributing","\u002Fdocs\u002Fcontributing","docs\u002F6.contributing",1789842022089]