-
Notifications
You must be signed in to change notification settings - Fork 7
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
Including health check response in telemetry #151
Conversation
Let's also add the healthCheck details to the elastic model as well:
|
ce96889
to
5b18fdd
Compare
url = Text() | ||
status= Boolean() | ||
status_code= Text() | ||
start_timestamp= Text() |
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.
wondering if these two timestamps should be Date types
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.
Modified to the Date() datetype
status_code= Text() | ||
start_timestamp= Text() | ||
end_timestamp= Text() | ||
duration= Text() |
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.
@tsebastiani @chaitanyaenr what are your thoughts on putting this as an int/float (number of seconds) that the url had a certain status? Meghana had put in HH:MM:SS which is nice to look at but wondering for consistency if seconds would be better and easier to put into graphs for visualization. Thoughts?
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.
+1
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.
Changed the duration into integer type
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.
/lgtm
The health check response follows the below format. Success case: Failure case: When the health check configuration is empty, no data will be pushed to Elasticsearch. the following data will be displayed in telemetry. |
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
892a85c
to
828a9d1
Compare
src/krkn_lib/tests/base_test.py
Outdated
"status_code": "503", | ||
"start_timestamp": "2025-03-05 12:47:59", | ||
"end_timestamp": "2025-03-05 12:48:02", | ||
"duration": "0:00:03" |
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.
You should align the tests with the new duration format
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.
Made the changes
self.assertEqual(elastic_telemetry.health_checks[0].status_code, "503") | ||
self.assertEqual(elastic_telemetry.health_checks[0].start_timestamp, "2025-03-05 12:47:59") | ||
self.assertEqual(elastic_telemetry.health_checks[0].end_timestamp, "2025-03-05 12:48:02") | ||
self.assertEqual(elastic_telemetry.health_checks[0].duration, "0:00:03") |
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.
same here
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.
Made the changes
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
Signed-off-by: kattameghana <[email protected]>
@kattameghana when you get your PR into a place where your tests are passing, you should try to squash your commits into one commit: https://github.com/krkn-chaos/krkn/blob/main/docs/contribute.md#squash-commits |
No description provided.