Commit Graph
1304 Commits
Author SHA1 Message Date
Subhra264 22ecc96589 fix: list only permitted for enrichment tables list (#4480)
- [x] Enrichment tables are not listed correctly with RBAC.
- [x] Create ofga ownership for metadata streams
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Enhanced handling of stream types for improved flexibility and
functionality.
- Introduced enterprise-level ownership management features for metadata
handling in the context of the enterprise feature.

- **Bug Fixes**
- Streamlined logic for retrieving model keys associated with stream
types, ensuring more accurate results.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-09 17:35:23 +05:30
Ashish Kolhe 89b01b5d44 fix: remove start date change for cache duration (#4482)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced delta processing logic, allowing for broader consideration of
deltas regardless of their start time.
  
- **Bug Fixes**
- Streamlined query handling by removing unnecessary complexity and
error checks related to query duration.
- Adjusted return behavior of delta calculations, ensuring consistent
output in line with updated logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-09 14:49:29 +05:30
Hengfei Yang 5630650314 fix: target partition for noCache (#4484) 2024-09-06 17:37:41 +08:00
Bharghava Varun Ayada 9454bac8e9 chore: Metric for compactor file list pending jobs (#4159) 2024-09-06 12:14:19 +08:00
Ashish Kolhe dff7f4095e fix: vrl error for cache & histogram interval changes (#4472)
Fixes:

- [x] show vrl error from cache 
- [x] histogram interval changes

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling in response merging, ensuring more accurate
propagation of function errors.
  
- **New Features**
- Updated time intervals for histogram generation, enhancing accuracy in
data representation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-05 14:33:40 +05:30
Yashodhan Joshi d45ac8f9ad fix: unify the trace ingestion handling (#4435) 2024-09-05 13:33:15 +08:00
Ashish Kolhe 96915521d6 fix:vrl error from cache (#4466) 2024-09-05 12:34:15 +08:00
Hengfei Yang 6d752972dc fix: vrl as UDF (#4463) 2024-09-04 21:38:19 +08:00
Hengfei Yang e1acaa0a5e fix: vrl as query UDF (#4461) 2024-09-04 20:01:13 +08:00
Abhay Padamaniandktx-vaidehi c317f81458 feat: new config for dashboard variables (#4340)
- #4338 
- #4380 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Improved handling of selected values in the Variables Value Selector,
ensuring that all available options are assigned when no values are
selected.
- Introduced a toggle switch to control the visibility of variables in
the dashboard, enhancing user interface flexibility.
- Added new properties for managing default selection behavior in
multi-select variables.
- Updated localization support with a new entry for hiding elements on
the dashboard.

- **Bug Fixes**
- Enhanced input validation rules for the Add Setting Variable component
for consistency.
	- Improved text consistency in the Config Panel user interface.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
2024-09-04 16:46:36 +05:30
Subhra264andBhargav 2f4728c860 feat: add URI query fields for alert list filtering (#4436)
Added `owner` and `enabled` URI query parameter for the
`{org_id}/alerts` and `{org}/{stream_name}/alerts` `GET` APIs. E.g. -
`{org}/alerts?owner=user@user.com&enabled=true`.

Fixes #4273 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new filtering capability for alerts, allowing users to
filter by owner and enabled status.
- Added a new structure, `AlertListFilter`, to manage alert filtering
criteria.

- **Improvements**
- Enhanced alert retrieval functions to support user-defined query
parameters for more granular control over alert listings, improving the
overall usability of the alert system.
- Expanded filtering logic in the AlertList component for a more
comprehensive search capability within the alert list.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
2024-09-04 16:13:25 +05:30
Subhra264 7680952cdd fix: use ofga mapping in tuple object type for search permission checking (#4456)
Fixes #4455 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced authorization checks for `query`, `query_range`, and `series`
functions to dynamically reflect stream types.
- Improved permission validation logic in the `search` and
`search_multi` functions, allowing for more accurate access control
based on user roles and stream types.
- Updated logic in the `get_latest_traces` function to refine the
construction of the `o2_type` field for better permission checks.

- **Bug Fixes**
- Corrected the mapping of stream types to model keys, enhancing
security and accuracy in permission checks.

- **Chores**
- Added necessary imports for `OFGA_MODELS` to support new permission
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-04 14:23:45 +05:30
Hengfei Yang bb4881c99c feat: add datafusion json functions (#4321) 2024-09-04 11:30:24 +08:00
Hengfei Yang 2520777637 fix: realtime alert can't be trigger (#4443) 2024-09-03 22:53:40 +08:00
udev 4c3eeb89ea feat: exact percentile UDAF (#4441) 2024-09-03 20:15:11 +08:00
Ashish Kolhe b995fccf20 fix: use cache duration to update query duration (#4446)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced caching mechanism with improved control over data processing.
- Added functionality to retrieve settings for query range validation,
improving user feedback on query limitations.

- **Bug Fixes**
- Improved error handling for query duration modifications, ensuring
clearer communication to users.

- **Documentation**
- Updated documentation to reflect changes in function signatures and
new parameters for better clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-03 14:49:30 +05:30
01d0582213 feat: AND, OR, group condition for dashboard filter (#3957)
## Feature:
- #4339 

## Fixes:
- #4233 
- #4239 
- #4306
- #4307
- #4311
- `<blank>` was not visible properly in the dropdown when the value is
null converted it to `<blank>`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced support for version 5 of the Dashboard, enhancing the
dashboard's extensibility.
- Added a new component for managing filter options, improving user
interaction with dashboard queries.
- Implemented a new user interface for adding conditions to dashboard
panels.

- **Bug Fixes**
	- Improved error handling in SQL query generation to prevent crashes.

- **Documentation**
- Updated localization files to include new entries for adding groups
and conditions.

- **Refactor**
- Streamlined filter management by creating dedicated components,
enhancing code maintainability.

- **Tests**
- Enhanced UI tests for improved interaction with dropdowns and filters.

- **Chores**
- Removed obsolete event listeners and variables to simplify component
logic.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
2024-09-03 14:15:15 +05:30
udev aef1b3e83f fix: match all panic (#4442) 2024-09-03 10:27:36 +08:00
Taiming Liu 7f75a4d6db feat: use FST for inverted indexing (#4270) 2024-09-02 22:39:44 +08:00
Hengfei Yang 07e2411026 fix: ofga should sync in super cluster (#4418)
fixed #4382
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced conditional compilation for the `ofga` module, enabling
more flexible builds based on the "enterprise" feature.
- Enhanced the `init` function to validate store IDs when the super
cluster feature is active.
- Added a new function to handle database updates, improving modularity.

- **Bug Fixes**
- Improved error handling in the initialization process to enhance
system observability.

- **Style**
- Restructured import statements for better organization and clarity in
the `ofga` module.
- Simplified conditional logic formatting in the `Sql` implementation
for improved readability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-02 11:01:02 +05:30
Ashish Kolhe b0d0302428 fix: histogram interval (#4417)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a `histogram_interval` field to enhance query response
capabilities, allowing for more detailed data representation.
- Enhanced caching logic to set the `histogram_interval` based on the
`discard_interval`, improving the handling of cached query responses.

- **Improvements**
- Added conditional logic in response handling to include
`histogram_interval` when specific criteria are met, improving response
accuracy and robustness.
- Refined checks for empty responses, enhancing the robustness of the
merging process for query responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-01 12:54:38 +05:30
TessaIO 26bc9add49 feat: add support for aws s3 client retry (#4415) 2024-08-30 21:54:41 +08:00
Hengfei Yang 476d7cd268 fix: debug syslog ingestion (#4402) 2024-08-30 20:50:09 +08:00
Ashish Kolhe 5f8a08f392 fix: multi result cache duplicates issue (#4413)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced response handling by including the histogram interval in
search results.
  
- **Bug Fixes**
- Adjusted hit filtering logic to improve accuracy by changing the
timestamp comparison criteria.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-30 17:09:26 +05:30
Hengfei Yang 44eb582042 feat: add force quick mode (#4410) 2024-08-30 18:13:31 +08:00
Subhra264 8df35ecffc fix: improve triggers reporting, update trigger status if alert query is invalid (#4393)
- Fixes #4394
- When cloning alert, don't copy `last_satisfied_at`,
`last_triggered_at`

When the alert query is invalid, the scheduler stops processing the
alert and returns, but the error message is not reported in the triggers
usage stream. This PR fixes that.

When the alert query is invalid, it will be retried again and again
(default maximum number of retries is `3`). After that, the associated
`scheduled_jobs` record will be automatically removed from the table and
hence the alert will not be triggered anymore.

In order to schedule the alert again, the user needs to update the query
and again save it, it will start scheduling again.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
	- Enhanced alert handling logic for improved robustness and clarity.
- Introduced structured handling of alert data with better error
management.
- Added initialization of `last_triggered_at` and `last_satisfied_at`
fields to ensure clear state management for alerts.

- **Bug Fixes**
- Improved error handling for alert evaluation, ensuring accurate status
updates for alert triggers.
- Enhanced state preservation for alerts by updating the
`last_satisfied_at` timestamp during saves.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-29 19:47:31 +05:30
Subhra264andSai Nikhil 3fb55578ca feat: add last_satisfied_at field in alerts (#4368)
The `last_satisfied_at` field in the alert tracks when the alert
condition last met. This is in UTC microseconds.
This PR fixes the issue in #4379 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


## Summary by CodeRabbit

- **New Features**
- Introduced a new timestamp field to track when alerts were last
satisfied.
- Enhanced alert handling logic to manage and update satisfaction
timestamps effectively.
- Added a new column in the Alert List to display the last satisfied
timestamp for alerts.
- Improved localization support by adding a label for the last satisfied
timestamp.

- **Bug Fixes**
- Improved accuracy in alert state management by ensuring timestamps are
recorded correctly.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Sai Nikhil <nikhil@openobserve.ai>
2024-08-29 15:06:08 +05:30
Hengfei Yang 1bab4304d7 fix: add regions for query cache (#4391)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced query hash calculation for improved uniqueness and
flexibility in search functionality.
  
- **Bug Fixes**
- Simplified control flow in the hash generation process, reducing
potential errors in query handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-29 14:40:41 +05:30
Subhra264 ac8d01d1f4 fix: remove alert evaluation on save and do not store alert vrl containing only "." (#4367)
Fixes #4388 

- If the VRL function in alert contains only '.', no need to store the
VRL function in the alert
- Remove alert evaluation in backend while saving alert

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Bug Fixes**
- Improved logic for saving alerts by preventing the assignment of
non-meaningful values (specifically a single period) to alert
conditions, enhancing data integrity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-29 13:21:50 +05:30
Hengfei Yang 20b0ca61bd feat: add max_query_range for search partition API (#4378) 2024-08-29 14:09:22 +08:00
Huaijin a7990a4d1d feat: impl union plan for single node (#4352) 2024-08-28 23:31:00 +08:00
Subhra264 928053ec7c fix: when updating alert first check, if the scheduled_job exist or not (#4359)
Fixes #4360 

In case some `scheduled_job` records (required for alerts to get
scheduled properly) are missing for some alerts, they can be recreated
by simply disabling and enabling it.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Improvements**
- Enhanced error logging for trigger updates and creations, providing
clearer context with the inclusion of the `schedule_key`.
- Improved robustness of trigger management logic, facilitating easier
diagnosis of issues related to alert triggers.
- Increased flexibility in alert handling by dynamically setting the
`is_realtime` property based on the alert's characteristics.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-28 13:37:57 +05:30
BhargavandSubhradeep Chakraborty a5af316129 fix: issue #4326 User defined schema settings (#4350)
issue #4326 
  
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced new structures for updating stream settings, allowing for
more granular management of stream configurations.
- Added an asynchronous function for updating stream settings via HTTP
PUT requests.
- Implemented a new service route for handling updates to stream
settings.
  - Enhanced the `AddStream` component to retrieve updated settings.

- **Improvements**
- Improved schema management by tracking previous settings during
updates.
- Enhanced utility functions for comparing and managing stream settings.

- **Documentation**
- Updated documentation to reflect changes in API functionality for
creating and updating stream settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
2024-08-27 20:52:26 +05:30
Yashodhan Joshi fd26b8b5ef fix: keep tcp connections alive for syslog (#4335) 2024-08-27 18:06:35 +08:00
Ashish Kolhe 0eb63d12f7 fix: skip caching for aggregation query with no order by clause (#4334)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced cache checking logic to improve performance and handling of
aggregate queries.
  
- **Bug Fixes**
- Improved error logging for cached results to streamline
troubleshooting.

- **Refactor**
- Refined control flow and code readability in cache-related functions
without changing core functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-26 18:48:00 +05:30
Ashish Kolhe 7e751f768e chore: add took details to cache response (#4330)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced search functionality with integrated performance metrics,
allowing for better monitoring and optimization of search operations.
  
- **Bug Fixes**
- Improved logging behavior in the caching mechanism to avoid
unnecessary log entries, providing clearer and more relevant log
outputs.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-26 16:29:02 +05:30
Subhra264 13cbabd528 fix: use 409 when deleting destination/templates already in use (#4294)
Fixes #4291 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new method for handling 409 Conflict responses in the
HTTP responses, improving error messaging clarity.

- **Bug Fixes**
- Updated error handling to return conflict responses instead of
forbidden responses when certain delete operations fail due to resource
conflicts.
- Enhanced clarity in user membership responses by changing the error
message when a user is already part of an organization.

These changes improve user experience by providing clearer and more
accurate feedback on error conditions related to resource management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-26 11:57:10 +05:30
Ashish Kolhe 5532b9a570 fix: cache selection strategy (#4322)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Introduced a new configurable caching strategy, allowing users to
choose between "Overlap," "Duration," or "Both" for result caching.
- Added a new public field for `result_cache_selection_strategy` in the
application configuration, providing improved flexibility in managing
caching behavior.

- **Improvements**
- Enhanced the function for processing cache results to accommodate the
new caching strategies, allowing for more nuanced result management
based on user selection.
- Updated the `check_cache` functionality to conditionally sort cached
results and optimize performance based on the state of the cache.
	- Improved tracking of the size of hits in cache responses.
- Added a helper function to streamline the calculation of the discard
timestamp for cached results.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-26 09:53:03 +05:30
Hengfei Yang 0193aaddf1 fix: mysql panic when add data for scheduled_jobs (#4319) 2024-08-24 20:31:15 +08:00
Hengfei Yang a5dd7a341e feat: add histogram interval for search partition (#4314) 2024-08-23 19:06:31 +08:00
Hengfei Yang 82e3bd40d7 fix: traces link panic (#4296) 2024-08-23 17:40:25 +08:00
ktx-vaidehi f60927f459 feat: Dashboard top N results (#4258)
- #4302
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced new configuration options for dashboard panels, including
settings for "Top Results" and an "Others" series to enhance data
visualization.
- Added an input field in the dashboard configuration panel for users to
specify the number of top values displayed.

- **Improvements**
- Enhanced data processing capabilities for SQL data, allowing better
aggregation and sorting of results.
- Streamlined the dashboard configuration flow for an improved user
experience.
- Improved error handling and logging in data processing to enhance
debugging and visibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-23 14:45:39 +05:30
Hengfei Yang 5cd5c2af16 fix: search partition with VRL (#4312) 2024-08-23 16:25:52 +08:00
Subhra264 97d39b4d35 fix: do not allow SELECT * in alert query (#4283)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced validation for alert creation to prevent the use of "SELECT
*" in SQL queries, improving data integrity and security during the
alert setup process.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-23 12:42:10 +05:30
Hengfei Yang 0b966383ef fix: always return single partition for ResultArray VRL (#4300) 2024-08-23 13:33:19 +08:00
Ashish Kolhe 6a1ccf9d8c fix: duplicate records when using result cache (#4293)
Fixes : https://github.com/openobserve/openobserve/issues/4274

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced search response quality by implementing a deduplication step,
ensuring unique entries based on timestamps in the search results.
- Improved delta calculations in the caching mechanism with new
parameters for granular control over time intervals, enhancing the
accuracy of cached data responses.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-23 06:31:10 +05:30
Subhra264 d80a219ba2 fix: use last triggered time for derived stream period to prevent missing data (#4253)
Fixes #4241 

- Adds a new `data` column to `scheduled_jobs` table for the purpose of
storing different data as required by different modules.
- Uses the last end time of stream as the start time of derived stream
calculation.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Added a new `data` field to the `Trigger` structure, allowing for
additional information storage in scheduled jobs.
- Introduced a new `DerivedTriggerData` struct for improved data
handling within the scheduler module.
- Enhanced job evaluation and query conditions with new optional
`start_time` parameters for greater flexibility.

- **Bug Fixes**
- Improved error handling for database schema changes to maintain
backward compatibility with older versions.

- **Refactor**
- Simplified logic within various functions to improve code clarity and
performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-22 19:04:42 +05:30
Hengfei Yang 68e2c7c072 fix: plan error with single core (#4286) 2024-08-22 19:23:43 +08:00
Ashish Kolhe 79079e8e2b fix: add histogram interval for multi result cache (#4285)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced the `ResultCacheMeta` struct to support equality comparisons,
improving filtering and duplicate checks.
- Updated response merging to account for histogram intervals in cache
responses.
- Improved filtering logic to optimize processing of metadata, including
early returns for empty collections.

- **Bug Fixes**
- Refined logic to ensure correct filtering based on response times for
metadata processing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-22 15:37:43 +05:30
Subhra264 d2c09cfc89 feat: add last_triggered_at, owner, last_edited_by, updated_at fields in alerts (#4265)
Addresses #4273 

- Adds `last_triggered_at`, `owner`, `updated_at` and `last_edited_by`
fields (similar to Reports) to Alerts.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced alert and report management with additional metadata fields
for tracking last triggered times, owners, and edit history.
- Introduced user identification in report creation and updates for
better ownership tracking.
  
- **Bug Fixes**
- Improved logic for saving alerts and reports to accurately reflect
their statuses and metadata during creation and updates.
  
- **Documentation**
- Restructured import organization for improved clarity and
maintainability in the codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-21 15:31:14 +05:30