-
Notifications
You must be signed in to change notification settings - Fork 369
Introduce metrics representing N+ license status #1102
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
base: main
Are you sure you want to change the base?
Conversation
Hi @defanator! Welcome to the project! 🎉 Thanks for opening this pull request! |
@mpstefan @pdabelf5 @javorszky appreciate extra eyes on this one gentlemen, it would be great if it could land into next release of exporter itself + hopefully included into one of the next NIC releases. We have a few ongoing and upcoming tasks where we do consider lack of proposed metric as a blocker. TIA! |
458945a
to
84ad998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces NGINX Plus license-related metrics to enable monitoring and alerting on license expiration and reporting status. The implementation adds a new API call to retrieve license information and exposes it through Prometheus metrics.
- Adds four new license-related metrics for expiration date, reporting health, failure count, and grace period
- Integrates with existing NGINX Plus client to fetch license data during metric collection
- Follows established patterns for metric naming and error handling
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Proposed changes
This PR adds N+ specific metrics indicating license status (expiration date plus some reporting counters available through the N+ API license object). Primary purpose of these is to be used in associated alerting, as N+ API is the lowest possible source of truth in regard to everything connected to N+ license.
The semantic is borrowed from similar cert-manager metrics which are widely used in lots of environments.
Example output in Prometheus format:
Checklist
Before creating a PR, run through this checklist and mark each as complete.