Files
openobserve/config
Ashish Kolheandgithub-actions[bot] e52dacb4b2 fix: alert destinations (#10301)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Support backend-managed prebuilt templates  

- Cache and fetch templates with async preview  

- Rename templates prefix to `prebuilt_`, update tests  

- Add backend ensure_system_templates & template reuse


___

### Diagram Walkthrough


```mermaid
flowchart LR
  BL["Backend load_prebuilt_config & builtins"]
  Endpoint["GET /api/{org}/alerts/templates/system/prebuilt"]
  FE["Frontend fetchSystemTemplates()"]
  Cache["systemTemplatesCache in memory"]
  Generate["generatePreview/testDestination"]
  UI["UI preview/test buttons"]
  BL -- "provides templates" --> Endpoint
  Endpoint -- "called by" --> FE
  FE -- "stores in" --> Cache
  Cache -- "used by" --> Generate
  Generate -- "triggers" --> UI
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>14
files</summary><table>
<tr>
<td><strong>usePrebuiltDestinations.ts</strong><dd><code>Implement
fetchSystemTemplates and caching logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-2c90b706aae7486541bbee80d2c67c9de18504b90e1d9618ba130e017d0a5246">+195/-28</a></td>

</tr>

<tr>
<td><strong>slack.ts</strong><dd><code>Rename slack template to
`prebuilt_slack`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-f7068d6fc979cc1fbc6e2bc562be53f5453fc874b367c1688adf70c0896aac62">+41/-45</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>email.ts</strong><dd><code>Rename email template and remove
CC/subject</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-3e756aefde39bd7c780066f6ee6e22df1f2846f5e0013fd6ec568a98dd54f64b">+18/-16</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>servicenow.ts</strong><dd><code>Rename ServiceNow template
to `prebuilt_servicenow`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-3790cdccf9f6221cf55c86664b4cbfb65d20f3da9db719167898b8b76b698a2f">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>alert_templates.ts</strong><dd><code>Add
`get_system_templates` API call</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-fd8c4260abc3df601e4331d36b0c211eca568ee70139ad90c87247bc552fe4e2">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>prebuilt_loader.rs</strong><dd><code>Add
get_prebuilt_template and fallback loader</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-d75e85b239701cb3c9e85c15a8a5cd8d23120a4b5ba0a61003c0df1f4854b74d">+345/-10</a></td>

</tr>

<tr>
<td><strong>destinations.rs</strong><dd><code>Implement
ensure_prebuilt_template & reuse logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-c06292c108cc15b585a0e3318fd15d3e86c1f1a0f001ab84fff85facefd3c4d3">+420/-1</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>templates.rs</strong><dd><code>Add ensure_system_templates
initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-975d7665f1439ca49810c28554f85e513ff3a4c8b849f2bb1966536230951464">+86/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>templates.rs</strong><dd><code>Expose GET system prebuilt
templates endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-b08e274a64cc935b0cec402a04271a872b1586027a77dc0ccb84c597c3960f61">+54/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>AddDestination.vue</strong><dd><code>Update form logic for
prebuilt vs custom</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-61b295458e13049a538f5014124855d58dce664dfbd644b57a964a37a07b7a3f">+123/-66</a></td>

</tr>

<tr>
<td><strong>DestinationTestResult.vue</strong><dd><code>Improve test
error message handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-1fa17c0e52becd683dec1bbee12aab6823b28c1bbedca0d5039d688527f826e5">+29/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>AlertsDestinationList.vue</strong><dd><code>Add custom
destination label logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-e9d05ba6c071c0e2f5d9ef7acdef757f79910abd6897b29e27b069a10d4ba8de">+15/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>PrebuiltDestinationForm.vue</strong><dd><code>Comment out
unsupported email fields</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-606eb6f7e6e43518cc9b1f3194097c52acf3df0df9ab5945274196d7221035a0">+3/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>pagerduty.ts</strong><dd><code>Rename PagerDuty template to
`prebuilt_pagerduty`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-a216d76143343db3aec8efe02596be53b438813aa2aa8af2fb1080e17f5540aa">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>templates.spec.ts</strong><dd><code>Update tests to use
`prebuilt_` prefix</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-262b3003a3045192e0aaccddebe76bdb29fcd68655e8bacfd486e50575a14801">+9/-9</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>types.spec.ts</strong><dd><code>Adjust PrebuiltConfig tests
for new prefix</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-67fc167ebe4d6a433579ba9850a6d7ce3a83d97bebe410521f85775a948595fc">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>alertDestinationsPage.js</strong><dd><code>Update selector
for test result element</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-57e5c53b4ef998b3d8708149620ff94dcc46807927f1a3a9e9f28ed3ebe25b0a">+3/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>alerts-destinations-prebuilt.spec.js</strong><dd><code>Add
random name for Slack destination test</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-0295825c868c1d1ed5cc194ba04843a7d5f4e58decff2593c7d9bd5b29ec33a4">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>discord.spec.ts</strong><dd><code>Update Discord tests for
new prefix</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-21a02fd01b42452d1f13140715e5f81146b7a62d61d4b899deea4f30be06284e">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Route for system prebuilt templates
API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-02556e3f515441b5d2b6bbea7829df488beac03c4cc41309a6638ae3c0e0aec6">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>en.json</strong><dd><code>Add custom destination translation
keys</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-892aa3d75ab6e129ef9116aa21bec1b9a15ba69ce5366d2a19128078c690d824">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>25 files</summary><table>
<tr>
  <td><strong>auth.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-9bc2b1841504a435f66ad094f72ddbe7b7fa75e5e1557b8adbfe36f7f0592e1b">+20/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>openapi.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-edb8ce232c0cd08366879f642788a75d99f6bab64b4c0e77391281fdb9241e90">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>mod.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-f2e4c29b8eef22189ec704a832633c4bd135a24444f054864c98064bd0963681">+8/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>main.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc">+5/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>destinations.rs</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-4652ac6be3f7cf720faf5b9c4cb1d5dbab9e2fed608f3abbe295fb270dde54b5">+6/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>de.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-78f24ecb2dbcfc38fdf3ec22b2559a5b40d236ea689d1c55f5d3e87168310264">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>es.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-ac2a2167b8b973e3f776f9fe3b43bef4576470d8ad33f3d7cfaff6edff0e5778">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>fr.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-db80e762b88ddf183820c050cdc6b215e6b02b365b5e73f5152af46b0d26f1a2">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>it.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-2de78074a5f887afddce60d694ead9322e6ab223eb70251c13819f3028bdc70d">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>ja.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-092e49c5f9fbc1b539ab9c2866d108d0ce1d314022b4c294eb4611b285e7bbd3">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>ko.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-50e27ca1b4825a5026f3a251bfcf79c97cab07cfade2ebd512d332453d707c48">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>nl.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-a1706021687ae5d8a1c006c49eab3946174fecd895f9b70a89c2e76d97250906">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>pt.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-38e804f64cb5e0e451849fc84e9b46e53c954a4a4263d51c18665ad45f4b4815">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>tr.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-6f0f131e9e2591480c4c5d1eaffc72d02dc31cbd8d3f90d8f012f08cabac8818">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>zh.json</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-8818055db58f83230aeea4ebfd4cec31d924e8c47b6f91298e356959ab25339e">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>discord.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-e4703f8270d000f785a48aa220752f303d2330b6e123817310ecb8a60815fb0b">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>email.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-744915b43017fdc102b0e00d157d7deef4b1f23e0e8e5cb483c2f2c9d6af655c">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>index.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-9b9a6bc1e17f1874fda50428263ff607dca3ba94b01f95933f179ba544f6e11a">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>msteams.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-6815fa747fe74c5cd6835f9fce8f037c15489fab95e399e15199a104c0c08061">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>msteams.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-efeec26ed5ec589000448466539dcdb0d7bb918e8a4f80c9df565eaa1e522b5c">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>opsgenie.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-2560842b70b2f74eb3ef2c940e0a55500b3bd5b89a9b5b34e3c0039c57fc1361">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>opsgenie.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-9412abdf9baf6b8c0cc87fa3ea0efec50928399c0112ad695c021040d24d7c3a">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>pagerduty.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-f62fcc0b648144816cef61b1f5512ba5e2bc573237158efbd896d33e779282f2">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>servicenow.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-ada67bb0bbeaf97a2e7c6a21a741d53df941306e6c694d1a1d89cf965403ce85">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>slack.spec.ts</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10301/files#diff-3fa8b2b7534ebec5c2cea1c76c54741c105b64819bb87e6a7f6d3b5a85969740">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-31 11:04:38 +05:30
..