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 OnboardingTask status and failure reason metrics! #87

Merged
merged 3 commits into from Mar 27, 2023
Merged

Conversation

scetron
Copy link
Contributor

@scetron scetron commented Mar 24, 2023

Addresses Issue #86
Closes #86

Adds metrics for OnboardingTask status and failure reasons.

Added as a gauge because users can delete results.

Metrics:

# HELP deviceonboarding_onboardtask_results_count Device Onboarding Task Results
# TYPE deviceonboarding_onboardtask_results_count gauge
deviceonboarding_onboardtask_results_count{name="total"} 2.0
deviceonboarding_onboardtask_results_count{name="failed"} 0.0
deviceonboarding_onboardtask_results_count{name="pending"} 0.0
deviceonboarding_onboardtask_results_count{name="running"} 0.0
deviceonboarding_onboardtask_results_count{name="succeeded"} 2.0
deviceonboarding_onboardtask_results_count{name="skipped"} 0.0
# HELP deviceonboarding_onboardtask_failure_count Device Onboarding Failures
# TYPE deviceonboarding_onboardtask_failure_count gauge
deviceonboarding_onboardtask_failure_count{name="fail-login"} 0.0
deviceonboarding_onboardtask_failure_count{name="fail-config"} 0.0
deviceonboarding_onboardtask_failure_count{name="fail-connect"} 0.0
deviceonboarding_onboardtask_failure_count{name="fail-execute"} 0.0
deviceonboarding_onboardtask_failure_count{name="fail-general"} 0.0
deviceonboarding_onboardtask_failure_count{name="fail-dns"} 0.0

@scetron scetron added the enhancement New feature or request label Mar 24, 2023
@scetron scetron self-assigned this Mar 24, 2023
Copy link
Contributor

@chadell chadell left a comment

Choose a reason for hiding this comment

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

LGTM
A small description per function would be helpful to easily understand the purpose

@scetron
Copy link
Contributor Author

scetron commented Mar 27, 2023

Added docstrings and linting adjustments.

@scetron scetron merged commit edbb349 into develop Mar 27, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Prometheus metrics for onboard device
2 participants