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

feat: monitoring for the vulnz cli (#230) #236

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

refflinghaus
Copy link
Contributor

1.) To better monitor the vulzn CLI, a scheduler has been implemented that writes metrics to the htdocs folder. These metrics can be read by a Prometheus system, for example. Metrics are only written if the vulzn CLI is also running. This feature is disabled by default and can be enabled via the ENV variable METRICS_ENABLE=true. This is used for better analysis of memory issues. The metrics can be accessed via HTTP at /metrics. This additional metrics file does not affect the OWASP dependency check. To achieve this, new dependencies had to be added to the project. Currently, only the standard JVM metrics are being written, but it can also be extended to include custom metrics.
image
image

2.) As an additional improvement to track version changes based on the log, the banner was extended to include the version number.
image

3.) .gitattribute added for building the docker image under Windows OS, because of CRLF and LF problems

4.) readme.md Configuration extended with missing ENV vars.
image

Add a .gitattributes file to enforce LF line endings for .sh and .conf files on checkout. This ensures consistent line endings across different operating systems, preventing potential issues with scripts and configuration files. Running dockerfile under Windows failed with CRLF
Introduced Prometheus metrics integration for the application, enabling metrics reporting via a scheduled file writer when metrics are enabled. Updated dependencies to include necessary Prometheus libraries and modified configurations and documentation to support this new feature. The scheduling feature can be enabled by setting the environment variable METRICS_ENABLE to true. However, metrics will only be written to the /metrics endpoint if the vulnz CLI is running. Additionally, the container's version will be printed to the console during startup.
@refflinghaus refflinghaus changed the title Monitoring for the vulnz cli#230 Monitoring for the vulnz cli (#230) Dec 9, 2024
Copy link
Owner

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

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

LGTM

@jeremylong jeremylong merged commit 801aaaa into jeremylong:main Dec 21, 2024
1 check passed
@jeremylong jeremylong changed the title Monitoring for the vulnz cli (#230) feat: monitoring for the vulnz cli (#230) Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants