Commit Graph
3678 Commits
Author SHA1 Message Date
Subhra264 c8bee3ff9f fix: passcode reset for root user (#6968)
Fixes #6928 

Currently if the root user resets the ingestion passcode token, the
cache is not updated for root user, hence on refresh it still shows the
old passcode even though it is changed. As a result, the ingestion
passcode token shown on UI does not work.
2025-05-29 22:09:07 +05:30
Abhay Padamani 046d97e175 fix: NOT IN filter parsing issue for visualization (#6966)
- `NOT IN`, `Starts With` and `Ends With` filters support for
visualization.
2025-05-29 18:25:05 +05:30
Hengfei Yang 9eeb8b3ca3 fix: Query leader on super cluster always use all of the CPU (#6962)
fixed: #6960
2025-05-29 18:55:22 +08:00
Abhay Padamani 04085ffe8a feat: group trellis chart for multiple y axis (#6951)
- Group trellis series for multi Y-axis is `false`

![image](https://github.com/user-attachments/assets/69714ac7-863a-4354-940b-aaf7838a0b08)

- Group trellis series for multi Y-axis is `true`

![image](https://github.com/user-attachments/assets/aa035859-6530-4f2b-94e0-3aac250f01ea)
2025-05-29 14:28:23 +05:30
Omkar Kesarkhane f499a9a9b8 fix: Added label for duration field in traces (#6939)
Duration field was getting added to query as `duration (us)`. Added
label key in field object for displaying label
2025-05-29 13:11:35 +05:30
Siddharth d16b813ca7 refactor: Writer new method & Reader test (#6917) 2025-05-29 09:23:57 +08:00
Taiming Liu 961976f8df fix: ent build (#6957) 2025-05-28 09:43:42 -07:00
Hengfei Yang fa6454267c feat: add search scheduler (#6950)
impl #6948

- [x] When we run query, we get node list and check the node CPU, drop
at most 20% querier nodes.
- [x] When download file, we first try to download from original node(
by consistent hashing), then download from object store.
- [ ] ? should also apply this logic for ingester node ?
- [x] Fixed metrics keep increase issue of DownloadManager
2025-05-28 23:31:57 +08:00
Bhargav e4eacc1471 fix: added missing org identifier in url (#6952) 2025-05-28 18:16:24 +05:30
Sai Nikhil 980c928635 fix: show service accounts in enterprise version only (#6947) 2025-05-28 16:36:45 +05:30
Hengfei Yang 02f29edc3a fix: node list API by router (#6946) 2025-05-28 17:44:23 +08:00
Ashish Kolhe 9e37bd11f8 fix: consider global data retension (#6943) (#6945) 2025-05-28 16:36:57 +08:00
Bhargav 0e11dcbb7d fix: user list issue (#6940) 2025-05-28 12:45:09 +05:30
Shyam Panjiyar 3fbe1e17dc test: Resolved issues after Integrating organization pytest (#6942)
Resolved issues after Integrating organization pytest
2025-05-28 12:13:21 +05:30
Yashodhan JoshiandYashodhan Joshi 7540824633 fix: use _all_ in org related api call perm checks (#6920)
Fixes permission check for organization related api. In ofga when we set
a role with org perms, it sets to `org:_all_{org}` but in the check , we
check for permission on `org:{org}` which causes users with role having
permission on org, not be able to rename org. This fixes it by updating
it to correct check.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-28 11:02:01 +05:30
Huaijinandhengfei yang b205571e1f chore: update datafusion to v46.0.0 (#6924)
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
2025-05-28 12:56:10 +08:00
Hengfei Yang 44f435028e fix: if gRPC can't start we should stop the app (#6925)
- [x] fix: if gRPC can't start we should stop the app #6874
- [x] feat: remove match_all_raw #6935
- [x] feat: node list API will return by router
2025-05-28 08:42:49 +08:00
udev 6c6fb38b77 fix: values api response total (#6934)
the values response hits always honor the size, but the total field
which indicates the count of responses is returning incorrect results.
This PR fixes it.

This PR also fixes a migration issue where the ID field were used as i64
ref: #5612
2025-05-27 22:56:58 +05:30
udev b01000f338 fix: handle stream unwrap in AI handler (#6938) 2025-05-27 20:31:08 +05:30
udev ae7623f4bb fix: do division first while calculating partitions (#6931)
We see an overflow when we multiply the query duration to a large
storage size, to fix it we divide the storage size first with the data
retention time
2025-05-27 18:46:14 +05:30
Shyam PanjiyarandSubhradeep Chakraborty 289d6234e5 test: new org created pytest (#6926)
New organizations created

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
2025-05-27 17:54:43 +05:30
Hengfei Yang d8349974f5 perf: use tantivy to optimize histogram & count without filter (#6930) 2025-05-27 19:46:32 +08:00
31703cc9d2 feat: o2 AI Agent (#6899)
this PR introduces o2 ai agent with this user able to ask o2 ai about
sql query , vrl query and logs

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-05-27 15:09:19 +05:30
Hengfei Yang b134b6e872 fix: stream stats for super cluster (#6921)
The issue is when we get cluster list we didn't filter the alert querier
cluster then the stats duplicated. The fix in o2 enterprise. this pr
only update some logs.
2025-05-27 15:36:06 +08:00
Patrick Sullivan 9241470365 fix: Add explicit ordering to pagination in migrations (#5668) 2025-05-27 15:02:05 +08:00
Patrick Sullivan b99f6d994a fix: Migration to delete dashboards with JSON data that cannot be parsed (#5612) 2025-05-27 14:59:13 +08:00
Omkar Kesarkhaneandktx-vaidehi cbeb8af531 fix: Dashboard drilldown editor issue (#6893) (#6913)
In dashboard panel edit mode, repeatedly adding and closing a drill-down
with an SQL query causes the UI to freeze due to a memory leak in the
Quasar dialog component.

Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
2025-05-27 11:32:44 +05:30
Ashish Kolhe de5da35d0d feat: add ndjson as output format (#6919) 2025-05-27 08:51:10 +05:30
c1d7caf15b fix: demote log level to debug when local cache insert fails (#6908)
demotes the log level to debug for when local cache insert fails. This
can happen when multiple queries on same stream for same range are
fired, and after getting file meta from pg, all of them try to insert in
local cache, and after one of them succeeds others will fail with sqlite
error of unique constraint violation. This will simply log it on debug
level instead of error, because even if insert fails in local cache, not
a big problem.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-05-26 10:50:08 -07:00
Subhra264 052b205648 fix: update DB_SCHEMA_VERSION (#6914)
Since the organization revamp is merged, all the migrations for
organization revamp needs to run. So, the `DB_SCHEMA_VERSION` needs to
be upgraded.
2025-05-26 17:19:02 +05:30
Hengfei Yang 301af74bf5 fix: router with base_uri (#6905)
fixed #6883 #6725
2025-05-26 16:06:00 +08:00
Abhay Padamani 9c57a6edc9 feat: axis value support for drilldown (#6894)
- `series.__axisValue` variable support to pass axis value for
drilldown.


![image](https://github.com/user-attachments/assets/24fdee9a-9098-4d5c-a08e-cd23ff3894a6)


![image](https://github.com/user-attachments/assets/38dea00a-20f7-4dc6-84e8-0c79835c9dfe)
2025-05-26 11:54:23 +05:30
+2 0d9f47966b feat: Organization revamp (#5579)
Fixes #5131 
Addresses #5408 

### Revamp
- Created a new table to store organizations in the `organizations`
table. Earlier, we never stored organizations in any table, rather we
used to store the organizations in the meta table as part of the `user`
json.
- The users and organization membership relations are now moved to its
own separate tables - `users` and `org_users`.

### New changes

**API changes** -
- `/organizations` - `POST` api to create an org and save it in the meta
table. In non-enterprise version, currently only the root user can
create the org. For enterprise version with rbac enabled, anyone with
`CREATE` access for organizations can create the organization and
becomes an admin. Root user can always create an organization.
- `/{org_id}/rename` - `PUT` api to rename the existing org. Only root
user and the admins of the org can access this API.

The payload for following APIs are changed -
- `POST api/{org_id}/roles` - `{"name":"new_role"}` is changed to
`{"role":"new_role"}
- `POST api/{org_id}/users/{user}` -
`{"role":"viewer","custom_role":["role_name"]}` is the new payload where
`custom_role` is optional and is array of custom roles (only works in
enterprise with rbac enabled) which will be assigned to the user. The
value of `role` can be standard role or as well as any custom role (when
it is custom role, the standard role assigned to the user is decided
based on the enterprise env variable - `O2_DEX_DEFAULT_ROLE`).
- `POST api/{org_id}/users`- the payload -
```
{"email":"user@user.com","role":"viewer","custom_role":["create_org_permission"],"password":"12345678", "first_name": "", "last_name":""}
```

- `PUT api//{org_id}/users/{email_id}` the payload -
```
{"first_name":"Hello","last_name":"j","role":"viewer","isExternal":false,"change_password":false,"password":"","custom_role":["create_org_permission"]}
```


A new ENV variable is introduced - `ZO_CREATE_ORG_THROUGH_INGESTION`
(default `false`) which if true, an org will automatically created when
ingesting data to a new org. If false, user can not create org by
ingesting data to new org, they need to first call the `POST
/organizations` API.

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

## Release Notes

**New Features**
- Added a `cloud` feature for enhanced organizational management
capabilities.
- Introduced new methods for managing organizational users and
asynchronous message processing.
- Enhanced user invitation and membership features, including improved
role handling.
- Implemented configurable ingestion URL support across various
components.
- Added new functionality for user management and organization handling
in the super cluster architecture.

**Improvements**
- Refined user authentication and authorization processes, including
error handling.
- Updated database schema to support multi-organization architecture.
- Enhanced pagination settings and UI components for better user
experience.
- Improved handling of organization names and user roles in
notifications and alerts.
- Streamlined service account token management with visibility
enhancements.
- Enhanced the `AddUpdateOrganization` component with improved user
input handling and validation.
- Updated the `AppOrganizations` component to dynamically load the
appropriate organization management interface.
- Improved the `ServiceAccountsList` component with updated pagination
options and token handling logic.

**Bug Fixes**
- Resolved issues with user role assignments and organization management
inconsistencies.
- Corrected routing and navigation logic for login and logout processes.
- Addressed various error handling scenarios in user and organization
processes.
- Fixed issues with the visibility of service account options in the
`EditGroup` and `EditRole` components based on the cloud configuration.

**Breaking Changes**
- Significant restructuring of user and organization data models.
- Changes to authentication workflows and configuration handling.
- Removal of certain components related to user and organization
management.
- Updated the logic for determining the ingestion URL across various
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
Co-authored-by: harshiv-7 <harshiv@openobserve.ai>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
Co-authored-by: Zhao.wei <weizhao029@gmail.com>
Co-authored-by: ShyamOOAI <shyam@openobserve.ai>
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yashodhan@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-25 21:53:55 -07:00
Hengfei Yang d753a871b1 fix: tantivy timestamp update time (#6900)
There is one issue the `tantivy::TIMESTAMP_UPDATED_AT` never create
before call search, but maybe we already created a lot of index files.

So we need to init this time when the app start.
2025-05-25 11:19:01 +08:00
Hengfei Yang 8be4307bd3 fix: add more unit test for time parse (#6898) 2025-05-24 22:05:47 +08:00
Taiming Liu f680073307 feat: add _timestamp to tantivy index to optimize histogram queries (#6801) 2025-05-24 11:15:46 +08:00
Hengfei Yang 3599213c0e fix: broadcast on compactor (#6897) 2025-05-23 20:41:56 +08:00
Hengfei Yang b058106166 fix: broadcast event use file id (#6891)
- [x] fix: broadcast event use file id
- [x] feat: add metrics for consistent hashing
2025-05-23 16:56:06 +08:00
Hengfei Yang 9c585d73a4 fix: ider init with machine id (#6840) 2025-05-23 16:20:57 +08:00
Shyam Panjiyar 68f9193bec test: validate max_query_range for 1 hour pytest (#6890)
Validate max_query_range for 1 hour pytest
1. HTTP Cache False
2. HTTP Cache True
3. Streaming Search Cache False
4. Streaming Search Cache True
2025-05-23 11:33:31 +05:30
Abhay Padamaniandktx-akshay c87a7b7a90 fix: pass query as single line for partition and search API call (#6815)
- #6816

---------

Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
2025-05-23 10:46:48 +05:30
udev 52dd1df640 fix: Partition stream stats handle case when end time is 0 (#6882)
Handle the case when stream stats end time is set to unix epoch
2025-05-22 18:20:48 +05:30
Yashodhan JoshiandYashodhan Joshi eaff74ee9d fix: ent deadlock with sqlite (#6878)
Issue was that we use a lock function to lock sqlite client when doing
write ops, because only one thread should do them at a time. However,
the client init also requires a lock. When running ent version, ent init
had a function which would lock as well as be the first one to access
the client, hence deadlock on the client lock.

This issue was not there when running for the first time, because in
migration function we init clients without the locks. However when
running second time, the migration returns early, and does not int
clients hence the ent function deadlocks, and subsequently locks
everything that need the db access.

The fix is simple, in migration function move the client init before
return, so that we always have an initialized client and do not get
deadlocked in ent or non ent version.

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-22 16:34:48 +05:30
Loakesh Indiran f683003e8e fix: add lock to download file (#6875) (#6880)
fix #6875
2025-05-22 15:54:42 +05:30
367ddcd821 feat: streaming aggr support for http (#6854)
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: omkark06 <omkar@zinclabs.io>
2025-05-22 11:49:54 +05:30
Hengfei Yang b105a9ef99 fix: move event download to download manager (#6873) 2025-05-22 12:46:58 +08:00
Loakesh Indiran 9211b15ef8 feat: download manager improvements (#6852)
Closes: https://github.com/openobserve/openobserve/issues/6786
Ref: https://github.com/openobserve/openobserve/pull/6792

New Env: 
```
ZO_FILE_DOWNLOAD_ENABLE_PRIORITY_QUEUE # default true
ZO_FILE_DOWNLOAD_PRIORITY_QUEUE_THREAD_NUM # default 0
ZO_FILE_DOWNLOAD_PRIORITY_QUEUE_WINDOW_SECS # default 3600
```

New Metrics:
```
zo_query_disk_cache_hit_count
zo_query_disk_cache_miss_count
zo_file_downloader_normal_queue_size
zo_file_downloader_priority_queue_size
```

Todo:
- [x] add priority queue and logic to determine of a file `is_priority` 
- [x] add env for priority queue threads, time window
- [x] add metrics for `cache_hits`, `cache_miss`, `queue_length` (both
normal & priority queue)
2025-05-21 21:33:23 +05:30
udevandhengfei yang 86990481b9 fix: add nats logs (#6860) (#6861)
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
2025-05-21 20:59:07 +05:30
udev 4ac6cd3a73 fix: truncate if more results from df (#6851) (#6869)
In some cases when limit was added to the sql query we would report more
results than that size was asked. This PR adds checks to never return
more results than the `size` parameter
2025-05-21 20:25:06 +05:30
Loakesh Indiran 1ad3f8368e fix: chery-pick fixes (#6853)
- fix: auth for _values_stream (#6849)
- fix: simple distinct sql for http api (#6836)
- feat: add env to enable use_stream_setting for partitions (#6866)

# closes
- https://github.com/openobserve/openobserve/issues/6863

New Env
```
ZO_USE_STREAM_SETTINGS_FOR_PARTITIONS_ENABLED # default false
```
2025-05-21 17:12:52 +05:30