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

[whitelist] metrics improvement #2517

Closed

Conversation

LaurenceJJones
Copy link
Contributor

@LaurenceJJones LaurenceJJones commented Oct 4, 2023

Fix #2462
Based on #2422

We split out whitelist metrics from parsers, and provide detail breakdown of each expression.

Mostly looking for feedback as I know on the metrics side, we still need to merge the above before moving forward with this one.

Example of metrics;

Whitelist Metrics:
╭───────────────────────────────────────────┬────┬──────╮
│                 Whitelist                 │ WL │ NoWL │
├───────────────────────────────────────────┼────┼──────┤
│ crowdsecurity/jellyfin-whitelist:[0]      │ -  │ 4    │
│ crowdsecurity/nextcloud-whitelist:[0]     │ 4  │ -    │
│ crowdsecurity/whitelists:[10.0.0.0/8]     │ -  │ 4    │
│ crowdsecurity/whitelists:[127.0.0.1]      │ -  │ 4    │
│ crowdsecurity/whitelists:[172.16.0.0/12]  │ -  │ 4    │
│ crowdsecurity/whitelists:[192.168.0.0/16] │ -  │ 4    │
│ crowdsecurity/whitelists:[::1]            │ -  │ 4    │
╰───────────────────────────────────────────┴────┴──────╯

Currently I am using the actual index but for users we may just want to increase the digit +1 so they know if was the first expression that passed for example.

LaurenceJJones and others added 27 commits August 10, 2023 09:48
…e check node debug we can make a pointer to node containing whitelist
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

@LaurenceJJones: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

@LaurenceJJones: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (272cf54) 57.16% compared to head (94de6de) 56.97%.
Report is 63 commits behind head on master.

Files Patch % Lines
cmd/crowdsec-cli/metrics.go 18.75% 13 Missing ⚠️
cmd/crowdsec-cli/metrics_table.go 50.00% 4 Missing and 2 partials ⚠️
pkg/parser/node_metrics.go 77.77% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2517      +/-   ##
==========================================
- Coverage   57.16%   56.97%   -0.20%     
==========================================
  Files         190      187       -3     
  Lines       26156    25845     -311     
==========================================
- Hits        14953    14726     -227     
+ Misses       9633     9573      -60     
+ Partials     1570     1546      -24     
Flag Coverage Δ
bats 38.78% <42.85%> (-0.10%) ⬇️
unit-linux 55.18% <87.50%> (+0.01%) ⬆️
unit-windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LaurenceJJones
Copy link
Contributor Author

/kind enhancement
/area agent

@LaurenceJJones LaurenceJJones added this to the 1.5.6 milestone Oct 16, 2023
@LaurenceJJones LaurenceJJones marked this pull request as draft November 28, 2023 13:16
@mmetc
Copy link
Contributor

mmetc commented Dec 18, 2023

Hi @LaurenceJJones what's the state on this?
Still aimed at 1.5.6? Can I help address the conflicts?
I ask because I'd like to refact and address #2618

@LaurenceJJones LaurenceJJones modified the milestones: 1.5.6, 1.6.1 Jan 19, 2024
@LaurenceJJones
Copy link
Contributor Author

Closed in favor of #2813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement] Whitelist metrics
3 participants