feat(metrics): add system uptime monitoring collector (#217)#250
Merged
Conversation
Implement cross-platform system uptime monitoring to track boot time and system availability for SLA compliance and stability analysis. - Add uptime_collector with uptime_info_collector pattern - Linux: Read /proc/uptime for uptime and idle seconds - macOS: Use sysctl(KERN_BOOTTIME) for boot timestamp - Windows: Use GetTickCount64() for uptime calculation - Add comprehensive unit tests (18 tests passing) Metrics collected: - system_uptime_seconds: Time since boot - system_boot_timestamp: Unix timestamp of last boot - system_idle_seconds: Total idle time (Linux only)
- Add system uptime monitoring section to FEATURES.md - Add uptime_collector API reference to API_REFERENCE.md - Update CHANGELOG.md and CHANGELOG_KO.md with new feature
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
* feat(metrics): add system uptime monitoring collector (#217) Implement cross-platform system uptime monitoring to track boot time and system availability for SLA compliance and stability analysis. - Add uptime_collector with uptime_info_collector pattern - Linux: Read /proc/uptime for uptime and idle seconds - macOS: Use sysctl(KERN_BOOTTIME) for boot timestamp - Windows: Use GetTickCount64() for uptime calculation - Add comprehensive unit tests (18 tests passing) Metrics collected: - system_uptime_seconds: Time since boot - system_boot_timestamp: Unix timestamp of last boot - system_idle_seconds: Total idle time (Linux only) * docs: update documentation for uptime collector (#217) - Add system uptime monitoring section to FEATURES.md - Add uptime_collector API reference to API_REFERENCE.md - Update CHANGELOG.md and CHANGELOG_KO.md with new feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Implementation
include/kcenon/monitoring/collectors/uptime_collector.h- Header with uptime_metrics and collector classessrc/impl/uptime_collector.cpp- Main collector implementationsrc/platform/linux_uptime_metrics.cpp- Linux:/proc/uptimeparsingsrc/platform/macos_uptime_metrics.cpp- macOS:sysctl(KERN_BOOTTIME)src/platform/windows_uptime_metrics.cpp- Windows:GetTickCount64()tests/test_uptime_collector.cpp- Unit testsMetrics Collected
system_uptime_secondssystem_boot_timestampsystem_idle_secondsPlatform Support
/proc/uptimesysctl(KERN_BOOTTIME)GetTickCount64()Test Plan
Closes #217