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

Add cert lifetime metrics #792

Closed
atc0005 opened this issue Feb 29, 2024 · 0 comments · Fixed by #813
Closed

Add cert lifetime metrics #792

atc0005 opened this issue Feb 29, 2024 · 0 comments · Fixed by #813
Assignees
Labels
enhancement New feature or request output/perfdata Service Perf Data (aka, "performance data") plugin/check_cert
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Feb 29, 2024

With some certificates having (at present) 398 days maximum and others having 90 days we need to provide a way to indicate (programmatically) what lifetime remains for a certificate. Said another way, a certificate with a maximum lifetime of 90 days having 30 days remaining (presumably managed by an agent) is less of a concern than a certificate with a maximum lifetime of 398 days that has 30 days remaining (presumably not managed by an agent).

One use case is collecting these metrics and using a reporting tool to provide a % listing of a cert's remaining lifetime.

It might also be useful to provide metrics for the chain as a whole (using the certificate with the lowest lifetime in the chain).

EDIT:

Perhaps per chain position lifetime metric also?

See also:

@atc0005 atc0005 added enhancement New feature or request plugin/check_cert output/perfdata Service Perf Data (aka, "performance data") labels Feb 29, 2024
@atc0005 atc0005 added this to the Future milestone Feb 29, 2024
@atc0005 atc0005 self-assigned this Feb 29, 2024
@atc0005 atc0005 modified the milestones: Future, Next Release Mar 13, 2024
atc0005 added a commit that referenced this issue Mar 14, 2024
New performance data metrics:

- `life_remaining_leaf`
- `life_remaining_intermediate`

New helper funcs:

- certs.MaxLifespan
- certs.MaxLifespanInDays
- certs.LifeRemainingPercentage
- certs.LifeRemainingPercentageTruncated

refs GH-792
atc0005 added a commit that referenced this issue Mar 14, 2024
New performance data metrics:

- `life_remaining_leaf`
- `life_remaining_intermediate`

New helper funcs:

- `certs.MaxLifespan`
- `certs.MaxLifespanInDays`
- `certs.LifeRemainingPercentage`
- `certs.LifeRemainingPercentageTruncated`

refs GH-792
atc0005 added a commit that referenced this issue Mar 14, 2024
Add coverage for new performance data metrics:

- `life_remaining_leaf`
- `life_remaining_intermediate`

refs GH-792
atc0005 added a commit that referenced this issue Mar 14, 2024
New performance data metrics:

- `life_remaining_leaf`
- `life_remaining_intermediate`

New helper funcs:

- `certs.MaxLifespan`
- `certs.MaxLifespanInDays`
- `certs.LifeRemainingPercentage`
- `certs.LifeRemainingPercentageTruncated`

Update README to list new performance data metrics.

refs GH-792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request output/perfdata Service Perf Data (aka, "performance data") plugin/check_cert
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant