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

Feature Request: Add Product Metrics and Product Type Labels #1

Open
tidusete opened this issue Nov 13, 2024 · 1 comment
Open

Feature Request: Add Product Metrics and Product Type Labels #1

tidusete opened this issue Nov 13, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tidusete
Copy link

Description

I would like to propose adding a new metric and enhancing existing metrics in the DefectDojo exporter:

  1. dojo_products
    • Purpose: Track products information in DefectDojo
    • Possible implementations:
      • Counter showing total number of products
      • Gauge with labels containing product names

Additional Enhancement

I suggest adding a product_type label to all existing metrics. This would greatly improve the ability to group and analyze metrics by product type in Grafana dashboards.

Benefits

  • Better visibility into product distribution
  • Improved grouping capabilities in Grafana
  • More comprehensive monitoring of DefectDojo's product hierarchy

Example Metric Format

# HELP dojo_products Total number of products in DefectDojo
# TYPE dojo_products gauge
dojo_products{product_type="webapp"} 5
dojo_products{product_type="api"} 3

Questions to Consider

  • Should the metric be a counter or gauge?
  • Should we include additional labels beyond product_type?

Let me know if you need any clarification or have questions about this proposal.

@iamhalje iamhalje added the good first issue Good for newcomers label Nov 13, 2024
@iamhalje
Copy link
Owner

It will be possible to display the vulnerabilities by product_type in Grafana and retrieve the necessary product-specific vulnerabilities. Yep, it looks convenient.

Should the metric be a counter or gauge?

I think that is a gauge metric. Since we update the metrics every time, meaning we reset them, this is how all the metrics are currently collected. A counter is not used for this.

Should we include any additional labels besides product_type?

There are no other mandatory fields for the product except for product_type, so this will need to be worked around (or excluded). For now, we can start by adding only product_type.

Would you like to add it yourself? 😊

@iamhalje iamhalje added the enhancement New feature or request label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants