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 new endpoint /metrics with relevant system monitoring metrics #186

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

rosswhitfield
Copy link
Member

@rosswhitfield rosswhitfield commented Sep 26, 2024

Description of the changes

Ref 7060: [WebMon] Add new endpoint /metrics with relevant system monitoring metrics

This add new "metrics" app that will return data in json useful for monitoring. The is an endpoint that returns all the data or you can request specific data. All timestamps will be ISO8601.

To test, start up webmon with docker compose.

Then after logging end you can visit

Should look something like
2024-09-26-160301_500x710_scrot

Anything else I should include?

Check all that apply:

  • updated documentation
  • Source added/refactored
  • Added unit tests
  • Added integration tests
  • (If applicable) Verified that manual tests requiring the /SNS and /HFIR filesystems pass without fail

References:

  • Links to IBM EWM items:
  • Links to related issues or pull requests:

Manual test for the reviewer

(Instructions for testing here)

Check list for the reviewer

  • best software practices
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 86.31579% with 13 lines in your changes missing coverage. Please review.

Project coverage is 77.51%. Comparing base (793af07) to head (c766206).
Report is 3 commits behind head on next.

Files with missing lines Patch % Lines
src/webmon_app/reporting/metrics/views.py 67.74% 10 Missing ⚠️
src/webmon_app/reporting/metrics/view_util.py 96.29% 2 Missing ⚠️
src/webmon_app/reporting/dasmon/view_util.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #186      +/-   ##
==========================================
+ Coverage   77.33%   77.51%   +0.17%     
==========================================
  Files          51       54       +3     
  Lines        4611     4700      +89     
==========================================
+ Hits         3566     3643      +77     
- Misses       1045     1057      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rosswhitfield rosswhitfield changed the title Add metrics endpoint to return useful data in json Add new endpoint /metrics with relevant system monitoring metrics Sep 26, 2024
@backmari
Copy link
Contributor

Tested locally and the /metrics/ endpoint and related views under it work as expected.
image

Copy link
Contributor

@backmari backmari left a comment

Choose a reason for hiding this comment

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

Tested locally that the status unknown appears in the metrics.

@rosswhitfield rosswhitfield merged commit 7dc0e6b into next Sep 30, 2024
4 checks passed
@rosswhitfield rosswhitfield deleted the metrics branch September 30, 2024 22:43
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.

3 participants