[Observability AI Assistant] Add alert status management to AI Assistant connector#203729
Conversation
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
ddcd274 to
bfdd28e
Compare
bfdd28e to
0bae13a
Compare
|
Can you add screenshots to show the ui changes? |
|
The remove button removes the last prompt. I decided not to include a delete button for each prompt. You can add up to 3 prompts (number of statuses), and there must always be at least one prompt. Screen.Recording.2025-01-21.at.11.59.13.mov |
…lert-status-change
@neptunian fixed it, turns out it was a backward compatibility issue. |
.../observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx
Outdated
Show resolved
Hide resolved
...ons/observability/plugins/observability_ai_assistant_app/server/rule_connector/index.test.ts
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/observability_ai_assistant_app/common/types.ts
Outdated
Show resolved
Hide resolved
.../observability/plugins/observability_ai_assistant_app/public/rule_connector/ai_assistant.tsx
Outdated
Show resolved
Hide resolved
| recovered: [...(params.alerts?.recovered || [])], | ||
| }; | ||
|
|
||
| if (ALERT_STATUSES.some((status) => prompt.statuses.includes(status))) { |
There was a problem hiding this comment.
Why do you need to iterate through ALERT_STATUSES? Won't prompt.statuses always be AlertStatus[] (whatever that type is called)? Could this simply be a check on whether it's empty?
| if (ALERT_STATUSES.some((status) => prompt.statuses.includes(status))) { | |
| if (prompt.statuses.length > 0) { |
|
|
||
| if (ALERT_STATUSES.some((status) => prompt.statuses.includes(status))) { | ||
| alerts.new = alerts.new.filter((alert) => | ||
| prompt.statuses.includes(get(alert, 'kibana.alert.status')) |
There was a problem hiding this comment.
Not a huge fan of mutating like this. It often leads to bugs down the road.
…lert-status-change
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
|
|
Starting backport for target branches: 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13240901596 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
5 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |



Close #185032
Summary
An Observability AI Assistant connector is available to be set as action for Observability rules. When an alert is triggered, a conversation with the AI assistant will be created sending the initial prompt set by the user in the rule action. The conversation is then stored and can be retrieved from the AI Assistant interface. the action is triggered on any status change of the alert (active, recovered, untracked), creating a new conversation for each of them using the same initial prompt which may not be suitable for the 3 cases.
Improvement
The user is able to choose in when the action should be run (active, recovered, untracked, all),. That would allow the user to specify more than one AI Assistant action, with a different and more suitable prompt in each case.
Screen.Recording.2025-01-21.at.11.59.13.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelines