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

Add a sort option to 'scope events' #813

Closed
seanvaleo opened this issue Feb 25, 2022 · 2 comments · Fixed by #821
Closed

Add a sort option to 'scope events' #813

seanvaleo opened this issue Feb 25, 2022 · 2 comments · Fixed by #821
Assignees
Labels
cli good first issue Good issue for newcomers
Milestone

Comments

@seanvaleo
Copy link
Collaborator

seanvaleo commented Feb 25, 2022

When the scope events command is run, events are displayed in the order in which they are flushed to disk/network, which isn't always entirely chronological. For example, console events are cached for 2 seconds before being written to the events.json file.

We should add a sort option to the scope events command in the cli to improve UX.

@seanvaleo seanvaleo added cli good first issue Good issue for newcomers labels Feb 25, 2022
@ghost ghost added this to the Next Maintenance (1.0.2) milestone Mar 3, 2022
@seanvaleo seanvaleo self-assigned this Mar 3, 2022
@seanvaleo
Copy link
Collaborator Author

seanvaleo commented Mar 7, 2022

QA INSTRUCTIONS

Part 1
Do:

docker run --rm -it cribl/scope:<VERSION_ID>
apt update
apt install curl -y
scope curl wttr.in
scope events
scope events --sort _time
scope events --sort _time --reverse
scope events --sort source
scope events --sort sourcetype --reverse
scope events --sort nonexisting
# etc...

Expect:
You are able to sort on any valid event body field name. View the json output with scope events -j to see field names.

@seanvaleo seanvaleo linked a pull request Mar 7, 2022 that will close this issue
@jrcheli
Copy link
Contributor

jrcheli commented Mar 10, 2022

I bugathoned this with v1.0.2-rc0 on 10-Mar-2022. Looks great!

@abetones abetones added release-note Issues & PRs that should be listed in release notes and removed release-note Issues & PRs that should be listed in release notes labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli good first issue Good issue for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants