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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add percentage of total number of events to index status #2351

Merged
merged 4 commits into from Jun 21, 2022

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Jun 16, 2022

This allows for running things like this to get a visual representation of the event distribution:

vast status --detailed index | jq -r '.index.statistics.layouts | to_entries | sort_by(-.value.percentage) | .[] | "\(.key): \(.value.percentage * 100 | round / 100)%"'
suricata.flow: 80.74%
suricata.dns: 7.85%
suricata.http: 5.35%
suricata.fileinfo: 4.57%
suricata.tls: 1.04%
suricata.ftp: 0.41%
suricata.smtp: 0.04%
suricata.stats: 0%

馃摑 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

馃幆 Review Instructions

This should be a trivial review.

@dominiklohmann dominiklohmann added enhancement blocked Blocked by an (external) issue labels Jun 16, 2022
@dominiklohmann dominiklohmann requested a review from a team June 16, 2022 12:41
This allows for running things like this to get a visual representation of the
event distribution:

```bash
vast status --detailed index | jq -r '.index.statistics.layouts | to_entries | sort_by(-.value.rate) | .[] | "\(.key): \(.value.rate * 10000 | round / 100)%"'
```

```
suricata.flow: 80.74%
suricata.dns: 7.85%
suricata.http: 5.35%
suricata.fileinfo: 4.57%
suricata.tls: 1.04%
suricata.ftp: 0.41%
suricata.smtp: 0.04%
suricata.stats: 0%
```
@dominiklohmann dominiklohmann changed the title Add rate of total number of events to index status Add percentage of total number of events to index status Jun 16, 2022
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We paired on the metric naming. Integration tests look good.

Copy link
Contributor

@6yozo 6yozo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have validated the output of vast status --detailed index with a local build. It works correctly!

@dominiklohmann dominiklohmann removed the blocked Blocked by an (external) issue label Jun 19, 2022
@dominiklohmann dominiklohmann merged commit 9c05b8a into master Jun 21, 2022
@dominiklohmann dominiklohmann deleted the topic/status-event-rates branch June 21, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants