Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Obs AI Assistant] Error when fetching alerts #203458

Closed
viduni94 opened this issue Dec 9, 2024 · 1 comment · Fixed by #203695
Closed

[Obs AI Assistant] Error when fetching alerts #203458

viduni94 opened this issue Dec 9, 2024 · 1 comment · Fixed by #203695
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant
Milestone

Comments

@viduni94
Copy link
Contributor

viduni94 commented Dec 9, 2024

Describe the bug:
Fetching alerts via the Obs AI Assistant is not working after

Steps to reproduce:

  1. Open the Obs AI Assistant
  2. Trigger some alerts by setting up an alerting rule
  3. Type in prompt - "How many alerts do I have in the past 10 days?"
  4. Notice the error in the alerts function call

Expected behavior:
The alerts function call should be able to query the alerts successfully.

Screenshots (if relevant):
Image

Errors in browser console (if relevant): N/A

Provide logs and/or server output (if relevant):

[2024-12-09T10:46:46.926-05:00][DEBUG][plugins.observabilityAIAssistant.service] Added message: {"@timestamp":"2024-12-09T15:46:46.925Z","message":{"content":"","function_call":{"name":"alerts","arguments":"{\"start\":\"now-30d\",\"end\":\"now\"}","trigger":"assistant"},"role":"assistant"}}
[2024-12-09T10:46:47.473-05:00][ERROR][plugins.ruleRegistry] Unable to retrieve alert details for alert with id of "undefined" or with query "{"bool":{"filter":[{"0":{"term":{"kibana.alert.status":"active"}},"range":{"@timestamp":{"gte":1731167207080,"lte":1733759207081}}}]}}" and operation find 
Error: ResponseError: x_content_parse_exception
	Caused by:
		x_content_parse_exception: [1:174] [bool] failed to parse field [filter]
	Root causes:
		parsing_exception: unknown query [0]
[2024-12-09T10:46:47.474-05:00][ERROR][plugins.ruleRegistry] find threw an error: Error: Unable to retrieve alert details for alert with id of "undefined" or with query "{"bool":{"filter":[{"0":{"term":{"kibana.alert.status":"active"}},"range":{"@timestamp":{"gte":1731167207080,"lte":1733759207081}}}]}}" and operation find 
Error: ResponseError: x_content_parse_exception
	Caused by:
		x_content_parse_exception: [1:174] [bool] failed to parse field [filter]
	Root causes:
		parsing_exception: unknown query [0]
[2024-12-09T10:46:47.474-05:00][ERROR][plugins.observabilityAIAssistant.service] Encountered error running function alerts: {"data":null,"isBoom":true,"isServer":false,"output":{"statusCode":404,"payload":{"statusCode":404,"error":"Not Found","message":"Unable to retrieve alert details for alert with id of \"undefined\" or with query \"{\"bool\":{\"filter\":[{\"0\":{\"term\":{\"kibana.alert.status\":\"active\"}},\"range\":{\"@timestamp\":{\"gte\":1731167207080,\"lte\":1733759207081}}}]}}\" and operation find \nError: ResponseError: x_content_parse_exception\n\tCaused by:\n\t\tx_content_parse_exception: [1:174] [bool] failed to parse field [filter]\n\tRoot causes:\n\t\tparsing_exception: unknown query [0]"},"headers":{}}}

Any additional context:

  • Noticing this behaviour after the merge commit a3496c9ca6d99fa301fd8ca73ad44178cdeb2955.
  • The functionality works as expected for the merge commit (13caf8d7e6d11dde68a161cd0edb3046128a0de2) before this.
@viduni94 viduni94 added bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant labels Dec 9, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

viduni94 added a commit to viduni94/kibana that referenced this issue Dec 10, 2024
viduni94 added a commit to viduni94/kibana that referenced this issue Dec 10, 2024
@viduni94 viduni94 linked a pull request Dec 10, 2024 that will close this issue
1 task
@viduni94 viduni94 assigned viduni94 and unassigned viduni94 Dec 10, 2024
@viduni94 viduni94 added this to the 8.18 milestone Dec 10, 2024
viduni94 added a commit to viduni94/kibana that referenced this issue Dec 10, 2024
viduni94 added a commit to viduni94/kibana that referenced this issue Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Obs AI Assistant Observability AI Assistant
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants