Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring Namespace Reference

Namespaces

namespace  adapters
 
namespace  collectors
 
namespace  concepts
 
namespace  core
 
namespace  detail
 
namespace  exporters
 
namespace  hot_path
 
namespace  interfaces
 
namespace  metrics
 
namespace  platform
 
namespace  plugins
 
namespace  stats
 
namespace  utils
 

Classes

class  absent_trigger
 Trigger when no data is received for a period. More...
 
struct  adaptation_stats
 Adaptation statistics. More...
 
class  adaptive_collector
 Adaptive collector wrapper. More...
 
struct  adaptive_config
 Adaptive configuration parameters. More...
 
class  adaptive_monitor
 Adaptive monitoring controller. More...
 
class  adaptive_scope
 Adaptive monitoring scope. More...
 
class  aggregation_processor
 Processes metric streams and generates aggregated statistics. More...
 
struct  aggregation_result
 Result of time series aggregation. More...
 
struct  aggregation_rule
 Configuration for metric aggregation. More...
 
struct  alert
 Core alert data structure. More...
 
class  alert_aggregator
 Groups and deduplicates alerts. More...
 
struct  alert_aggregator_config
 Configuration for alert aggregation. More...
 
struct  alert_annotations
 Additional metadata for alert context. More...
 
class  alert_deduplicator
 Deduplicates alerts based on fingerprint. More...
 
class  alert_formatter
 Formats alerts for notification payloads. More...
 
struct  alert_group
 Group of related alerts for batch notification. More...
 
class  alert_inhibitor
 Manages alert inhibition rules. More...
 
struct  alert_labels
 Key-value labels for alert identification and routing. More...
 
class  alert_manager
 Central coordinator for the alert pipeline. More...
 
struct  alert_manager_config
 Configuration for the alert manager. More...
 
struct  alert_manager_metrics
 Metrics for alert manager operations. More...
 
class  alert_notifier
 Base class for alert notification handlers. More...
 
class  alert_pipeline
 Configurable alert processing pipeline. More...
 
class  alert_rule
 Defines conditions and behavior for alert triggering. More...
 
struct  alert_rule_config
 Configuration for an alert rule. More...
 
class  alert_rule_group
 A group of related alert rules. More...
 
struct  alert_silence
 Silence configuration to suppress alerts. More...
 
class  alert_template
 Template engine for alert messages. More...
 
class  alert_trigger
 Base class for alert trigger conditions. More...
 
class  alternative_service_strategy
 Alternative service fallback strategy. More...
 
class  anomaly_trigger
 Trigger based on statistical anomaly detection. More...
 
class  battery_collector
 Battery status monitoring collector implementing collector_plugin interface. More...
 
struct  battery_info
 Information about a battery source. More...
 
class  battery_info_collector
 Battery data collector using platform abstraction layer. More...
 
struct  battery_reading
 A single battery reading. More...
 
class  buffered_notifier
 Buffers alerts and sends in batches. More...
 
class  cached_value_strategy
 Cached value fallback strategy. More...
 
class  callback_notifier
 Notifier that invokes a callback function. More...
 
class  central_collector
 Central collector for aggregating metrics from thread-local buffers. More...
 
class  circuit_breaker_registry
 Circuit breaker registry. More...
 
class  cloud_storage_backend
 Cloud storage backend (stub implementation) More...
 
class  collection_config
 Configuration for metric collection. More...
 
class  collector_base
 CRTP base class for metric collectors. More...
 
class  collector_interface
 Base interface for type-erased collectors. More...
 
class  collector_plugin
 Pure virtual interface for metric collector plugins. More...
 
class  collector_registry
 Thread-safe registry for managing collector plugins. More...
 
struct  compact_metric_value
 Memory-efficient metric value storage. More...
 
class  component_lifecycle_event
 Event for component lifecycle changes. More...
 
class  composite_health_check
 Composite health check that aggregates multiple sub-checks. More...
 
class  composite_trigger
 Combines multiple triggers with logical operations. More...
 
class  config_parser
 Unified configuration parsing utility. More...
 
class  configuration_change_event
 Event fired when configuration changes. More...
 
class  console_color_notifier
 
class  container_collector
 
struct  container_info
 
class  container_info_collector
 
struct  container_metrics
 
struct  context_metadata
 Context metadata for thread-specific information. More...
 
class  context_switch_info_collector
 Context switch data collector using platform abstraction layer. More...
 
struct  context_switch_metrics
 Aggregated context switch metrics for system and process. More...
 
class  cooldown_tracker
 Tracks cooldown periods for alert notifications. More...
 
struct  cpu_interrupt_info
 Per-CPU interrupt statistics. More...
 
struct  cpu_throttle_config
 Configuration for CPU throttling. More...
 
class  cpu_throttler
 Throttles operations based on CPU usage. More...
 
struct  create_result
 Result of collector creation. More...
 
class  crtp_collector_adapter
 Adapter for CRTP-based collectors (collector_base<T>) More...
 
class  data_consistency_manager
 Data consistency manager coordinating transaction managers and validators. More...
 
class  database_storage_backend
 Database storage backend (stub implementation) More...
 
class  default_value_strategy
 Default value fallback strategy. More...
 
class  degradable_service
 Degradable service wrapper. More...
 
struct  degradation_plan
 Degradation plan for coordinated service degradation. More...
 
class  delta_trigger
 Trigger based on change from previous value. More...
 
struct  disk_info
 
class  distributed_tracer
 Distributed tracer for managing spans and traces. More...
 
class  dynamic_plugin_loader
 Concrete implementation of plugin_loader using OS dynamic loading APIs. More...
 
class  error_boundary
 Error boundary implementation for resilient operations. More...
 
struct  error_boundary_config
 Error boundary configuration. More...
 
struct  error_boundary_metrics
 Error boundary metrics with atomic counters. More...
 
class  error_boundary_registry
 Error boundary registry for managing multiple boundaries. More...
 
struct  error_info
 Extended error information with context. More...
 
class  event_base
 Base class for all events in the system. More...
 
class  event_bus
 Thread-safe event bus implementation. More...
 
struct  event_bus_config
 Configuration for event bus. More...
 
class  event_envelope
 Container for events with metadata. More...
 
class  event_handler
 Type-safe event handler wrapper. More...
 
class  event_handler_wrapper
 Wrapper for event handlers with metadata. More...
 
class  fallback_strategy_interface
 Base interface for fallback strategies. More...
 
struct  fault_tolerance_config
 Fault tolerance configuration. More...
 
class  fault_tolerance_manager
 Fault tolerance manager template class. More...
 
struct  fault_tolerance_metrics
 Fault tolerance metrics. More...
 
class  fault_tolerance_registry
 Fault tolerance manager registry. More...
 
class  fd_info_collector
 File descriptor data collector using platform abstraction layer. More...
 
struct  fd_metrics
 File descriptor usage metrics. More...
 
class  file_notifier
 Writes alerts to a file. More...
 
class  file_storage_backend
 File storage backend for metrics snapshots. More...
 
struct  filesystem_inode_info
 Inode usage information for a single filesystem. More...
 
class  functional_health_check
 Health check implementation backed by a std::function. More...
 
class  gpu_collector
 GPU metrics monitoring collector implementing collector_plugin interface. More...
 
struct  gpu_device_info
 Information about a GPU device. More...
 
class  gpu_info_collector
 GPU data collector using platform abstraction layer. More...
 
struct  gpu_reading
 A single GPU metrics reading. More...
 
class  graceful_degradation_manager
 Graceful degradation manager. More...
 
struct  graceful_degradation_metrics
 Graceful degradation metrics. More...
 
struct  grpc_request
 gRPC request configuration More...
 
struct  grpc_response
 gRPC response data More...
 
struct  grpc_statistics
 Statistics for gRPC transport operations. More...
 
class  grpc_transport
 Abstract gRPC transport interface. More...
 
struct  handler_error_info
 Information about handler execution errors. More...
 
class  health_check
 Abstract base class for health checks. More...
 
class  health_check_builder
 Fluent builder for creating functional_health_check instances. More...
 
class  health_check_event
 Event for health check results. More...
 
struct  health_check_result
 Result of a health check operation. More...
 
class  health_dependency_graph
 Directed acyclic graph for health check dependencies. More...
 
class  health_monitor
 Health monitor with dependency management, auto-recovery, and statistics. More...
 
struct  health_monitor_config
 Configuration for the health_monitor. More...
 
struct  health_monitor_stats
 Accumulated statistics for health monitoring operations. More...
 
struct  histogram_bucket
 Bucket for histogram metrics. More...
 
struct  histogram_data
 Histogram data with buckets. More...
 
struct  http_request
 HTTP request configuration. More...
 
struct  http_response
 HTTP response data. More...
 
class  http_transport
 Abstract HTTP transport interface. More...
 
struct  inhibition_rule
 Rule for inhibiting alerts based on other alerts. More...
 
class  inode_info_collector
 Inode data collector using platform abstraction layer. More...
 
struct  inode_metrics
 Aggregated inode usage metrics for all filesystems. More...
 
class  interface_aggregated_collector
 Interface for collectors that aggregate metrics from multiple sources. More...
 
class  interface_event_bus
 Pure virtual interface for event bus implementation. More...
 
class  interface_event_publisher
 Interface for components that publish events. More...
 
class  interface_event_subscriber
 Interface for components that subscribe to events. More...
 
class  interface_metric_collector
 Pure virtual interface for metric collectors. More...
 
class  interface_metric_source
 Interface for components that provide metrics. More...
 
class  interface_monitoring_observer
 Pure virtual interface for monitoring event observers. More...
 
class  interface_observable
 Interface for components that can be observed. More...
 
class  interrupt_collector
 Hardware and software interrupt statistics monitoring collector. More...
 
class  interrupt_info_collector
 Interrupt data collector using platform abstraction layer. More...
 
struct  interrupt_metrics
 Aggregated interrupt statistics for the system. More...
 
class  jaeger_exporter
 Jaeger trace exporter implementation. More...
 
struct  jaeger_span_data
 Jaeger-specific span representation. More...
 
class  json_alert_formatter
 Formats alerts as JSON. More...
 
class  kv_memory_storage_backend
 In-memory key-value storage backend (legacy interface) More...
 
class  kv_storage_backend
 Basic key-value storage interface - stub. More...
 
class  leaky_bucket_limiter
 Leaky bucket rate limiter implementation. More...
 
class  load_average_history
 Specialized buffer for tracking load average history. More...
 
struct  load_average_sample
 Sample containing all three load averages. More...
 
struct  load_average_statistics
 Statistics for load average history. More...
 
class  lockfree_queue
 Thread-safe lock-free MPMC (Multiple Producer Multiple Consumer) queue. More...
 
struct  lockfree_queue_config
 Configuration for lock-free queue. More...
 
struct  lockfree_queue_statistics
 Statistics for lock-free queue operations. More...
 
class  log_notifier
 Simple notifier that logs alerts. More...
 
class  logger_to_monitoring_adapter
 Logger system adapter using dependency injection (Phase 2.3.3) More...
 
class  logging_metric_event
 Event containing logging system metrics. More...
 
class  memory_pool
 Thread-safe fixed-size block memory allocator. More...
 
struct  memory_pool_config
 Configuration for memory pool. More...
 
struct  memory_pool_statistics
 Statistics for memory pool operations. More...
 
class  memory_quota_manager
 Manages memory quota with tracking and throttling. More...
 
class  memory_storage_backend
 In-memory snapshot storage backend. More...
 
struct  metric
 Basic metric structure for interface compatibility. More...
 
struct  metric_batch
 Batch of metrics for efficient processing. More...
 
class  metric_collection_event
 Event containing collected metrics batch. More...
 
class  metric_collector_plugin
 
class  metric_event
 Event fired when a metric is collected. More...
 
struct  metric_export_config
 Configuration for metric exporters. More...
 
class  metric_exporter_factory
 Factory for creating metric exporters. More...
 
class  metric_exporter_interface
 Abstract interface for metric exporters. More...
 
class  metric_factory
 Unified factory for metric collector instantiation. More...
 
class  metric_filter
 Filter configuration for metric collection. More...
 
struct  metric_metadata
 Compact metadata for metrics. More...
 
struct  metric_sample
 Sample data structure for metric recording. More...
 
struct  metric_stats
 Statistics about metric collection. More...
 
class  metric_storage
 Thread-safe metric storage with ring buffer buffering. More...
 
struct  metric_storage_config
 Configuration for metric storage. More...
 
struct  metric_storage_stats
 Statistics for metric storage performance. More...
 
struct  metric_value
 Represents a single metric value with metadata. More...
 
class  metrics_analyzer
 Abstract interface for metrics analysis. More...
 
class  metrics_collector
 Abstract base class for metric collectors. More...
 
struct  metrics_snapshot
 Complete snapshot of metrics at a point in time. More...
 
class  monitorable_component
 Base class providing default monitorable implementation. More...
 
class  monitorable_interface
 Interface for components that can be monitored. More...
 
class  monitoring_aggregator
 Utility class to aggregate metrics from multiple monitorable components. More...
 
struct  monitoring_config
 Configuration for the monitoring system. More...
 
struct  monitoring_data
 Container for monitoring metrics from a component. More...
 
class  monitoring_interface
 Abstract interface for monitoring operations. More...
 
class  moving_window_aggregator
 Time-windowed value collection. More...
 
class  multi_notifier
 Sends alerts to multiple notifiers. More...
 
class  network_info_collector
 Internal network data collector using platform abstraction layer. More...
 
struct  network_metrics
 Aggregated network metrics from all sources. More...
 
class  network_metrics_collector
 Unified network metrics collector implementing collector_plugin interface. More...
 
struct  network_metrics_config
 Configuration for network metrics collector. More...
 
class  online_statistics
 Welford's algorithm for computing streaming statistics. More...
 
class  opentelemetry_compatibility_layer
 Main OpenTelemetry compatibility layer. More...
 
class  opentelemetry_exporter_config
 Configuration for OpenTelemetry exporters. More...
 
class  opentelemetry_metrics_adapter
 Adapter for converting monitoring system metrics to OpenTelemetry format. More...
 
class  opentelemetry_tracer_adapter
 Adapter for converting monitoring system traces to OpenTelemetry format. More...
 
struct  otel_attribute
 OpenTelemetry attribute representation. More...
 
struct  otel_metric_data
 OpenTelemetry metric data representation. More...
 
struct  otel_resource
 OpenTelemetry resource representation. More...
 
struct  otel_span_context
 OpenTelemetry span context. More...
 
struct  otel_span_data
 OpenTelemetry span data representation. More...
 
class  otlp_exporter
 OpenTelemetry Protocol (OTLP) trace exporter implementation. More...
 
struct  otlp_exporter_stats
 Statistics for OTLP exporter. More...
 
struct  otlp_grpc_config
 Configuration for OTLP gRPC exporter. More...
 
class  otlp_grpc_exporter
 OTLP gRPC trace exporter. More...
 
class  otlp_metrics_exporter
 OpenTelemetry Protocol (OTLP) metrics exporter implementation. More...
 
class  otlp_span_converter
 Converts internal spans to OTLP wire format. More...
 
class  performance_alert_event
 Event for performance-related alerts. More...
 
class  performance_benchmark
 Performance benchmark utility. More...
 
struct  performance_metrics
 Performance metrics for a specific operation. More...
 
class  performance_monitor
 Performance monitor combining profiling and system monitoring. More...
 
class  performance_monitor_adapter
 Adapter that wraps performance_monitor to implement IMonitor interface. More...
 
struct  performance_profile
 Lightweight performance profile for aggregated metrics. More...
 
class  performance_profiler
 Performance profiler for code sections. More...
 
class  pipeline_stage
 Base class for pipeline processing stages. More...
 
struct  platform_context_switches
 Platform context switch statistics. More...
 
struct  platform_info
 Platform identification information. More...
 
class  platform_info_collector
 Platform data collector using platform abstraction layer. More...
 
struct  platform_interrupt_info
 Platform interrupt statistics. More...
 
struct  platform_metrics
 Combined platform-level metrics. More...
 
class  platform_metrics_collector
 Unified platform-agnostic metrics collector. More...
 
struct  platform_metrics_config
 Configuration for platform metrics collection. More...
 
struct  platform_socket_info
 Platform socket buffer statistics. More...
 
struct  platform_tcp_info
 Platform TCP connection state information. More...
 
struct  platform_uptime
 Platform uptime information. More...
 
class  plugin_collector_adapter
 Adapter for plugin-based collectors (metric_collector_plugin) More...
 
struct  plugin_collector_config
 
class  plugin_factory
 
class  plugin_loader
 Abstract interface for plugin loading. More...
 
struct  plugin_metadata
 Metadata describing a collector plugin. More...
 
class  plugin_metric_collector
 
class  power_collector
 Power consumption monitoring collector implementing collector_plugin interface. More...
 
class  power_info_collector
 Power data collector using platform abstraction layer. More...
 
struct  power_reading
 A single power reading from a source. More...
 
struct  power_source_info
 Information about a power source. More...
 
struct  process_context_switch_info
 Context switch information for the current process. More...
 
struct  process_metrics
 Combined process-level metrics. More...
 
class  process_metrics_collector
 Unified process-level metrics collector. More...
 
struct  process_metrics_config
 Configuration for selective metric collection. More...
 
class  prometheus_exporter
 Prometheus metric exporter implementation. More...
 
struct  prometheus_metric_data
 Prometheus-specific metric representation. More...
 
class  quantile_estimator
 P² algorithm for streaming quantile estimation. More...
 
class  range_trigger
 Trigger based on value being within or outside a range. More...
 
struct  rate_limit_config
 Configuration for rate limiting. More...
 
class  rate_limiter
 Base interface for rate limiters. More...
 
class  rate_of_change_trigger
 Trigger based on rate of change of values. More...
 
class  resource_manager
 Coordinates multiple resource management components. More...
 
struct  resource_metrics
 Metrics for resource usage tracking. More...
 
struct  resource_quota
 Configuration for resource quotas. More...
 
class  resource_threshold_monitor
 
struct  retry_config
 Retry configuration. More...
 
class  retry_executor
 Retry executor template class. More...
 
class  retry_executor_registry
 Retry executor registry. More...
 
struct  retry_metrics
 Retry metrics. More...
 
class  retry_policy
 Basic retry policy implementation (backward compatibility) More...
 
class  ring_buffer
 Lock-free ring buffer with atomic operations. More...
 
struct  ring_buffer_config
 Configuration for ring buffer behavior. More...
 
struct  ring_buffer_stats
 Statistics for ring buffer performance monitoring. More...
 
class  routing_notifier
 Routes alerts to different notifiers based on criteria. More...
 
class  rule_builder
 Builds alert_rule from rule_definition. More...
 
struct  rule_definition
 Structured definition for alert rule configuration. More...
 
class  rule_registry
 Dynamic registry for alert rules with hot-reload support. More...
 
class  safe_event_dispatcher
 Event dispatcher with exception handling and error recovery. More...
 
class  scoped_span
 Scoped span for RAII-style span management. More...
 
class  scoped_timer
 Scoped performance timer. More...
 
class  security_collector
 Security event monitoring collector. More...
 
struct  security_event
 Individual security event information. More...
 
struct  security_event_counts
 Counts of security events by type. More...
 
class  security_info_collector
 Security event data collector using platform abstraction layer. More...
 
struct  security_metrics
 Aggregated security event metrics. More...
 
struct  service_config
 Service configuration for graceful degradation. More...
 
struct  service_state
 Service state tracking. More...
 
class  simd_aggregator
 SIMD-accelerated statistical aggregator. More...
 
struct  simd_aggregator_statistics
 Statistics for SIMD aggregator operations. More...
 
struct  simd_capabilities
 SIMD capabilities detection. More...
 
struct  simd_config
 Configuration for SIMD aggregator. More...
 
class  simple_http_client
 Simple HTTP client using basic socket operations. More...
 
class  smart_collector
 
struct  smart_disk_metrics
 
class  smart_info_collector
 
class  snapshot_storage_backend
 Base interface for snapshot storage backends. More...
 
class  span_builder
 Span builder for creating new spans. More...
 
class  standalone_collector_adapter
 Adapter for standalone collectors (like vm_collector) More...
 
class  state_change_event
 Event fired when system state changes. More...
 
class  state_validator
 State validator for validating system state. More...
 
struct  statistical_summary
 Statistical summary result. More...
 
class  statistics_notifier
 
class  statsd_exporter
 StatsD metric exporter implementation. More...
 
struct  statsd_metric_data
 StatsD-specific metric representation. More...
 
class  storage_backend
 Abstract interface for metrics storage. More...
 
class  storage_backend_factory
 Factory for creating storage backends. More...
 
struct  storage_config
 Storage configuration. More...
 
struct  stream_aggregation_result
 Result of an aggregation operation. More...
 
class  stream_aggregator
 Full-featured streaming aggregation. More...
 
struct  stream_aggregator_config
 Configuration for stream aggregator. More...
 
struct  streaming_statistics
 Statistical summary from streaming computation. More...
 
class  stub_grpc_transport
 Stub gRPC transport for testing. More...
 
class  stub_http_transport
 Stub HTTP transport for testing. More...
 
class  stub_udp_transport
 Stub UDP transport for testing. More...
 
class  subscription_token
 Token for managing event subscriptions. More...
 
struct  summary_data
 Summary statistics for metrics. More...
 
class  system_event
 Generic system event for monitoring components. More...
 
class  system_info_collector
 
struct  system_metrics
 System resource metrics. More...
 
struct  system_metrics_config
 
class  system_monitor
 System resource monitor. More...
 
class  system_resource_collector
 
class  system_resource_event
 Event containing system resource metrics. More...
 
struct  system_resources
 
struct  tagged_metric
 Represents a metric value with associated tags. More...
 
struct  tcp_state_counts
 Counts of connections in each TCP state. More...
 
class  temperature_collector
 Hardware temperature monitoring collector implementing collector_plugin interface. More...
 
class  temperature_info_collector
 Temperature data collector using platform abstraction layer. More...
 
struct  temperature_reading
 A single temperature reading from a sensor. More...
 
struct  temperature_sensor_info
 Information about a temperature sensor. More...
 
class  text_alert_formatter
 Formats alerts as human-readable text. More...
 
class  thread_context
 Thread-local context management for request tracking. More...
 
struct  thread_context_data
 Enhanced thread context data for comprehensive request and trace tracking. More...
 
class  thread_local_buffer
 Thread-local buffer for lock-free metric collection. More...
 
class  thread_pool_metric_event
 Event containing thread pool metrics. More...
 
class  thread_to_monitoring_adapter
 
class  threshold_trigger
 Trigger based on comparing value against a threshold. More...
 
struct  time_point_data
 Single data point in time series. More...
 
class  time_series
 Thread-safe time series data storage. More...
 
class  time_series_buffer
 Thread-safe ring buffer for time-series data with statistics. More...
 
struct  time_series_buffer_config
 Configuration for time series buffer. More...
 
struct  time_series_config
 Configuration for time series storage. More...
 
struct  time_series_query
 Query parameters for time series data. More...
 
struct  time_series_sample
 Single sample in time series with timestamp. More...
 
struct  time_series_statistics
 Statistics calculated from time series data. More...
 
struct  timer_data
 Timer data with percentile calculations. More...
 
class  timer_scope
 RAII timer scope for automatic duration recording with timer_data. More...
 
class  token_bucket_limiter
 Token bucket rate limiter implementation. More...
 
struct  trace_context
 Trace context for propagation across service boundaries. More...
 
struct  trace_export_config
 Configuration for trace exporters. More...
 
struct  trace_export_settings
 Configuration settings for trace export behavior. More...
 
class  trace_exporter_factory
 Factory for creating trace exporters. More...
 
class  trace_exporter_interface
 Abstract interface for trace exporters. More...
 
struct  trace_span
 Trace span representing a unit of work in distributed tracing. More...
 
class  transaction
 Transaction containing multiple operations. More...
 
struct  transaction_config
 Transaction configuration. More...
 
class  transaction_manager
 Transaction manager for coordinating transactions. More...
 
struct  transaction_metrics
 Transaction metrics. More...
 
class  transaction_operation
 Single transaction operation with execute and rollback capabilities. More...
 
struct  udp_send_result
 Result of a UDP send operation. More...
 
struct  udp_statistics
 Statistics for UDP transport operations. More...
 
class  udp_transport
 Abstract UDP transport interface. More...
 
class  uptime_collector
 System uptime monitoring collector implementing collector_plugin interface. More...
 
class  uptime_info_collector
 Uptime data collector using platform abstraction layer. More...
 
struct  uptime_metrics
 Aggregated uptime metrics for the system. More...
 
struct  validation_config
 Validation configuration. More...
 
struct  validation_metrics
 Validation metrics. More...
 
class  vm_collector
 Virtualization metrics monitoring collector. More...
 
class  vm_info_collector
 Platform-specific virtualization data collector implementation. More...
 
struct  vm_metrics
 Virtualization specific metrics. More...
 
struct  webhook_config
 Configuration for webhook notifier. More...
 
class  webhook_notifier
 Sends alerts to a webhook endpoint. More...
 
class  zipkin_exporter
 Zipkin trace exporter implementation. More...
 
struct  zipkin_span_data
 Zipkin-specific span representation. More...
 

Typedefs

using logger_system_adapter = logger_to_monitoring_adapter
 
using thread_system_adapter = thread_to_monitoring_adapter
 
using config_map = std::unordered_map<std::string, std::string>
 Type alias for configuration map.
 
using stats_map = std::unordered_map<std::string, double>
 Type alias for statistics map.
 
using tag_map = std::unordered_map<std::string, std::string>
 Type alias for metric tags/labels.
 
using collector_factory_fn = std::function<std::unique_ptr<collector_interface>()>
 Factory function type for creating collectors.
 
using plugin_factory_fn = std::unique_ptr<collector_plugin> (*)()
 Type alias for plugin factory function.
 
using circuit_state = common::resilience::circuit_state
 
using circuit_breaker_config = common::resilience::circuit_breaker_config
 
using circuit_breaker = common::resilience::circuit_breaker
 
using aggregation_result_stream = stream_aggregation_result
 

Enumerations

enum class  adaptation_strategy { conservative , balanced , aggressive }
 Adaptation strategy for monitoring behavior. More...
 
enum class  load_level {
  idle , low , moderate , high ,
  critical
}
 System load levels. More...
 
enum class  comparison_operator {
  greater_than , greater_or_equal , less_than , less_or_equal ,
  equal , not_equal
}
 Comparison operators for threshold triggers. More...
 
enum class  composite_operation { AND , OR , XOR , NOT }
 Logical operations for combining triggers. More...
 
enum class  alert_severity : uint8_t { info = 0 , warning , critical , emergency }
 Severity levels for alerts. More...
 
enum class  alert_state : uint8_t {
  inactive = 0 , pending , firing , resolved ,
  suppressed
}
 State machine states for alert lifecycle. More...
 
enum class  battery_status {
  unknown , charging , discharging , not_charging ,
  full
}
 Current battery charging status. More...
 
enum class  cgroup_version : uint8_t { none = 0 , v1 = 1 , v2 = 2 }
 
enum class  gpu_vendor {
  unknown , nvidia , amd , intel ,
  apple , other
}
 GPU vendor identification. More...
 
enum class  gpu_type { unknown , discrete , integrated , virtual_gpu }
 GPU type classification. More...
 
enum class  tcp_state {
  ESTABLISHED = 1 , SYN_SENT = 2 , SYN_RECV = 3 , FIN_WAIT1 = 4 ,
  FIN_WAIT2 = 5 , TIME_WAIT = 6 , CLOSE = 7 , CLOSE_WAIT = 8 ,
  LAST_ACK = 9 , LISTEN = 10 , CLOSING = 11 , UNKNOWN = 0
}
 TCP connection states as defined in RFC 793. More...
 
enum class  power_source_type {
  unknown , battery , ac , usb ,
  wireless , cpu , gpu , memory ,
  package , platform , other
}
 Type of power source. More...
 
enum class  security_event_type {
  login_success = 1 , login_failure = 2 , logout = 3 , sudo_usage = 4 ,
  permission_change = 5 , account_created = 6 , account_deleted = 7 , account_modified = 8 ,
  session_start = 9 , session_end = 10 , unknown = 0
}
 Types of security events tracked. More...
 
enum class  sensor_type {
  unknown , cpu , gpu , motherboard ,
  storage , ambient , other
}
 Type of temperature sensor. More...
 
enum class  vm_type {
  none = 0 , kvm = 1 , hyperv = 2 , vmware = 3 ,
  virtualbox = 4 , xen = 5 , docker = 6 , other = 7
}
 Detected virtualization platform. More...
 
enum class  monitoring_error_code : std::uint32_t {
  success = 0 , collector_not_found = 1000 , collection_failed = 1001 , collector_initialization_failed = 1002 ,
  collector_already_exists = 1003 , collector_disabled = 1004 , invalid_collector_config = 1005 , monitoring_disabled = 1006 ,
  storage_full = 2000 , storage_corrupted = 2001 , compression_failed = 2002 , storage_not_initialized = 2003 ,
  storage_write_failed = 2004 , storage_read_failed = 2005 , storage_empty = 2006 , invalid_configuration = 3000 ,
  invalid_interval = 3001 , invalid_capacity = 3002 , configuration_not_found = 3003 , configuration_parse_error = 3004 ,
  system_resource_unavailable = 4000 , permission_denied = 4001 , out_of_memory = 4002 , memory_allocation_failed = 4003 ,
  operation_timeout = 4004 , operation_cancelled = 4005 , thread_system_not_available = 5000 , logger_system_not_available = 5001 ,
  incompatible_version = 5002 , adapter_initialization_failed = 5003 , metric_not_found = 6000 , invalid_metric_type = 6001 ,
  metric_overflow = 6002 , aggregation_failed = 6003 , processing_failed = 6004 , health_check_failed = 7000 ,
  health_check_timeout = 7001 , health_check_not_registered = 7002 , circuit_breaker_open = 8000 , circuit_breaker_half_open = 8001 ,
  retry_attempts_exhausted = 8002 , operation_failed = 8003 , network_error = 8004 , service_unavailable = 8005 ,
  service_degraded = 8006 , error_boundary_triggered = 8007 , fallback_failed = 8008 , recovery_failed = 8009 ,
  invalid_argument = 8100 , invalid_state = 8101 , not_found = 8102 , already_exists = 8103 ,
  resource_exhausted = 8104 , already_started = 8105 , dependency_missing = 8106 , quota_exceeded = 8200 ,
  rate_limit_exceeded = 8201 , cpu_throttled = 8202 , memory_quota_exceeded = 8203 , bandwidth_exceeded = 8204 ,
  resource_unavailable = 8205 , transaction_failed = 8300 , transaction_timeout = 8301 , transaction_aborted = 8302 ,
  validation_failed = 8303 , data_corrupted = 8304 , state_inconsistent = 8305 , deadlock_detected = 8306 ,
  rollback_failed = 8307 , unknown_error = 9999
}
 Comprehensive error codes for monitoring system operations. More...
 
enum class  recorded_metric_type { counter , gauge , histogram }
 Types of recorded metrics. More...
 
enum class  metric_export_format {
  prometheus_text , prometheus_protobuf , statsd_plain , statsd_datadog ,
  otlp_grpc , otlp_http_json , otlp_http_protobuf
}
 Supported metric export formats. More...
 
enum class  metric_type {
  counter , gauge , histogram , summary ,
  timer , counter = 0 , gauge , histogram ,
  summary , timer , set
}
 Metric types supported by exporters. More...
 
enum class  otel_resource_type {
  service , service_instance , host , container ,
  process , runtime , telemetry_sdk , custom
}
 OpenTelemetry resource types. More...
 
enum class  otel_span_kind {
  unspecified = 0 , internal = 1 , server = 2 , client = 3 ,
  producer = 4 , consumer = 5
}
 OpenTelemetry span kinds. More...
 
enum class  otel_status_code { unset = 0 , ok = 1 , error = 2 }
 OpenTelemetry status codes. More...
 
enum class  trace_export_format {
  jaeger_thrift , jaeger_grpc , zipkin_json , zipkin_protobuf ,
  otlp_grpc , otlp_http_json , otlp_http_protobuf
}
 Supported trace export formats. More...
 
enum class  health_check_type { liveness , readiness , startup }
 Types of health checks following Kubernetes probe conventions. More...
 
enum class  event_priority { low , normal , high , critical }
 
enum class  health_status { healthy , degraded , unhealthy , unknown }
 System health status levels. More...
 
enum class  plugin_category {
  system , hardware , platform , network ,
  process , custom
}
 Categorization of collector plugins. More...
 
enum class  plugin_load_error {
  none = 0 , file_not_found , library_load_failed , symbol_not_found ,
  incompatible_api_version , create_function_failed , plugin_unavailable , already_loaded ,
  not_loaded , invalid_metadata
}
 Error codes for plugin loading operations. More...
 
enum class  transaction_state { active , committed , aborted }
 Transaction states. More...
 
enum class  validation_result { valid , invalid }
 Validation result states. More...
 
enum class  degradation_level { normal = 0 , limited = 1 , minimal = 2 , emergency = 3 }
 Degradation levels for error boundary. More...
 
enum class  error_boundary_policy { fail_fast , isolate , degrade , fallback }
 Error boundary policies. More...
 
enum class  service_priority { optional = 0 , normal = 1 , important = 2 , critical = 3 }
 Service priority levels. More...
 
enum class  throttling_strategy { reject , delay }
 Strategy for handling resource exhaustion. More...
 
enum class  resource_type { memory , cpu }
 Type of resource being managed. More...
 
enum class  retry_strategy { fixed_delay , exponential_backoff , linear_backoff , fibonacci_backoff }
 Retry strategies. More...
 
enum class  storage_backend_type {
  memory_buffer , file_json , file_binary , file_csv ,
  database_sqlite , database_postgresql , database_mysql , cloud_s3 ,
  cloud_gcs , cloud_azure_blob
}
 Storage backend types. More...
 
enum class  compression_algorithm { none , gzip , lz4 , zstd }
 Compression algorithms. More...
 
enum class  metric_type : uint8_t {
  counter , gauge , histogram , summary ,
  timer , counter = 0 , gauge , histogram ,
  summary , timer , set
}
 

Functions

std::shared_ptr< common::interfaces::IMonitor > make_monitor_adapter (std::shared_ptr< performance_monitor > monitor)
 Factory function to create performance_monitor_adapter.
 
adaptive_monitorglobal_adaptive_monitor ()
 Global adaptive monitor instance.
 
constexpr const char * comparison_operator_to_string (comparison_operator op) noexcept
 Convert comparison operator to string.
 
constexpr const char * alert_severity_to_string (alert_severity severity) noexcept
 Convert alert severity to string.
 
constexpr const char * alert_state_to_string (alert_state state) noexcept
 Convert alert state to string.
 
std::string battery_status_to_string (battery_status status)
 Convert battery_status to string representation.
 
std::string gpu_vendor_to_string (gpu_vendor vendor)
 Convert gpu_vendor to string representation.
 
std::string gpu_type_to_string (gpu_type type)
 Convert gpu_type to string representation.
 
std::string tcp_state_to_string (tcp_state state)
 Convert tcp_state to string representation.
 
std::string power_source_type_to_string (power_source_type type)
 Convert power_source_type to string representation.
 
std::string security_event_type_to_string (security_event_type type)
 Convert security_event_type to string representation.
 
std::string sensor_type_to_string (sensor_type type)
 Convert sensor_type to string representation.
 
std::string vm_type_to_string (vm_type type)
 Convert vm_type to string representation.
 
std::string error_code_to_string (monitoring_error_code code)
 Convert error code to string representation.
 
std::string get_error_details (monitoring_error_code code)
 Get detailed error message.
 
performance_monitorglobal_performance_monitor ()
 Global performance monitor instance.
 
std::unique_ptr< grpc_transportcreate_default_grpc_transport ()
 Create default gRPC transport.
 
std::unique_ptr< stub_grpc_transportcreate_stub_grpc_transport ()
 Create stub gRPC transport for testing.
 
std::unique_ptr< http_transportcreate_default_transport ()
 Create default HTTP transport.
 
std::unique_ptr< stub_http_transportcreate_stub_transport ()
 Create stub HTTP transport for testing.
 
std::unique_ptr< prometheus_exportercreate_prometheus_exporter (std::uint16_t port=9090, const std::string &job_name="monitoring_system")
 Helper function to create a Prometheus exporter.
 
std::unique_ptr< statsd_exportercreate_statsd_exporter (const std::string &host="localhost", std::uint16_t port=8125, bool datadog_format=false)
 Helper function to create a StatsD exporter.
 
std::unique_ptr< otlp_metrics_exportercreate_otlp_metrics_exporter (const std::string &endpoint, const otel_resource &resource, metric_export_format format=metric_export_format::otlp_grpc)
 Helper function to create an OTLP metrics exporter.
 
otel_resource create_service_resource (const std::string &service_name, const std::string &service_version="1.0.0", const std::string &service_namespace="")
 Create OpenTelemetry resource with service information.
 
std::unique_ptr< opentelemetry_compatibility_layercreate_opentelemetry_compatibility_layer (const otel_resource &resource)
 Create OpenTelemetry compatibility layer.
 
std::unique_ptr< opentelemetry_compatibility_layercreate_opentelemetry_compatibility_layer (const std::string &service_name, const std::string &service_version="1.0.0")
 Create OpenTelemetry compatibility layer with service resource.
 
std::unique_ptr< otlp_grpc_exportercreate_otlp_grpc_exporter (const std::string &endpoint="localhost:4317")
 Create OTLP gRPC exporter with default configuration.
 
std::unique_ptr< otlp_grpc_exportercreate_otlp_grpc_exporter (const otlp_grpc_config &config)
 Create OTLP gRPC exporter with custom configuration.
 
std::unique_ptr< jaeger_exportercreate_jaeger_exporter (const std::string &endpoint, trace_export_format format=trace_export_format::jaeger_grpc)
 Helper function to create a Jaeger exporter.
 
std::unique_ptr< zipkin_exportercreate_zipkin_exporter (const std::string &endpoint, trace_export_format format=trace_export_format::zipkin_json)
 Helper function to create a Zipkin exporter.
 
std::unique_ptr< otlp_exportercreate_otlp_exporter (const std::string &endpoint, const otel_resource &resource, trace_export_format format=trace_export_format::otlp_grpc)
 Helper function to create an OTLP exporter.
 
std::unique_ptr< udp_transportcreate_default_udp_transport ()
 Create default UDP transport.
 
std::unique_ptr< stub_udp_transportcreate_stub_udp_transport ()
 Create stub UDP transport for testing.
 
bool register_builtin_collectors ()
 Register all built-in collectors with the collector_registry.
 
std::vector< std::string > get_builtin_collector_names ()
 Get list of all built-in collector names.
 
template<typename T >
bool register_plugin_collector (const std::string &name)
 Helper function to register a plugin-based collector.
 
template<typename T >
bool register_crtp_collector (const std::string &name)
 Helper function to register a CRTP-based collector.
 
template<typename T >
bool register_standalone_collector (const std::string &name)
 Helper function to register a standalone collector.
 
health_monitorglobal_health_monitor ()
 Get the global health monitor singleton instance.
 
template<typename T >
std::unique_ptr< lockfree_queue< T > > make_lockfree_queue ()
 Create a lock-free queue with default configuration.
 
template<typename T >
std::unique_ptr< lockfree_queue< T > > make_lockfree_queue (const lockfree_queue_config &config)
 Create a lock-free queue with configuration.
 
std::vector< lockfree_queue_configcreate_default_queue_configs ()
 Create default queue configurations for different use cases.
 
std::unique_ptr< memory_poolmake_memory_pool ()
 Create a memory pool with default configuration.
 
std::unique_ptr< memory_poolmake_memory_pool (const memory_pool_config &config)
 Create a memory pool with configuration.
 
std::vector< memory_pool_configcreate_default_pool_configs ()
 Create default pool configurations for different use cases.
 
std::unique_ptr< simd_aggregatormake_simd_aggregator ()
 Create a SIMD aggregator with default configuration.
 
std::unique_ptr< simd_aggregatormake_simd_aggregator (const simd_config &config)
 Create a SIMD aggregator with configuration.
 
std::vector< simd_configcreate_default_simd_configs ()
 Create default SIMD configurations for different use cases.
 
auto to_string (plugin_load_error error) -> std::string
 Convert plugin_load_error to string.
 
std::shared_ptr< transaction_managercreate_transaction_manager (const std::string &name)
 Factory function to create a transaction manager.
 
std::shared_ptr< state_validatorcreate_state_validator (const std::string &name)
 Factory function to create a state validator.
 
std::shared_ptr< data_consistency_managercreate_data_consistency_manager (const std::string &name)
 Factory function to create a data consistency manager.
 
template<typename T , typename Func >
common::Result< T > execute_with_circuit_breaker (circuit_breaker &cb, const std::string &name, Func &&func)
 Execute an operation through a circuit breaker.
 
circuit_breaker_registryglobal_circuit_breaker_registry ()
 Get global circuit breaker registry.
 
retry_executor_registryglobal_retry_executor_registry ()
 Get global retry executor registry.
 
fault_tolerance_registryglobal_fault_tolerance_registry ()
 Get global fault tolerance manager registry.
 
error_boundary_registryglobal_error_boundary_registry ()
 Get global error boundary registry.
 
std::shared_ptr< graceful_degradation_managercreate_degradation_manager (const std::string &name)
 Create a graceful degradation manager.
 
service_config create_service_config (const std::string &name, service_priority priority)
 Create a service configuration.
 
degradation_plan create_degradation_plan (const std::string &name, const std::vector< std::string > &maintain, const std::vector< std::string > &disable, degradation_level level)
 Create a degradation plan.
 
template<typename T >
std::shared_ptr< degradable_service< T > > create_degradable_service (const std::string &name, std::shared_ptr< graceful_degradation_manager > manager, typename degradable_service< T >::normal_operation normal_op, typename degradable_service< T >::degraded_operation degraded_op)
 Create a degradable service.
 
std::unique_ptr< token_bucket_limitercreate_token_bucket_limiter (const std::string &name, double rate, size_t capacity, throttling_strategy strategy=throttling_strategy::reject)
 Create a token bucket rate limiter.
 
std::unique_ptr< leaky_bucket_limitercreate_leaky_bucket_limiter (const std::string &name, double rate, size_t capacity)
 Create a leaky bucket rate limiter.
 
std::unique_ptr< memory_quota_managercreate_memory_quota_manager (const std::string &name, size_t max_bytes, throttling_strategy strategy=throttling_strategy::reject)
 Create a memory quota manager.
 
std::unique_ptr< resource_managercreate_resource_manager (const std::string &name)
 Create a resource manager.
 
retry_config create_exponential_backoff_config (size_t max_attempts=3, std::chrono::milliseconds initial_delay=std::chrono::milliseconds(1000))
 Factory function for exponential backoff config.
 
retry_config create_fixed_delay_config (size_t max_attempts=3, std::chrono::milliseconds delay=std::chrono::milliseconds(1000))
 Factory function for fixed delay config.
 
retry_config create_fibonacci_backoff_config (size_t max_attempts=3, std::chrono::milliseconds initial_delay=std::chrono::milliseconds(1000))
 Factory function for Fibonacci backoff config.
 
std::unique_ptr< snapshot_storage_backendcreate_file_storage (const std::string &path, storage_backend_type type, size_t capacity)
 Create a file storage backend.
 
std::unique_ptr< snapshot_storage_backendcreate_database_storage (storage_backend_type type, const std::string &path, const std::string &table)
 Create a database storage backend.
 
std::unique_ptr< snapshot_storage_backendcreate_cloud_storage (storage_backend_type type, const std::string &bucket)
 Create a cloud storage backend.
 
distributed_tracerglobal_tracer ()
 Global tracer instance.
 
std::vector< aggregation_rulecreate_standard_aggregation_rules ()
 Create standard aggregation rules for common metrics.
 
constexpr const char * metric_type_to_string (metric_type type) noexcept
 Convert metric type to string.
 
uint32_t hash_metric_name (const std::string &name) noexcept
 Hash function for metric names.
 
metric_metadata create_metric_metadata (const std::string &name, metric_type type, size_t tag_count=0)
 Create metric metadata from name and type.
 
template<typename T >
std::unique_ptr< ring_buffer< T > > make_ring_buffer (size_t capacity=8192)
 Helper function to create a ring buffer with default configuration.
 
template<typename T >
std::unique_ptr< ring_buffer< T > > make_ring_buffer (const ring_buffer_config &config)
 Helper function to create a ring buffer with custom configuration.
 
double pearson_correlation (const std::vector< double > &x, const std::vector< double > &y)
 Calculate Pearson correlation coefficient.
 
alert create_sample_alert (const std::string &name, alert_severity severity, alert_state state, double value, const std::string &team="ops")
 

Typedef Documentation

◆ aggregation_result_stream

◆ circuit_breaker

using kcenon::monitoring::circuit_breaker = common::resilience::circuit_breaker

Definition at line 26 of file circuit_breaker.h.

◆ circuit_breaker_config

using kcenon::monitoring::circuit_breaker_config = common::resilience::circuit_breaker_config

Definition at line 25 of file circuit_breaker.h.

◆ circuit_state

using kcenon::monitoring::circuit_state = common::resilience::circuit_state

Definition at line 24 of file circuit_breaker.h.

◆ collector_factory_fn

using kcenon::monitoring::collector_factory_fn = std::function<std::unique_ptr<collector_interface>()>

Factory function type for creating collectors.

Definition at line 103 of file metric_factory.h.

◆ config_map

typedef std::unordered_map< std::string, std::string > kcenon::monitoring::config_map = std::unordered_map<std::string, std::string>

◆ logger_system_adapter

◆ plugin_factory_fn

Type alias for plugin factory function.

Factories enable lazy instantiation and dynamic loading. Signature: unique_ptr<collector_plugin>(void)

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/plugins/collector_plugin.h.

Definition at line 256 of file collector_plugin.h.

◆ stats_map

using kcenon::monitoring::stats_map = std::unordered_map<std::string, double>

◆ tag_map

using kcenon::monitoring::tag_map = std::unordered_map<std::string, std::string>

Type alias for metric tags/labels.

Tags are key-value pairs that add dimensions to metrics, enabling filtering and aggregation by service, endpoint, host, etc.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/core/performance_monitor.h.

Definition at line 46 of file performance_monitor.h.

◆ thread_system_adapter

Enumeration Type Documentation

◆ adaptation_strategy

Adaptation strategy for monitoring behavior.

Enumerator
conservative 
balanced 
aggressive 

Definition at line 40 of file adaptive_monitor.h.

40 {
41 conservative, // Prefer system stability over monitoring detail
42 balanced, // Balance between monitoring and performance
43 aggressive // Prefer monitoring detail over system resources
44};

◆ alert_severity

enum class kcenon::monitoring::alert_severity : uint8_t
strong

Severity levels for alerts.

Defines the urgency and importance of alerts, affecting routing and notification behavior.

Enumerator
info 

Informational, no action required.

warning 

Warning condition, may require attention.

critical 

Critical condition, immediate attention required.

emergency 

Emergency condition, system-wide impact.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_notifiers.h, /home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_rule.h, and alert_notifiers_example.cpp.

Definition at line 35 of file alert_types.h.

35 : uint8_t {
36 info = 0,
37 warning,
38 critical,
40};
@ warning
Warning condition, may require attention.
@ emergency
Emergency condition, system-wide impact.
@ info
Informational, no action required.

◆ alert_state

enum class kcenon::monitoring::alert_state : uint8_t
strong

State machine states for alert lifecycle.

State machine: inactive ─[condition met]─> pending pending ─[for_duration elapsed]─> firing firing ─[condition cleared]─> resolved resolved ─[condition met]─> pending any state ─[silenced]─> suppressed suppressed ─[silence expired]─> previous state

Enumerator
inactive 

Alert condition not met.

pending 

Condition met, waiting for duration threshold.

firing 

Alert is active and notifications sent.

resolved 

Alert condition cleared.

suppressed 

Alert is silenced.

Examples
alert_notifiers_example.cpp.

Definition at line 69 of file alert_types.h.

69 : uint8_t {
70 inactive = 0,
71 pending,
72 firing,
73 resolved,
75};
@ inactive
Alert condition not met.
@ suppressed
Alert is silenced.
@ pending
Condition met, waiting for duration threshold.
@ firing
Alert is active and notifications sent.
@ resolved
Alert condition cleared.

◆ battery_status

Current battery charging status.

Enumerator
unknown 

Unknown status.

charging 

Battery is charging.

discharging 

Battery is discharging.

not_charging 

Battery is not charging (plugged in but not charging)

full 

Battery is fully charged.

Definition at line 37 of file battery_collector.h.

37 {
38 unknown,
39 charging,
42 full
43};
@ charging
Battery is charging.
@ not_charging
Battery is not charging (plugged in but not charging)
@ discharging
Battery is discharging.
@ full
Battery is fully charged.

◆ cgroup_version

enum class kcenon::monitoring::cgroup_version : uint8_t
strong

Cgroup version detection

Enumerator
none 

Not in a cgroup or not Linux.

v1 

Legacy cgroups v1.

v2 

Unified cgroups v2 hierarchy.

Definition at line 79 of file container_collector.h.

79 : uint8_t {
80 none = 0,
81 v1 = 1,
82 v2 = 2
83};
@ v2
Unified cgroups v2 hierarchy.
@ none
Not in a cgroup or not Linux.

◆ comparison_operator

Comparison operators for threshold triggers.

Enumerator
greater_than 

value > threshold

greater_or_equal 

value >= threshold

less_than 

value < threshold

less_or_equal 

value <= threshold

equal 

value == threshold (with epsilon)

not_equal 

value != threshold (with epsilon)

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_triggers.h.

Definition at line 32 of file alert_triggers.h.

32 {
35 less_than,
37 equal,
39};
@ equal
value == threshold (with epsilon)
@ not_equal
value != threshold (with epsilon)

◆ composite_operation

Logical operations for combining triggers.

Enumerator
AND 

All triggers must fire.

OR 

Any trigger fires.

XOR 

Exactly one trigger fires.

NOT 

Invert single trigger (uses first trigger only)

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_triggers.h.

Definition at line 501 of file alert_triggers.h.

501 {
502 AND,
503 OR,
504 XOR,
505 NOT
506};
@ NOT
Invert single trigger (uses first trigger only)
@ XOR
Exactly one trigger fires.

◆ compression_algorithm

Compression algorithms.

Enumerator
none 
gzip 
lz4 
zstd 

Definition at line 46 of file storage_backends.h.

◆ degradation_level

Degradation levels for error boundary.

Enumerator
normal 
limited 
minimal 
emergency 

Definition at line 28 of file error_boundary.h.

◆ error_boundary_policy

Error boundary policies.

Enumerator
fail_fast 
isolate 
degrade 
fallback 

Definition at line 38 of file error_boundary.h.

◆ event_priority

Enumerator
low 
normal 
high 
critical 

Definition at line 151 of file event_bus_interface.h.

◆ gpu_type

enum class kcenon::monitoring::gpu_type
strong

GPU type classification.

Enumerator
unknown 

Unknown GPU type.

discrete 

Discrete GPU (dedicated graphics card)

integrated 

Integrated GPU (part of CPU/SoC)

virtual_gpu 

Virtual GPU (cloud/VM)

Definition at line 70 of file gpu_collector.h.

70 {
71 unknown,
72 discrete,
75};
@ virtual_gpu
Virtual GPU (cloud/VM)
@ discrete
Discrete GPU (dedicated graphics card)
@ integrated
Integrated GPU (part of CPU/SoC)

◆ gpu_vendor

enum class kcenon::monitoring::gpu_vendor
strong

GPU vendor identification.

Enumerator
unknown 

Unknown vendor.

nvidia 

NVIDIA Corporation.

amd 

Advanced Micro Devices.

intel 

Intel Corporation.

apple 

Apple (Apple Silicon GPU)

other 

Other vendor.

Definition at line 37 of file gpu_collector.h.

37 {
38 unknown,
39 nvidia,
40 amd,
41 intel,
42 apple,
43 other
44};
@ apple
Apple (Apple Silicon GPU)
@ intel
Intel Corporation.
@ nvidia
NVIDIA Corporation.
@ amd
Advanced Micro Devices.

◆ health_check_type

Types of health checks following Kubernetes probe conventions.

See also
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
Enumerator
liveness 

Indicates whether the process is alive and should be restarted if failing.

readiness 

Indicates whether the service is ready to accept traffic.

startup 

Indicates whether the application has finished initializing.

Definition at line 69 of file health_monitor.h.

69 {
70 liveness,
71 readiness,
72 startup
73};
@ liveness
Indicates whether the process is alive and should be restarted if failing.
@ readiness
Indicates whether the service is ready to accept traffic.
@ startup
Indicates whether the application has finished initializing.

◆ health_status

◆ load_level

enum class kcenon::monitoring::load_level
strong

System load levels.

Enumerator
idle 
low 
moderate 
high 
critical 

Definition at line 49 of file adaptive_monitor.h.

49 {
50 idle, // < 20% CPU
51 low, // 20-40% CPU
52 moderate, // 40-60% CPU
53 high, // 60-80% CPU
54 critical // > 80% CPU
55};

◆ metric_export_format

Supported metric export formats.

Enumerator
prometheus_text 

Prometheus text exposition format.

prometheus_protobuf 

Prometheus protocol buffers format.

statsd_plain 

StatsD plain UDP format.

statsd_datadog 

StatsD DataDog extension format.

otlp_grpc 

OTLP gRPC metrics protocol.

otlp_http_json 

OTLP HTTP JSON metrics protocol.

otlp_http_protobuf 

OTLP HTTP Protocol Buffers metrics.

Definition at line 50 of file metric_exporters.h.

50 {
55 otlp_grpc,
58};
@ prometheus_protobuf
Prometheus protocol buffers format.
@ statsd_plain
StatsD plain UDP format.
@ otlp_grpc
OTLP gRPC metrics protocol.
@ statsd_datadog
StatsD DataDog extension format.
@ prometheus_text
Prometheus text exposition format.
@ otlp_http_json
OTLP HTTP JSON metrics protocol.
@ otlp_http_protobuf
OTLP HTTP Protocol Buffers metrics.

◆ metric_type [1/2]

Metric types supported by exporters.

Types of metrics supported by the system.

Enumerator
counter 

Monotonically increasing counter.

gauge 

Instantaneous value that can go up and down.

histogram 

Distribution of values with buckets.

summary 

Pre-calculated quantiles and count/sum.

timer 

StatsD-specific timer metric.

counter 
gauge 
histogram 
summary 
timer 
set 
Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/interfaces/metric_collector_interface.h, and /home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/interfaces/metric_types_adapter.h.

Definition at line 64 of file metric_exporters.h.

64 {
65 counter,
66 gauge,
67 histogram,
68 summary,
69 timer
70};
@ timer
StatsD-specific timer metric.
@ summary
Pre-calculated quantiles and count/sum.
@ gauge
Instantaneous value that can go up and down.
@ counter
Monotonically increasing counter.
@ histogram
Distribution of values with buckets.

◆ metric_type [2/2]

enum class kcenon::monitoring::metric_type : uint8_t
strong
Enumerator
counter 

Monotonically increasing counter.

gauge 

Instantaneous value that can go up and down.

histogram 

Distribution of values with buckets.

summary 

Pre-calculated quantiles and count/sum.

timer 

StatsD-specific timer metric.

counter 
gauge 
histogram 
summary 
timer 
set 

Definition at line 50 of file metric_types.h.

50 : uint8_t {
51 counter = 0, // Monotonically increasing value
52 gauge, // Instantaneous value
53 histogram, // Distribution of values
54 summary, // Summary statistics
55 timer, // Duration measurements
56 set // Unique value counting
57};

◆ monitoring_error_code

enum class kcenon::monitoring::monitoring_error_code : std::uint32_t
strong

Comprehensive error codes for monitoring system operations.

Enumerator
success 
collector_not_found 
collection_failed 
collector_initialization_failed 
collector_already_exists 
collector_disabled 
invalid_collector_config 
monitoring_disabled 
storage_full 
storage_corrupted 
compression_failed 
storage_not_initialized 
storage_write_failed 
storage_read_failed 
storage_empty 
invalid_configuration 
invalid_interval 
invalid_capacity 
configuration_not_found 
configuration_parse_error 
system_resource_unavailable 
permission_denied 
out_of_memory 
memory_allocation_failed 
operation_timeout 
operation_cancelled 
thread_system_not_available 
logger_system_not_available 
incompatible_version 
adapter_initialization_failed 
metric_not_found 
invalid_metric_type 
metric_overflow 
aggregation_failed 
processing_failed 
health_check_failed 
health_check_timeout 
health_check_not_registered 
circuit_breaker_open 
circuit_breaker_half_open 
retry_attempts_exhausted 
operation_failed 
network_error 
service_unavailable 
service_degraded 
error_boundary_triggered 
fallback_failed 
recovery_failed 
invalid_argument 
invalid_state 
not_found 
already_exists 
resource_exhausted 
already_started 
dependency_missing 
quota_exceeded 
rate_limit_exceeded 
cpu_throttled 
memory_quota_exceeded 
bandwidth_exceeded 
resource_unavailable 
transaction_failed 
transaction_timeout 
transaction_aborted 
validation_failed 
data_corrupted 
state_inconsistent 
deadlock_detected 
rollback_failed 
unknown_error 

Definition at line 25 of file error_codes.h.

25 : std::uint32_t {
26 // Success
27 success = 0,
28
29 // Collection errors (1000-1999)
31 collection_failed = 1001,
34 collector_disabled = 1004,
37
38 // Storage errors (2000-2999)
39 storage_full = 2000,
40 storage_corrupted = 2001,
41 compression_failed = 2002,
45 storage_empty = 2006,
46
47 // Configuration errors (3000-3999)
49 invalid_interval = 3001,
50 invalid_capacity = 3002,
53
54 // System errors (4000-4999)
56 permission_denied = 4001,
57 out_of_memory = 4002,
59 operation_timeout = 4004,
61
62 // Integration errors (5000-5999)
67
68 // Metrics errors (6000-6999)
69 metric_not_found = 6000,
71 metric_overflow = 6002,
72 aggregation_failed = 6003,
73 processing_failed = 6004,
74
75 // Health check errors (7000-7999)
79
80 // Fault tolerance errors (8000-8099)
84 operation_failed = 8003,
85 network_error = 8004,
87 service_degraded = 8006,
89 fallback_failed = 8008,
90 recovery_failed = 8009,
91
92 // General errors (8100-8999)
93 invalid_argument = 8100,
94 invalid_state = 8101,
95 not_found = 8102,
96 already_exists = 8103,
97 resource_exhausted = 8104,
98 already_started = 8105,
99 dependency_missing = 8106,
100
101 // Resource management errors (8200-8299)
102 quota_exceeded = 8200,
103 rate_limit_exceeded = 8201,
104 cpu_throttled = 8202,
106 bandwidth_exceeded = 8204,
108
109 // Data consistency errors (8300-8399)
110 transaction_failed = 8300,
111 transaction_timeout = 8301,
112 transaction_aborted = 8302,
113 validation_failed = 8303,
114 data_corrupted = 8304,
115 state_inconsistent = 8305,
116 deadlock_detected = 8306,
117 rollback_failed = 8307,
118
119 // Unknown error
120 unknown_error = 9999
121};

◆ otel_resource_type

◆ otel_span_kind

OpenTelemetry span kinds.

Enumerator
unspecified 
internal 
server 
client 
producer 
consumer 

Definition at line 51 of file opentelemetry_adapter.h.

◆ otel_status_code

OpenTelemetry status codes.

Enumerator
unset 
ok 
error 

Definition at line 64 of file opentelemetry_adapter.h.

◆ plugin_category

Categorization of collector plugins.

Categories help organize plugins by their data source type, enabling selective loading and filtering.

Enumerator
system 

System integration (threads, loggers, containers)

hardware 

Hardware sensors (GPU, temperature, battery, power)

platform 

Platform-specific (VM, uptime, interrupts)

network 

Network metrics (connectivity, bandwidth)

process 

Process-level metrics (resources, performance)

custom 

User-defined plugins.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/plugins/collector_plugin.h.

Definition at line 69 of file collector_plugin.h.

69 {
70 system,
71 hardware,
72 platform,
73 network,
74 process,
75 custom
76};
@ hardware
Hardware sensors (GPU, temperature, battery, power)
@ system
System integration (threads, loggers, containers)
@ network
Network metrics (connectivity, bandwidth)
@ platform
Platform/system power domain.

◆ plugin_load_error

Error codes for plugin loading operations.

Enumerator
none 
file_not_found 
library_load_failed 
symbol_not_found 
incompatible_api_version 
create_function_failed 
plugin_unavailable 
already_loaded 
not_loaded 
invalid_metadata 

Definition at line 52 of file plugin_loader.h.

◆ power_source_type

Type of power source.

Enumerator
unknown 

Unknown power source type.

battery 

Battery power source.

ac 

AC adapter / mains power.

usb 

USB power delivery.

wireless 

Wireless charging.

cpu 

CPU power domain (RAPL)

gpu 

GPU power domain.

memory 

Memory/DRAM power domain (RAPL)

package 

Processor package power domain (RAPL)

platform 

Platform/system power domain.

other 

Other power source type.

Definition at line 38 of file power_collector.h.

38 {
39 unknown,
40 battery,
41 ac,
42 usb,
43 wireless,
44 cpu,
45 gpu,
46 memory,
47 package,
48 platform,
49 other
50};
@ memory
Memory/DRAM power domain (RAPL)
@ cpu
CPU power domain (RAPL)
@ ac
AC adapter / mains power.
@ package
Processor package power domain (RAPL)

◆ recorded_metric_type

Types of recorded metrics.

Enumerator
counter 

Monotonically increasing counter.

gauge 

Instantaneous value that can go up and down.

histogram 

Distribution of values with buckets.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/core/performance_monitor.h.

Definition at line 52 of file performance_monitor.h.

52 {
53 counter,
54 gauge,
56};

◆ resource_type

Type of resource being managed.

Enumerator
memory 

Memory resource.

cpu 

CPU resource.

Definition at line 40 of file resource_manager.h.

40 {
41 memory,
42 cpu
43};

◆ retry_strategy

Retry strategies.

Enumerator
fixed_delay 
exponential_backoff 
linear_backoff 
fibonacci_backoff 

Definition at line 27 of file retry_policy.h.

◆ security_event_type

Types of security events tracked.

Enumerator
login_success 

Successful login attempt.

login_failure 

Failed login attempt.

logout 

User logout.

sudo_usage 

Privilege escalation (sudo)

permission_change 

Permission/ACL change.

account_created 

New account creation.

account_deleted 

Account deletion.

account_modified 

Account modification.

session_start 

Session started.

session_end 

Session ended.

unknown 

Unknown event type.

Definition at line 40 of file security_collector.h.

40 {
41 login_success = 1,
42 login_failure = 2,
43 logout = 3,
44 sudo_usage = 4,
46 account_created = 6,
47 account_deleted = 7,
49 session_start = 9,
50 session_end = 10,
51 unknown = 0
52};
@ permission_change
Permission/ACL change.
@ sudo_usage
Privilege escalation (sudo)
@ login_success
Successful login attempt.
@ account_created
New account creation.
@ account_modified
Account modification.
@ login_failure
Failed login attempt.

◆ sensor_type

Type of temperature sensor.

Enumerator
unknown 

Unknown sensor type.

cpu 

CPU temperature sensor.

gpu 

GPU temperature sensor.

motherboard 

Motherboard/chipset sensor.

storage 

Storage device sensor.

ambient 

Ambient/case temperature.

other 

Other sensor type.

Definition at line 37 of file temperature_collector.h.

37 {
38 unknown,
39 cpu,
40 gpu,
42 storage,
43 ambient,
44 other
45};
@ motherboard
Motherboard/chipset sensor.
@ storage
Storage device sensor.
@ ambient
Ambient/case temperature.

◆ service_priority

Service priority levels.

Enumerator
optional 
normal 
important 
critical 

Definition at line 30 of file graceful_degradation.h.

◆ storage_backend_type

◆ tcp_state

enum class kcenon::monitoring::tcp_state
strong

TCP connection states as defined in RFC 793.

Enumerator
ESTABLISHED 

Connection established.

SYN_SENT 

SYN sent, waiting for SYN-ACK.

SYN_RECV 

SYN received, SYN-ACK sent.

FIN_WAIT1 

FIN sent, waiting for ACK or FIN.

FIN_WAIT2 

FIN-ACK received, waiting for FIN.

TIME_WAIT 

Waiting for enough time to pass (2MSL)

CLOSE 

Connection closed.

CLOSE_WAIT 

Remote side has closed, waiting for local close.

LAST_ACK 

FIN sent after CLOSE_WAIT, waiting for ACK.

LISTEN 

Listening for incoming connections.

CLOSING 

Both sides sent FIN simultaneously.

UNKNOWN 

Unknown or invalid state.

Definition at line 44 of file network_metrics_collector.h.

44 {
45 ESTABLISHED = 1,
46 SYN_SENT = 2,
47 SYN_RECV = 3,
48 FIN_WAIT1 = 4,
49 FIN_WAIT2 = 5,
50 TIME_WAIT = 6,
51 CLOSE = 7,
52 CLOSE_WAIT = 8,
53 LAST_ACK = 9,
54 LISTEN = 10,
55 CLOSING = 11,
56 UNKNOWN = 0
57};
@ FIN_WAIT1
FIN sent, waiting for ACK or FIN.
@ SYN_SENT
SYN sent, waiting for SYN-ACK.
@ TIME_WAIT
Waiting for enough time to pass (2MSL)
@ FIN_WAIT2
FIN-ACK received, waiting for FIN.
@ UNKNOWN
Unknown or invalid state.
@ SYN_RECV
SYN received, SYN-ACK sent.
@ CLOSE
Connection closed.
@ ESTABLISHED
Connection established.
@ CLOSE_WAIT
Remote side has closed, waiting for local close.
@ LAST_ACK
FIN sent after CLOSE_WAIT, waiting for ACK.
@ CLOSING
Both sides sent FIN simultaneously.
@ LISTEN
Listening for incoming connections.

◆ throttling_strategy

Strategy for handling resource exhaustion.

Enumerator
reject 

Reject requests immediately when limit exceeded.

delay 

Delay requests until resources are available.

Definition at line 32 of file resource_manager.h.

32 {
33 reject,
34 delay
35};
@ reject
Reject requests immediately when limit exceeded.
@ delay
Delay requests until resources are available.

◆ trace_export_format

Supported trace export formats.

Enumerator
jaeger_thrift 

Jaeger Thrift protocol.

jaeger_grpc 

Jaeger gRPC protocol.

zipkin_json 

Zipkin JSON v2 format.

zipkin_protobuf 

Zipkin Protocol Buffers format.

otlp_grpc 

OTLP gRPC protocol.

otlp_http_json 

OTLP HTTP JSON protocol.

otlp_http_protobuf 

OTLP HTTP Protocol Buffers.

Definition at line 47 of file trace_exporters.h.

47 {
52 otlp_grpc,
55};
@ zipkin_json
Zipkin JSON v2 format.
@ jaeger_thrift
Jaeger Thrift protocol.
@ zipkin_protobuf
Zipkin Protocol Buffers format.

◆ transaction_state

Transaction states.

Enumerator
active 
committed 
aborted 

Definition at line 32 of file data_consistency.h.

◆ validation_result

Validation result states.

Enumerator
valid 
invalid 

Definition at line 41 of file data_consistency.h.

◆ vm_type

enum class kcenon::monitoring::vm_type
strong

Detected virtualization platform.

Enumerator
none 

Bare metal (or undetected)

kvm 

KVM / QEMU.

hyperv 

Microsoft Hyper-V.

vmware 

VMware.

virtualbox 

Oracle VirtualBox.

xen 

Xen.

docker 

Docker Container (if distinguishable)

other 

Other detected virtualization.

Definition at line 35 of file vm_collector.h.

35 {
36 none = 0,
37 kvm = 1,
38 hyperv = 2,
39 vmware = 3,
40 virtualbox = 4,
41 xen = 5,
42 docker = 6,
43 other = 7
44};
@ docker
Docker Container (if distinguishable)
@ virtualbox
Oracle VirtualBox.
@ hyperv
Microsoft Hyper-V.

Function Documentation

◆ alert_severity_to_string()

const char * kcenon::monitoring::alert_severity_to_string ( alert_severity severity)
constexprnoexcept

Convert alert severity to string.

Parameters
severityThe severity level
Returns
String representation of severity
Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_config.h, /home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_notifiers.h, and alert_notifiers_example.cpp.

Definition at line 47 of file alert_types.h.

47 {
48 switch (severity) {
49 case alert_severity::info: return "info";
50 case alert_severity::warning: return "warning";
51 case alert_severity::critical: return "critical";
52 case alert_severity::emergency: return "emergency";
53 default: return "unknown";
54 }
55}

References critical, emergency, info, and warning.

Referenced by kcenon::monitoring::json_alert_formatter::format(), kcenon::monitoring::text_alert_formatter::format(), kcenon::monitoring::json_alert_formatter::format_group(), kcenon::monitoring::text_alert_formatter::format_group(), main(), kcenon::monitoring::console_color_notifier::notify(), print_alert_state(), kcenon::monitoring::statistics_notifier::print_statistics(), kcenon::monitoring::alert_template::render(), and TEST().

Here is the caller graph for this function:

◆ alert_state_to_string()

const char * kcenon::monitoring::alert_state_to_string ( alert_state state)
constexprnoexcept

Convert alert state to string.

Parameters
stateThe alert state
Returns
String representation of state
Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_config.h, /home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_notifiers.h, and alert_notifiers_example.cpp.

Definition at line 82 of file alert_types.h.

82 {
83 switch (state) {
84 case alert_state::inactive: return "inactive";
85 case alert_state::pending: return "pending";
86 case alert_state::firing: return "firing";
87 case alert_state::resolved: return "resolved";
88 case alert_state::suppressed: return "suppressed";
89 default: return "unknown";
90 }
91}

References firing, inactive, pending, resolved, and suppressed.

Referenced by kcenon::monitoring::json_alert_formatter::format(), kcenon::monitoring::text_alert_formatter::format(), kcenon::monitoring::text_alert_formatter::format_group(), main(), kcenon::monitoring::console_color_notifier::notify(), print_alert_state(), kcenon::monitoring::statistics_notifier::print_statistics(), kcenon::monitoring::alert_template::render(), and TEST().

Here is the caller graph for this function:

◆ battery_status_to_string()

std::string kcenon::monitoring::battery_status_to_string ( battery_status status)
inline

Convert battery_status to string representation.

Definition at line 48 of file battery_collector.h.

48 {
49 switch (status) {
50 case battery_status::charging:
51 return "charging";
52 case battery_status::discharging:
53 return "discharging";
54 case battery_status::not_charging:
55 return "not_charging";
56 case battery_status::full:
57 return "full";
58 default:
59 return "unknown";
60 }
61}

References charging, discharging, full, and not_charging.

◆ comparison_operator_to_string()

const char * kcenon::monitoring::comparison_operator_to_string ( comparison_operator op)
constexprnoexcept

Convert comparison operator to string.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/alert/alert_triggers.h.

Definition at line 44 of file alert_triggers.h.

44 {
45 switch (op) {
46 case comparison_operator::greater_than: return ">";
47 case comparison_operator::greater_or_equal: return ">=";
48 case comparison_operator::less_than: return "<";
49 case comparison_operator::less_or_equal: return "<=";
50 case comparison_operator::equal: return "==";
51 case comparison_operator::not_equal: return "!=";
52 default: return "?";
53 }
54}

References equal, greater_or_equal, greater_than, less_or_equal, less_than, and not_equal.

Referenced by kcenon::monitoring::threshold_trigger::description(), and TEST().

Here is the caller graph for this function:

◆ create_cloud_storage()

std::unique_ptr< snapshot_storage_backend > kcenon::monitoring::create_cloud_storage ( storage_backend_type type,
const std::string & bucket )
inline

Create a cloud storage backend.

Parameters
typeCloud type (cloud_s3, cloud_gcs, cloud_azure_blob)
bucketBucket or container name
Returns
Unique pointer to cloud storage backend

Definition at line 536 of file storage_backends.h.

538 {
539
540 storage_config config;
541 config.type = type;
542 config.path = bucket;
543 config.max_capacity = 100000;
544
545 return storage_backend_factory::create_backend(config);
546}

References kcenon::monitoring::storage_backend_factory::create_backend(), kcenon::monitoring::storage_config::max_capacity, kcenon::monitoring::storage_config::path, and kcenon::monitoring::storage_config::type.

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_data_consistency_manager()

std::shared_ptr< data_consistency_manager > kcenon::monitoring::create_data_consistency_manager ( const std::string & name)
inline

Factory function to create a data consistency manager.

Definition at line 597 of file data_consistency.h.

597 {
598 return std::make_shared<data_consistency_manager>(name);
599}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_database_storage()

std::unique_ptr< snapshot_storage_backend > kcenon::monitoring::create_database_storage ( storage_backend_type type,
const std::string & path,
const std::string & table )
inline

Create a database storage backend.

Parameters
typeDatabase type (database_sqlite, database_postgresql, database_mysql)
pathDatabase path or connection string
tableTable name
Returns
Unique pointer to database storage backend

Definition at line 516 of file storage_backends.h.

519 {
520
521 storage_config config;
522 config.type = type;
523 config.path = path;
524 config.table_name = table;
525 config.max_capacity = 10000;
526
527 return storage_backend_factory::create_backend(config);
528}

References kcenon::monitoring::storage_backend_factory::create_backend(), kcenon::monitoring::storage_config::max_capacity, kcenon::monitoring::storage_config::path, kcenon::monitoring::storage_config::table_name, and kcenon::monitoring::storage_config::type.

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_default_grpc_transport()

std::unique_ptr< grpc_transport > kcenon::monitoring::create_default_grpc_transport ( )
inline

Create default gRPC transport.

Returns a real gRPC transport if available, otherwise falls back to a stub implementation.

Definition at line 590 of file grpc_transport.h.

590 {
591#ifdef MONITORING_HAS_GRPC
592 return std::make_unique<network_grpc_transport>();
593#else
594 return std::make_unique<stub_grpc_transport>();
595#endif
596}

Referenced by TEST().

Here is the caller graph for this function:

◆ create_default_pool_configs()

std::vector< memory_pool_config > kcenon::monitoring::create_default_pool_configs ( )
inline

Create default pool configurations for different use cases.

Returns
Vector of configurations

Definition at line 458 of file memory_pool.h.

458 {
459 return {
460 // Small objects pool
461 {.initial_blocks = 512, .max_blocks = 2048, .block_size = 32, .alignment = 8},
462 // Medium objects pool
463 {.initial_blocks = 256, .max_blocks = 1024, .block_size = 128, .alignment = 16},
464 // Large objects pool
465 {.initial_blocks = 64, .max_blocks = 256, .block_size = 512, .alignment = 32},
466 // Thread-local cache enabled pool
467 {.initial_blocks = 256, .max_blocks = 1024, .block_size = 64, .alignment = 8, .use_thread_local_cache = true}
468 };
469}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_default_queue_configs()

std::vector< lockfree_queue_config > kcenon::monitoring::create_default_queue_configs ( )
inline

Create default queue configurations for different use cases.

Returns
Vector of configurations

Definition at line 337 of file lockfree_queue.h.

337 {
338 return {
339 // Small queue for low-throughput scenarios
340 {.initial_capacity = 64, .max_capacity = 256, .allow_overwrite = false},
341 // Medium queue for general use
342 {.initial_capacity = 1024, .max_capacity = 4096, .allow_overwrite = false},
343 // Large queue for high-throughput scenarios
344 {.initial_capacity = 4096, .max_capacity = 65536, .allow_overwrite = false},
345 // Overwrite queue for streaming data
346 {.initial_capacity = 1024, .max_capacity = 1024, .allow_overwrite = true}
347 };
348}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_default_simd_configs()

std::vector< simd_config > kcenon::monitoring::create_default_simd_configs ( )
inline

Create default SIMD configurations for different use cases.

Returns
Vector of configurations

Definition at line 690 of file simd_aggregator.h.

690 {
691 return {
692 // SIMD enabled with default settings
693 {.enable_simd = true, .vector_size = 8, .alignment = 32, .use_fma = true},
694 // SIMD disabled for comparison
695 {.enable_simd = false, .vector_size = 8, .alignment = 32, .use_fma = false},
696 // Small vector size for smaller datasets
697 {.enable_simd = true, .vector_size = 4, .alignment = 16, .use_fma = true},
698 // Large vector size for AVX-512
699 {.enable_simd = true, .vector_size = 16, .alignment = 64, .use_fma = true}
700 };
701}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_default_transport()

std::unique_ptr< http_transport > kcenon::monitoring::create_default_transport ( )
inline

Create default HTTP transport.

Returns a network_system-based transport if available, otherwise falls back to a stub implementation.

Definition at line 319 of file http_transport.h.

319 {
320#ifdef MONITORING_HAS_NETWORK_SYSTEM
321 return std::make_unique<network_http_transport>();
322#else
323 return std::make_unique<simple_http_client>();
324#endif
325}

◆ create_default_udp_transport()

std::unique_ptr< udp_transport > kcenon::monitoring::create_default_udp_transport ( )
inline

Create default UDP transport.

Returns a network_system-based transport if available, common_system transport if available, otherwise falls back to a stub implementation.

Definition at line 466 of file udp_transport.h.

466 {
467#ifdef MONITORING_HAS_NETWORK_SYSTEM
468 return std::make_unique<network_udp_transport>();
469#else
470 return std::make_unique<stub_udp_transport>();
471#endif
472}

Referenced by TEST().

Here is the caller graph for this function:

◆ create_degradable_service()

template<typename T >
std::shared_ptr< degradable_service< T > > kcenon::monitoring::create_degradable_service ( const std::string & name,
std::shared_ptr< graceful_degradation_manager > manager,
typename degradable_service< T >::normal_operation normal_op,
typename degradable_service< T >::degraded_operation degraded_op )

Create a degradable service.

Definition at line 488 of file graceful_degradation.h.

492 {
493 return std::make_shared<degradable_service<T>>(name, std::move(manager),
494 std::move(normal_op), std::move(degraded_op));
495}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_degradation_manager()

std::shared_ptr< graceful_degradation_manager > kcenon::monitoring::create_degradation_manager ( const std::string & name)
inline

Create a graceful degradation manager.

Definition at line 455 of file graceful_degradation.h.

455 {
456 return std::make_shared<graceful_degradation_manager>(name);
457}

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_degradation_plan()

degradation_plan kcenon::monitoring::create_degradation_plan ( const std::string & name,
const std::vector< std::string > & maintain,
const std::vector< std::string > & disable,
degradation_level level )
inline

Create a degradation plan.

Definition at line 472 of file graceful_degradation.h.

475 {
476 degradation_plan plan;
477 plan.name = name;
478 plan.services_to_maintain = maintain;
479 plan.services_to_disable = disable;
480 plan.target_level = level;
481 return plan;
482}
Degradation plan for coordinated service degradation.
std::vector< std::string > services_to_disable
std::vector< std::string > services_to_maintain

References kcenon::monitoring::degradation_plan::name, kcenon::monitoring::degradation_plan::services_to_disable, kcenon::monitoring::degradation_plan::services_to_maintain, and kcenon::monitoring::degradation_plan::target_level.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_exponential_backoff_config()

retry_config kcenon::monitoring::create_exponential_backoff_config ( size_t max_attempts = 3,
std::chrono::milliseconds initial_delay = std::chrono::milliseconds(1000) )
inline

Factory function for exponential backoff config.

Parameters
max_attemptsMaximum retry attempts
initial_delayInitial delay between retries
Returns
retry_config configured for exponential backoff

Definition at line 83 of file retry_policy.h.

85 {
86 retry_config config;
87 config.max_attempts = max_attempts;
88 config.strategy = retry_strategy::exponential_backoff;
89 config.initial_delay = initial_delay;
90 config.backoff_multiplier = 2.0;
91 return config;
92}
std::chrono::milliseconds initial_delay

References kcenon::monitoring::retry_config::backoff_multiplier, exponential_backoff, kcenon::monitoring::retry_config::initial_delay, kcenon::monitoring::retry_config::max_attempts, and kcenon::monitoring::retry_config::strategy.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_fibonacci_backoff_config()

retry_config kcenon::monitoring::create_fibonacci_backoff_config ( size_t max_attempts = 3,
std::chrono::milliseconds initial_delay = std::chrono::milliseconds(1000) )
inline

Factory function for Fibonacci backoff config.

Parameters
max_attemptsMaximum retry attempts
initial_delayBase delay for Fibonacci sequence
Returns
retry_config configured for Fibonacci backoff

Definition at line 116 of file retry_policy.h.

118 {
119 retry_config config;
120 config.max_attempts = max_attempts;
121 config.strategy = retry_strategy::fibonacci_backoff;
122 config.initial_delay = initial_delay;
123 return config;
124}

References fibonacci_backoff, kcenon::monitoring::retry_config::initial_delay, kcenon::monitoring::retry_config::max_attempts, and kcenon::monitoring::retry_config::strategy.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_file_storage()

std::unique_ptr< snapshot_storage_backend > kcenon::monitoring::create_file_storage ( const std::string & path,
storage_backend_type type,
size_t capacity )
inline

Create a file storage backend.

Parameters
pathFile path
typeStorage type (file_json, file_binary, file_csv)
capacityMaximum capacity
Returns
Unique pointer to file storage backend

Definition at line 496 of file storage_backends.h.

499 {
500
501 storage_config config;
502 config.type = type;
503 config.path = path;
504 config.max_capacity = capacity;
505
506 return storage_backend_factory::create_backend(config);
507}

References kcenon::monitoring::storage_backend_factory::create_backend(), kcenon::monitoring::storage_config::max_capacity, kcenon::monitoring::storage_config::path, and kcenon::monitoring::storage_config::type.

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_fixed_delay_config()

retry_config kcenon::monitoring::create_fixed_delay_config ( size_t max_attempts = 3,
std::chrono::milliseconds delay = std::chrono::milliseconds(1000) )
inline

Factory function for fixed delay config.

Parameters
max_attemptsMaximum retry attempts
delayFixed delay between retries
Returns
retry_config configured for fixed delay

Definition at line 100 of file retry_policy.h.

102 {
103 retry_config config;
104 config.max_attempts = max_attempts;
105 config.strategy = retry_strategy::fixed_delay;
106 config.initial_delay = delay;
107 return config;
108}

References delay, fixed_delay, kcenon::monitoring::retry_config::initial_delay, kcenon::monitoring::retry_config::max_attempts, and kcenon::monitoring::retry_config::strategy.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_jaeger_exporter()

std::unique_ptr< jaeger_exporter > kcenon::monitoring::create_jaeger_exporter ( const std::string & endpoint,
trace_export_format format = trace_export_format::jaeger_grpc )
inline

Helper function to create a Jaeger exporter.

Definition at line 806 of file trace_exporters.h.

808 {
809
810 trace_export_config config;
811 config.endpoint = endpoint;
812 config.format = format;
813 return std::make_unique<jaeger_exporter>(config);
814}
Configuration for trace exporters.

References kcenon::monitoring::trace_export_config::endpoint, and kcenon::monitoring::trace_export_config::format.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_leaky_bucket_limiter()

std::unique_ptr< leaky_bucket_limiter > kcenon::monitoring::create_leaky_bucket_limiter ( const std::string & name,
double rate,
size_t capacity )
inline

Create a leaky bucket rate limiter.

Definition at line 614 of file resource_manager.h.

615 {
616 return std::make_unique<leaky_bucket_limiter>(name, rate, capacity);
617}

Referenced by TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_memory_quota_manager()

std::unique_ptr< memory_quota_manager > kcenon::monitoring::create_memory_quota_manager ( const std::string & name,
size_t max_bytes,
throttling_strategy strategy = throttling_strategy::reject )
inline

Create a memory quota manager.

Definition at line 622 of file resource_manager.h.

624 {
625 return std::make_unique<memory_quota_manager>(name, max_bytes, strategy);
626}

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_metric_metadata()

metric_metadata kcenon::monitoring::create_metric_metadata ( const std::string & name,
metric_type type,
size_t tag_count = 0 )
inline

Create metric metadata from name and type.

Definition at line 616 of file metric_types.h.

618 {
619 return metric_metadata(
620 hash_metric_name(name),
621 type,
622 static_cast<uint8_t>((std::min)(tag_count, size_t(255)))
623 );
624}
uint32_t hash_metric_name(const std::string &name) noexcept
Hash function for metric names.
Compact metadata for metrics.

References hash_metric_name().

Referenced by demonstrate_metric_batch(), demonstrate_metric_metadata(), kcenon::monitoring::metric_storage::store_metric(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_opentelemetry_compatibility_layer() [1/2]

std::unique_ptr< opentelemetry_compatibility_layer > kcenon::monitoring::create_opentelemetry_compatibility_layer ( const otel_resource & resource)
inline

Create OpenTelemetry compatibility layer.

Definition at line 553 of file opentelemetry_adapter.h.

553 {
554 return std::make_unique<opentelemetry_compatibility_layer>(resource);
555}

Referenced by create_opentelemetry_compatibility_layer(), OpenTelemetryAdapterTest::SetUp(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_opentelemetry_compatibility_layer() [2/2]

std::unique_ptr< opentelemetry_compatibility_layer > kcenon::monitoring::create_opentelemetry_compatibility_layer ( const std::string & service_name,
const std::string & service_version = "1.0.0" )
inline

Create OpenTelemetry compatibility layer with service resource.

Definition at line 561 of file opentelemetry_adapter.h.

562 {
563 auto resource = create_service_resource(service_name, service_version);
565}
std::unique_ptr< opentelemetry_compatibility_layer > create_opentelemetry_compatibility_layer(const otel_resource &resource)
Create OpenTelemetry compatibility layer.
otel_resource create_service_resource(const std::string &service_name, const std::string &service_version="1.0.0", const std::string &service_namespace="")
Create OpenTelemetry resource with service information.

References create_opentelemetry_compatibility_layer(), and create_service_resource().

Here is the call graph for this function:

◆ create_otlp_exporter()

std::unique_ptr< otlp_exporter > kcenon::monitoring::create_otlp_exporter ( const std::string & endpoint,
const otel_resource & resource,
trace_export_format format = trace_export_format::otlp_grpc )
inline

Helper function to create an OTLP exporter.

Definition at line 832 of file trace_exporters.h.

835 {
836
837 trace_export_config config;
838 config.endpoint = endpoint;
839 config.format = format;
840 return std::make_unique<otlp_exporter>(config, resource);
841}

References kcenon::monitoring::trace_export_config::endpoint, and kcenon::monitoring::trace_export_config::format.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_otlp_grpc_exporter() [1/2]

std::unique_ptr< otlp_grpc_exporter > kcenon::monitoring::create_otlp_grpc_exporter ( const otlp_grpc_config & config)
inline

Create OTLP gRPC exporter with custom configuration.

Parameters
configExporter configuration
Returns
Unique pointer to exporter

Definition at line 647 of file otlp_grpc_exporter.h.

648 {
649
650 return std::make_unique<otlp_grpc_exporter>(config);
651}

◆ create_otlp_grpc_exporter() [2/2]

std::unique_ptr< otlp_grpc_exporter > kcenon::monitoring::create_otlp_grpc_exporter ( const std::string & endpoint = "localhost:4317")
inline

Create OTLP gRPC exporter with default configuration.

Parameters
endpointOTLP receiver endpoint
Returns
Unique pointer to exporter

Definition at line 634 of file otlp_grpc_exporter.h.

635 :4317") {
636
637 otlp_grpc_config config;
638 config.endpoint = endpoint;
639 return std::make_unique<otlp_grpc_exporter>(config);
640}

References kcenon::monitoring::otlp_grpc_config::endpoint.

Referenced by demonstrate_batch_export(), demonstrate_otlp_export(), and TEST_F().

Here is the caller graph for this function:

◆ create_otlp_metrics_exporter()

std::unique_ptr< otlp_metrics_exporter > kcenon::monitoring::create_otlp_metrics_exporter ( const std::string & endpoint,
const otel_resource & resource,
metric_export_format format = metric_export_format::otlp_grpc )
inline

Helper function to create an OTLP metrics exporter.

Definition at line 1176 of file metric_exporters.h.

1179 {
1180
1181 metric_export_config config;
1182 config.endpoint = endpoint;
1183 config.format = format;
1184 return std::make_unique<otlp_metrics_exporter>(config, resource);
1185}
Configuration for metric exporters.
std::string endpoint
Endpoint URL or address.

References kcenon::monitoring::metric_export_config::endpoint, and kcenon::monitoring::metric_export_config::format.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_prometheus_exporter()

std::unique_ptr< prometheus_exporter > kcenon::monitoring::create_prometheus_exporter ( std::uint16_t port = 9090,
const std::string & job_name = "monitoring_system" )
inline

Helper function to create a Prometheus exporter.

Definition at line 1147 of file metric_exporters.h.

1149 {
1150
1151 metric_export_config config;
1152 config.port = port;
1153 config.format = metric_export_format::prometheus_text;
1154 config.job_name = job_name;
1155 return std::make_unique<prometheus_exporter>(config);
1156}
std::uint16_t port
Port number (for UDP/TCP)
std::string job_name
Prometheus job name.

References kcenon::monitoring::metric_export_config::format, kcenon::monitoring::metric_export_config::job_name, kcenon::monitoring::metric_export_config::port, and prometheus_text.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_resource_manager()

std::unique_ptr< resource_manager > kcenon::monitoring::create_resource_manager ( const std::string & name)
inline

Create a resource manager.

Definition at line 631 of file resource_manager.h.

631 {
632 return std::make_unique<resource_manager>(name);
633}

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_sample_alert()

alert kcenon::monitoring::create_sample_alert ( const std::string & name,
alert_severity severity,
alert_state state,
double value,
const std::string & team = "ops" )
Examples
alert_notifiers_example.cpp.

Definition at line 40 of file alert_notifiers_example.cpp.

44 {
45 alert a;
46 a.name = name;
47 a.severity = severity;
48 a.state = state;
49 a.value = value;
50 a.labels.set("team", team);
51 a.labels.set("environment", "production");
52 a.annotations.summary = "Alert: " + name;
53 a.annotations.description = "Detailed description for " + name;
54 a.rule_name = name + "_rule";
55 return a;
56}
std::string description
Detailed description.
std::string summary
Brief description.
void set(const std::string &key, const std::string &value)
Add or update a label.
Core alert data structure.
alert_state state
Current state.
double value
Current metric value.
alert_severity severity
Alert severity level.
std::string rule_name
Name of triggering rule.
std::string name
Alert name/identifier.
alert_labels labels
Identifying labels.
alert_annotations annotations
Descriptive annotations.

References kcenon::monitoring::alert::annotations, kcenon::monitoring::alert_annotations::description, kcenon::monitoring::alert::labels, kcenon::monitoring::alert::name, kcenon::monitoring::alert::rule_name, kcenon::monitoring::alert_labels::set(), kcenon::monitoring::alert::severity, kcenon::monitoring::alert::state, kcenon::monitoring::alert_annotations::summary, and kcenon::monitoring::alert::value.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_service_config()

service_config kcenon::monitoring::create_service_config ( const std::string & name,
service_priority priority )
inline

Create a service configuration.

Definition at line 462 of file graceful_degradation.h.

462 {
463 service_config config;
464 config.name = name;
465 config.priority = priority;
466 return config;
467}
Service configuration for graceful degradation.

References kcenon::monitoring::service_config::name, and kcenon::monitoring::service_config::priority.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_service_resource()

otel_resource kcenon::monitoring::create_service_resource ( const std::string & service_name,
const std::string & service_version = "1.0.0",
const std::string & service_namespace = "" )
inline

Create OpenTelemetry resource with service information.

Definition at line 532 of file opentelemetry_adapter.h.

534 {
535 otel_resource resource;
536 resource.type = otel_resource_type::service;
537 resource.add_attribute("service.name", service_name);
538 resource.add_attribute("service.version", service_version);
539 if (!service_namespace.empty()) {
540 resource.add_attribute("service.namespace", service_namespace);
541 }
542 resource.add_attribute("telemetry.sdk.name", "monitoring_system");
543 resource.add_attribute("telemetry.sdk.version", "0.5.0");
544 resource.add_attribute("telemetry.sdk.language", "cpp");
545
546 return resource;
547}
OpenTelemetry resource representation.
void add_attribute(const std::string &key, const std::string &value)

References kcenon::monitoring::otel_resource::add_attribute(), service, and kcenon::monitoring::otel_resource::type.

Referenced by create_opentelemetry_compatibility_layer(), MetricExportersTest::SetUp(), OpenTelemetryAdapterTest::SetUp(), TraceExportersTest::SetUp(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_standard_aggregation_rules()

std::vector< aggregation_rule > kcenon::monitoring::create_standard_aggregation_rules ( )
inline

Create standard aggregation rules for common metrics.

Returns
Vector of pre-configured aggregation rules

Definition at line 308 of file aggregation_processor.h.

308 {
309 std::vector<aggregation_rule> rules;
310
311 // Response time metrics
312 {
313 aggregation_rule rule;
314 rule.source_metric = "response_time";
315 rule.target_metric_prefix = "response_time_agg";
316 rule.aggregation_interval = std::chrono::milliseconds(60000);
317 rule.percentiles = {0.5, 0.9, 0.95, 0.99};
318 rule.compute_rate = false;
319 rule.detect_outliers = true;
320 rules.push_back(rule);
321 }
322
323 // Request count metrics
324 {
325 aggregation_rule rule;
326 rule.source_metric = "request_count";
327 rule.target_metric_prefix = "request_count_agg";
328 rule.aggregation_interval = std::chrono::milliseconds(60000);
329 rule.percentiles = {0.5, 0.9, 0.95, 0.99};
330 rule.compute_rate = true;
331 rule.detect_outliers = false;
332 rules.push_back(rule);
333 }
334
335 // Error count metrics
336 {
337 aggregation_rule rule;
338 rule.source_metric = "error_count";
339 rule.target_metric_prefix = "error_count_agg";
340 rule.aggregation_interval = std::chrono::milliseconds(60000);
341 rule.percentiles = {0.5, 0.9, 0.95, 0.99};
342 rule.compute_rate = true;
343 rule.detect_outliers = true;
344 rule.outlier_threshold = 2.0; // More sensitive for errors
345 rules.push_back(rule);
346 }
347
348 // CPU usage metrics
349 {
350 aggregation_rule rule;
351 rule.source_metric = "cpu_usage";
352 rule.target_metric_prefix = "cpu_usage_agg";
353 rule.aggregation_interval = std::chrono::milliseconds(60000);
354 rule.percentiles = {0.5, 0.9, 0.95, 0.99};
355 rule.compute_rate = false;
356 rule.detect_outliers = true;
357 rules.push_back(rule);
358 }
359
360 // Memory usage metrics
361 {
362 aggregation_rule rule;
363 rule.source_metric = "memory_usage";
364 rule.target_metric_prefix = "memory_usage_agg";
365 rule.aggregation_interval = std::chrono::milliseconds(60000);
366 rule.percentiles = {0.5, 0.9, 0.95, 0.99};
367 rule.compute_rate = false;
368 rule.detect_outliers = true;
369 rules.push_back(rule);
370 }
371
372 return rules;
373}
Configuration for metric aggregation.
std::chrono::milliseconds aggregation_interval
Aggregation interval.
bool compute_rate
Compute rate of change.
std::string target_metric_prefix
Prefix for aggregated metrics.
std::string source_metric
Source metric name.
bool detect_outliers
Enable outlier detection.
std::vector< double > percentiles
Percentiles to compute.

References kcenon::monitoring::aggregation_rule::aggregation_interval, kcenon::monitoring::aggregation_rule::compute_rate, kcenon::monitoring::aggregation_rule::detect_outliers, kcenon::monitoring::aggregation_rule::outlier_threshold, kcenon::monitoring::aggregation_rule::percentiles, kcenon::monitoring::aggregation_rule::source_metric, and kcenon::monitoring::aggregation_rule::target_metric_prefix.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_state_validator()

std::shared_ptr< state_validator > kcenon::monitoring::create_state_validator ( const std::string & name)
inline

Factory function to create a state validator.

Definition at line 589 of file data_consistency.h.

589 {
590 validation_config config;
591 return std::make_shared<state_validator>(name, config);
592}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_statsd_exporter()

std::unique_ptr< statsd_exporter > kcenon::monitoring::create_statsd_exporter ( const std::string & host = "localhost",
std::uint16_t port = 8125,
bool datadog_format = false )
inline

Helper function to create a StatsD exporter.

Definition at line 1161 of file metric_exporters.h.

1164 {
1165
1166 metric_export_config config;
1167 config.endpoint = host;
1168 config.port = port;
1169 config.format = datadog_format ? metric_export_format::statsd_datadog : metric_export_format::statsd_plain;
1170 return std::make_unique<statsd_exporter>(config);
1171}

References kcenon::monitoring::metric_export_config::endpoint, kcenon::monitoring::metric_export_config::format, host, kcenon::monitoring::metric_export_config::port, statsd_datadog, and statsd_plain.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_stub_grpc_transport()

std::unique_ptr< stub_grpc_transport > kcenon::monitoring::create_stub_grpc_transport ( )
inline

Create stub gRPC transport for testing.

Definition at line 601 of file grpc_transport.h.

601 {
602 return std::make_unique<stub_grpc_transport>();
603}

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_stub_transport()

std::unique_ptr< stub_http_transport > kcenon::monitoring::create_stub_transport ( )
inline

Create stub HTTP transport for testing.

Definition at line 330 of file http_transport.h.

330 {
331 return std::make_unique<stub_http_transport>();
332}

Referenced by TEST(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_stub_udp_transport()

std::unique_ptr< stub_udp_transport > kcenon::monitoring::create_stub_udp_transport ( )
inline

Create stub UDP transport for testing.

Definition at line 477 of file udp_transport.h.

477 {
478 return std::make_unique<stub_udp_transport>();
479}

Referenced by TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_token_bucket_limiter()

std::unique_ptr< token_bucket_limiter > kcenon::monitoring::create_token_bucket_limiter ( const std::string & name,
double rate,
size_t capacity,
throttling_strategy strategy = throttling_strategy::reject )
inline

Create a token bucket rate limiter.

Definition at line 605 of file resource_manager.h.

607 {
608 return std::make_unique<token_bucket_limiter>(name, rate, capacity, strategy);
609}

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ create_transaction_manager()

std::shared_ptr< transaction_manager > kcenon::monitoring::create_transaction_manager ( const std::string & name)
inline

Factory function to create a transaction manager.

Definition at line 581 of file data_consistency.h.

581 {
582 transaction_config config;
583 return std::make_shared<transaction_manager>(name, config);
584}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ create_zipkin_exporter()

std::unique_ptr< zipkin_exporter > kcenon::monitoring::create_zipkin_exporter ( const std::string & endpoint,
trace_export_format format = trace_export_format::zipkin_json )
inline

Helper function to create a Zipkin exporter.

Definition at line 819 of file trace_exporters.h.

821 {
822
823 trace_export_config config;
824 config.endpoint = endpoint;
825 config.format = format;
826 return std::make_unique<zipkin_exporter>(config);
827}

References kcenon::monitoring::trace_export_config::endpoint, and kcenon::monitoring::trace_export_config::format.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ error_code_to_string()

std::string kcenon::monitoring::error_code_to_string ( monitoring_error_code code)
inline

Convert error code to string representation.

Parameters
codeThe error code to convert
Returns
String representation of the error code

Definition at line 128 of file error_codes.h.

128 {
129 switch (code) {
130 case monitoring_error_code::success:
131 return "Success";
132
133 // Collection errors
134 case monitoring_error_code::collector_not_found:
135 return "Collector not found";
136 case monitoring_error_code::collection_failed:
137 return "Collection failed";
138 case monitoring_error_code::collector_initialization_failed:
139 return "Collector initialization failed";
140 case monitoring_error_code::collector_already_exists:
141 return "Collector already exists";
142 case monitoring_error_code::collector_disabled:
143 return "Collector is disabled";
144 case monitoring_error_code::invalid_collector_config:
145 return "Invalid collector configuration";
146 case monitoring_error_code::monitoring_disabled:
147 return "Monitoring is disabled";
148
149 // Storage errors
150 case monitoring_error_code::storage_full:
151 return "Storage is full";
152 case monitoring_error_code::storage_corrupted:
153 return "Storage is corrupted";
154 case monitoring_error_code::compression_failed:
155 return "Compression failed";
156 case monitoring_error_code::storage_not_initialized:
157 return "Storage not initialized";
158 case monitoring_error_code::storage_write_failed:
159 return "Storage write failed";
160 case monitoring_error_code::storage_read_failed:
161 return "Storage read failed";
162 case monitoring_error_code::storage_empty:
163 return "Storage is empty";
164
165 // Configuration errors
166 case monitoring_error_code::invalid_configuration:
167 return "Invalid configuration";
168 case monitoring_error_code::invalid_interval:
169 return "Invalid interval";
170 case monitoring_error_code::invalid_capacity:
171 return "Invalid capacity";
172 case monitoring_error_code::configuration_not_found:
173 return "Configuration not found";
174 case monitoring_error_code::configuration_parse_error:
175 return "Configuration parse error";
176
177 // System errors
178 case monitoring_error_code::system_resource_unavailable:
179 return "System resource unavailable";
180 case monitoring_error_code::permission_denied:
181 return "Permission denied";
182 case monitoring_error_code::out_of_memory:
183 return "Out of memory";
184 case monitoring_error_code::memory_allocation_failed:
185 return "Memory allocation failed";
186 case monitoring_error_code::operation_timeout:
187 return "Operation timeout";
188 case monitoring_error_code::operation_cancelled:
189 return "Operation cancelled";
190
191 // Integration errors
192 case monitoring_error_code::thread_system_not_available:
193 return "Thread system not available";
194 case monitoring_error_code::logger_system_not_available:
195 return "Logger system not available";
196 case monitoring_error_code::incompatible_version:
197 return "Incompatible version";
198 case monitoring_error_code::adapter_initialization_failed:
199 return "Adapter initialization failed";
200
201 // Metrics errors
202 case monitoring_error_code::metric_not_found:
203 return "Metric not found";
204 case monitoring_error_code::invalid_metric_type:
205 return "Invalid metric type";
206 case monitoring_error_code::metric_overflow:
207 return "Metric overflow";
208 case monitoring_error_code::aggregation_failed:
209 return "Aggregation failed";
210
211 // Health check errors
212 case monitoring_error_code::health_check_failed:
213 return "Health check failed";
214 case monitoring_error_code::health_check_timeout:
215 return "Health check timeout";
216 case monitoring_error_code::health_check_not_registered:
217 return "Health check not registered";
218
219 // Fault tolerance errors
220 case monitoring_error_code::circuit_breaker_open:
221 return "Circuit breaker is open";
222 case monitoring_error_code::circuit_breaker_half_open:
223 return "Circuit breaker is half-open";
224 case monitoring_error_code::retry_attempts_exhausted:
225 return "Retry attempts exhausted";
226 case monitoring_error_code::operation_failed:
227 return "Operation failed";
228 case monitoring_error_code::network_error:
229 return "Network error";
230 case monitoring_error_code::service_unavailable:
231 return "Service unavailable";
232 case monitoring_error_code::service_degraded:
233 return "Service operating in degraded mode";
234 case monitoring_error_code::error_boundary_triggered:
235 return "Error boundary triggered";
236 case monitoring_error_code::fallback_failed:
237 return "Fallback operation failed";
238 case monitoring_error_code::recovery_failed:
239 return "Recovery operation failed";
240
241 // General errors
242 case monitoring_error_code::invalid_argument:
243 return "Invalid argument";
244 case monitoring_error_code::invalid_state:
245 return "Invalid state";
246 case monitoring_error_code::not_found:
247 return "Not found";
248 case monitoring_error_code::already_exists:
249 return "Already exists";
250 case monitoring_error_code::resource_exhausted:
251 return "Resource exhausted";
252 case monitoring_error_code::already_started:
253 return "Already started";
254 case monitoring_error_code::dependency_missing:
255 return "Dependency missing";
256
257 // Resource management errors
258 case monitoring_error_code::quota_exceeded:
259 return "Quota exceeded";
260 case monitoring_error_code::rate_limit_exceeded:
261 return "Rate limit exceeded";
262 case monitoring_error_code::cpu_throttled:
263 return "CPU throttled";
264 case monitoring_error_code::memory_quota_exceeded:
265 return "Memory quota exceeded";
266 case monitoring_error_code::bandwidth_exceeded:
267 return "Bandwidth exceeded";
268 case monitoring_error_code::resource_unavailable:
269 return "Resource unavailable";
270
271 // Data consistency errors
272 case monitoring_error_code::transaction_failed:
273 return "Transaction failed";
274 case monitoring_error_code::transaction_timeout:
275 return "Transaction timeout";
276 case monitoring_error_code::transaction_aborted:
277 return "Transaction aborted";
278 case monitoring_error_code::validation_failed:
279 return "Validation failed";
280 case monitoring_error_code::data_corrupted:
281 return "Data corrupted";
282 case monitoring_error_code::state_inconsistent:
283 return "State inconsistent";
284 case monitoring_error_code::deadlock_detected:
285 return "Deadlock detected";
286 case monitoring_error_code::rollback_failed:
287 return "Rollback failed";
288
289 // Unknown error
290 case monitoring_error_code::unknown_error:
291 default:
292 return "Unknown error";
293 }
294}

References adapter_initialization_failed, aggregation_failed, already_exists, already_started, bandwidth_exceeded, circuit_breaker_half_open, circuit_breaker_open, collection_failed, collector_already_exists, collector_disabled, collector_initialization_failed, collector_not_found, compression_failed, configuration_not_found, configuration_parse_error, cpu_throttled, data_corrupted, deadlock_detected, dependency_missing, error_boundary_triggered, fallback_failed, health_check_failed, health_check_not_registered, health_check_timeout, incompatible_version, invalid_argument, invalid_capacity, invalid_collector_config, invalid_configuration, invalid_interval, invalid_metric_type, invalid_state, logger_system_not_available, memory_allocation_failed, memory_quota_exceeded, metric_not_found, metric_overflow, monitoring_disabled, network_error, not_found, operation_cancelled, operation_failed, operation_timeout, out_of_memory, permission_denied, quota_exceeded, rate_limit_exceeded, recovery_failed, resource_exhausted, resource_unavailable, retry_attempts_exhausted, rollback_failed, service_degraded, service_unavailable, state_inconsistent, storage_corrupted, storage_empty, storage_full, storage_not_initialized, storage_read_failed, storage_write_failed, success, system_resource_unavailable, thread_system_not_available, transaction_aborted, transaction_failed, transaction_timeout, unknown_error, and validation_failed.

Referenced by get_error_details(), TEST_F(), and kcenon::monitoring::error_info::to_string().

Here is the caller graph for this function:

◆ execute_with_circuit_breaker()

template<typename T , typename Func >
common::Result< T > kcenon::monitoring::execute_with_circuit_breaker ( circuit_breaker & cb,
const std::string & name,
Func && func )

Execute an operation through a circuit breaker.

Wraps the allow_request/record_success/record_failure pattern into a functional execute() call for convenience.

Template Parameters
TThe return value type
FuncThe function type (must return common::Result<T>)
Parameters
cbThe circuit breaker instance
nameThe circuit breaker name (for error messages)
funcThe function to execute
Returns
common::Result<T> containing success value or error

Definition at line 82 of file fault_tolerance_manager.h.

82 {
83 if (!cb.allow_request()) {
84 return common::make_error<T>(static_cast<int>(monitoring_error_code::circuit_breaker_open),
85 "Circuit breaker '" + name + "' is open");
86 }
87
88 auto op_result = func();
89 if (op_result.is_ok()) {
90 cb.record_success();
91 } else {
92 cb.record_failure();
93 }
94 return op_result;
95}

References circuit_breaker_open.

Referenced by demonstrate_circuit_breaker(), demonstrate_combined_patterns(), kcenon::monitoring::fault_tolerance_manager< T >::execute_circuit_breaker_first(), kcenon::monitoring::fault_tolerance_manager< T >::execute_retry_first(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ get_builtin_collector_names()

std::vector< std::string > kcenon::monitoring::get_builtin_collector_names ( )
inline

Get list of all built-in collector names.

Returns
Vector of built-in collector names

Definition at line 105 of file builtin_collectors.h.

105 {
106 return {"battery_collector",
107 "uptime_collector",
108 "interrupt_collector",
109 "network_metrics_collector",
110 "platform_metrics_collector",
111 "process_metrics_collector",
112 "security_collector",
113 "smart_collector",
114 "vm_collector",
115 "system_resource_collector"};
116}

◆ get_error_details()

std::string kcenon::monitoring::get_error_details ( monitoring_error_code code)
inline

Get detailed error message.

Parameters
codeThe error code
Returns
Detailed error message with suggestions

Definition at line 301 of file error_codes.h.

301 {
302 switch (code) {
303 case monitoring_error_code::collector_not_found:
304 return "The specified collector was not found. Check collector name and ensure it's registered.";
305 case monitoring_error_code::storage_full:
306 return "Storage capacity exceeded. Consider increasing buffer size or reducing collection frequency.";
307 case monitoring_error_code::invalid_configuration:
308 return "Configuration validation failed. Review configuration parameters and constraints.";
309 case monitoring_error_code::thread_system_not_available:
310 return "Thread system integration not available. Ensure thread_system is properly linked.";
311 case monitoring_error_code::circuit_breaker_open:
312 return "Circuit breaker is open, rejecting calls to protect downstream services. Wait for recovery or check service health.";
313 case monitoring_error_code::retry_attempts_exhausted:
314 return "All retry attempts have been exhausted. The operation failed permanently. Check service availability and error conditions.";
315 case monitoring_error_code::operation_failed:
316 return "The requested operation failed. Check service status, network connectivity, and input parameters.";
317 case monitoring_error_code::service_degraded:
318 return "Service is operating in degraded mode due to detected issues. Some features may be unavailable.";
319 case monitoring_error_code::error_boundary_triggered:
320 return "Error boundary has been triggered to prevent error propagation. Check upstream service health.";
321 case monitoring_error_code::fallback_failed:
322 return "Both primary operation and fallback mechanism failed. Check alternative service configurations.";
323 case monitoring_error_code::quota_exceeded:
324 return "Resource quota has been exceeded. Reduce resource consumption or increase quota limits.";
325 case monitoring_error_code::rate_limit_exceeded:
326 return "Rate limit has been exceeded. Reduce request frequency or increase rate limits.";
327 case monitoring_error_code::cpu_throttled:
328 return "Operation has been throttled due to high CPU usage. Reduce system load or adjust CPU limits.";
329 case monitoring_error_code::memory_quota_exceeded:
330 return "Memory quota has been exceeded. Free memory or increase memory quota limits.";
331 case monitoring_error_code::bandwidth_exceeded:
332 return "Bandwidth quota has been exceeded. Reduce data transfer or increase bandwidth limits.";
333 case monitoring_error_code::resource_unavailable:
334 return "Required resource is currently unavailable. Try again later or check resource status.";
335 case monitoring_error_code::transaction_failed:
336 return "Transaction failed to complete successfully. Check operation prerequisites and system state.";
337 case monitoring_error_code::transaction_timeout:
338 return "Transaction exceeded its timeout limit. Consider increasing timeout or reducing transaction scope.";
339 case monitoring_error_code::transaction_aborted:
340 return "Transaction was aborted due to conflicts or errors. Review transaction operations and retry.";
341 case monitoring_error_code::validation_failed:
342 return "Data validation failed. Check data integrity and consistency requirements.";
343 case monitoring_error_code::data_corrupted:
344 return "Data corruption detected. Run data repair operations or restore from backup.";
345 case monitoring_error_code::state_inconsistent:
346 return "System state is inconsistent across components. Synchronization or recovery needed.";
347 case monitoring_error_code::deadlock_detected:
348 return "Deadlock detected in transaction processing. Review locking strategy and transaction ordering.";
349 case monitoring_error_code::rollback_failed:
350 return "Transaction rollback failed. Manual cleanup may be required to restore consistent state.";
351 default:
352 return error_code_to_string(code);
353 }
354}
std::string error_code_to_string(monitoring_error_code code)
Convert error code to string representation.

References bandwidth_exceeded, circuit_breaker_open, collector_not_found, cpu_throttled, data_corrupted, deadlock_detected, error_boundary_triggered, error_code_to_string(), fallback_failed, invalid_configuration, memory_quota_exceeded, operation_failed, quota_exceeded, rate_limit_exceeded, resource_unavailable, retry_attempts_exhausted, rollback_failed, service_degraded, state_inconsistent, storage_full, thread_system_not_available, transaction_aborted, transaction_failed, transaction_timeout, and validation_failed.

Here is the call graph for this function:

◆ global_adaptive_monitor()

adaptive_monitor & kcenon::monitoring::global_adaptive_monitor ( )

Global adaptive monitor instance.

Referenced by TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ global_circuit_breaker_registry()

circuit_breaker_registry & kcenon::monitoring::global_circuit_breaker_registry ( )
inline

Get global circuit breaker registry.

Definition at line 406 of file fault_tolerance_manager.h.

406 {
407 static circuit_breaker_registry instance;
408 return instance;
409}

Referenced by FaultToleranceTest::TearDown(), and TEST_F().

Here is the caller graph for this function:

◆ global_error_boundary_registry()

error_boundary_registry & kcenon::monitoring::global_error_boundary_registry ( )
inline

Get global error boundary registry.

Definition at line 447 of file graceful_degradation.h.

447 {
448 static error_boundary_registry instance;
449 return instance;
450}
Error boundary registry for managing multiple boundaries.

Referenced by ErrorBoundariesTest::TearDown(), and TEST_F().

Here is the caller graph for this function:

◆ global_fault_tolerance_registry()

fault_tolerance_registry & kcenon::monitoring::global_fault_tolerance_registry ( )
inline

Get global fault tolerance manager registry.

Definition at line 422 of file fault_tolerance_manager.h.

422 {
423 static fault_tolerance_registry instance;
424 return instance;
425}

Referenced by FaultToleranceTest::TearDown(), and TEST_F().

Here is the caller graph for this function:

◆ global_health_monitor()

health_monitor & kcenon::monitoring::global_health_monitor ( )
inline

Get the global health monitor singleton instance.

Returns
Reference to the global health monitor

Definition at line 1019 of file health_monitor.h.

1019 {
1020 static health_monitor instance;
1021 return instance;
1022}
Health monitor with dependency management, auto-recovery, and statistics.

Referenced by TEST_F(), TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ global_performance_monitor()

performance_monitor & kcenon::monitoring::global_performance_monitor ( )

Global performance monitor instance.

Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/core/performance_monitor.h.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ global_retry_executor_registry()

retry_executor_registry & kcenon::monitoring::global_retry_executor_registry ( )
inline

Get global retry executor registry.

Definition at line 414 of file fault_tolerance_manager.h.

414 {
415 static retry_executor_registry instance;
416 return instance;
417}

Referenced by FaultToleranceTest::TearDown(), and TEST_F().

Here is the caller graph for this function:

◆ global_tracer()

distributed_tracer & kcenon::monitoring::global_tracer ( )

Global tracer instance.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ gpu_type_to_string()

std::string kcenon::monitoring::gpu_type_to_string ( gpu_type type)
inline

Convert gpu_type to string representation.

Definition at line 80 of file gpu_collector.h.

80 {
81 switch (type) {
82 case gpu_type::discrete:
83 return "discrete";
84 case gpu_type::integrated:
85 return "integrated";
86 case gpu_type::virtual_gpu:
87 return "virtual";
88 default:
89 return "unknown";
90 }
91}

References discrete, integrated, and virtual_gpu.

◆ gpu_vendor_to_string()

std::string kcenon::monitoring::gpu_vendor_to_string ( gpu_vendor vendor)
inline

Convert gpu_vendor to string representation.

Definition at line 49 of file gpu_collector.h.

49 {
50 switch (vendor) {
51 case gpu_vendor::nvidia:
52 return "nvidia";
53 case gpu_vendor::amd:
54 return "amd";
55 case gpu_vendor::intel:
56 return "intel";
57 case gpu_vendor::apple:
58 return "apple";
59 case gpu_vendor::other:
60 return "other";
61 default:
62 return "unknown";
63 }
64}

References amd, apple, intel, nvidia, and other.

◆ hash_metric_name()

uint32_t kcenon::monitoring::hash_metric_name ( const std::string & name)
inlinenoexcept

Hash function for metric names.

Definition at line 603 of file metric_types.h.

603 {
604 // Simple FNV-1a hash for fast metric name hashing
605 uint32_t hash = 2166136261U;
606 for (char c : name) {
607 hash ^= static_cast<uint32_t>(c);
608 hash *= 16777619U;
609 }
610 return hash;
611}

Referenced by create_metric_metadata(), and kcenon::monitoring::metric_storage::get_or_create_series().

Here is the caller graph for this function:

◆ make_lockfree_queue() [1/2]

template<typename T >
std::unique_ptr< lockfree_queue< T > > kcenon::monitoring::make_lockfree_queue ( )

Create a lock-free queue with default configuration.

Template Parameters
TThe element type
Returns
Unique pointer to the queue

Definition at line 318 of file lockfree_queue.h.

318 {
319 return std::make_unique<lockfree_queue<T>>();
320}

Referenced by TEST_F(), and TEST_F().

Here is the caller graph for this function:

◆ make_lockfree_queue() [2/2]

template<typename T >
std::unique_ptr< lockfree_queue< T > > kcenon::monitoring::make_lockfree_queue ( const lockfree_queue_config & config)

Create a lock-free queue with configuration.

Template Parameters
TThe element type
Parameters
configQueue configuration
Returns
Unique pointer to the queue

Definition at line 329 of file lockfree_queue.h.

329 {
330 return std::make_unique<lockfree_queue<T>>(config);
331}

◆ make_memory_pool() [1/2]

std::unique_ptr< memory_pool > kcenon::monitoring::make_memory_pool ( )
inline

Create a memory pool with default configuration.

Returns
Unique pointer to the pool

Definition at line 441 of file memory_pool.h.

441 {
442 return std::make_unique<memory_pool>();
443}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ make_memory_pool() [2/2]

std::unique_ptr< memory_pool > kcenon::monitoring::make_memory_pool ( const memory_pool_config & config)
inline

Create a memory pool with configuration.

Parameters
configPool configuration
Returns
Unique pointer to the pool

Definition at line 450 of file memory_pool.h.

450 {
451 return std::make_unique<memory_pool>(config);
452}

◆ make_monitor_adapter()

std::shared_ptr< common::interfaces::IMonitor > kcenon::monitoring::make_monitor_adapter ( std::shared_ptr< performance_monitor > monitor)
inline

Factory function to create performance_monitor_adapter.

Parameters
monitorThe performance_monitor to wrap
Returns
Shared pointer to the adapter implementing IMonitor

Definition at line 225 of file performance_monitor_adapter.h.

226 {
227 return std::make_shared<performance_monitor_adapter>(std::move(monitor));
228}

◆ make_ring_buffer() [1/2]

template<typename T >
std::unique_ptr< ring_buffer< T > > kcenon::monitoring::make_ring_buffer ( const ring_buffer_config & config)

Helper function to create a ring buffer with custom configuration.

Definition at line 489 of file ring_buffer.h.

489 {
490 return std::make_unique<ring_buffer<T>>(config);
491}

◆ make_ring_buffer() [2/2]

template<typename T >
std::unique_ptr< ring_buffer< T > > kcenon::monitoring::make_ring_buffer ( size_t capacity = 8192)

Helper function to create a ring buffer with default configuration.

Definition at line 479 of file ring_buffer.h.

479 {
480 ring_buffer_config config;
481 config.capacity = capacity;
482 return std::make_unique<ring_buffer<T>>(config);
483}
Configuration for ring buffer behavior.
Definition ring_buffer.h:36

References kcenon::monitoring::ring_buffer_config::capacity.

◆ make_simd_aggregator() [1/2]

std::unique_ptr< simd_aggregator > kcenon::monitoring::make_simd_aggregator ( )
inline

Create a SIMD aggregator with default configuration.

Returns
Unique pointer to the aggregator

Definition at line 673 of file simd_aggregator.h.

673 {
674 return std::make_unique<simd_aggregator>();
675}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ make_simd_aggregator() [2/2]

std::unique_ptr< simd_aggregator > kcenon::monitoring::make_simd_aggregator ( const simd_config & config)
inline

Create a SIMD aggregator with configuration.

Parameters
configAggregator configuration
Returns
Unique pointer to the aggregator

Definition at line 682 of file simd_aggregator.h.

682 {
683 return std::make_unique<simd_aggregator>(config);
684}

◆ metric_type_to_string()

const char * kcenon::monitoring::metric_type_to_string ( metric_type type)
constexprnoexcept

Convert metric type to string.

Definition at line 62 of file metric_types.h.

62 {
63 switch (type) {
64 case metric_type::counter: return "counter";
65 case metric_type::gauge: return "gauge";
66 case metric_type::histogram: return "histogram";
67 case metric_type::summary: return "summary";
68 case metric_type::timer: return "timer";
69 case metric_type::set: return "set";
70 default: return "unknown";
71 }
72}

References counter, gauge, histogram, set, summary, and timer.

Referenced by demonstrate_metric_metadata().

Here is the caller graph for this function:

◆ pearson_correlation()

double kcenon::monitoring::pearson_correlation ( const std::vector< double > & x,
const std::vector< double > & y )
inline

Calculate Pearson correlation coefficient.

Parameters
xFirst data series
ySecond data series
Returns
Correlation coefficient (-1 to 1), 0 if sizes differ

Definition at line 660 of file stream_aggregator.h.

661 {
662 if (x.size() != y.size() || x.size() < 2) {
663 return 0.0;
664 }
665
666 size_t n = x.size();
667 double sum_x = 0, sum_y = 0, sum_xy = 0;
668 double sum_x2 = 0, sum_y2 = 0;
669
670 for (size_t i = 0; i < n; ++i) {
671 sum_x += x[i];
672 sum_y += y[i];
673 sum_xy += x[i] * y[i];
674 sum_x2 += x[i] * x[i];
675 sum_y2 += y[i] * y[i];
676 }
677
678 double num = n * sum_xy - sum_x * sum_y;
679 double den = std::sqrt((n * sum_x2 - sum_x * sum_x) *
680 (n * sum_y2 - sum_y * sum_y));
681
682 if (den < 1e-10) {
683 return 0.0;
684 }
685
686 return num / den;
687}

Referenced by TEST_F().

Here is the caller graph for this function:

◆ power_source_type_to_string()

std::string kcenon::monitoring::power_source_type_to_string ( power_source_type type)
inline

Convert power_source_type to string representation.

Definition at line 55 of file power_collector.h.

55 {
56 switch (type) {
57 case power_source_type::battery:
58 return "battery";
59 case power_source_type::ac:
60 return "ac";
61 case power_source_type::usb:
62 return "usb";
63 case power_source_type::wireless:
64 return "wireless";
65 case power_source_type::cpu:
66 return "cpu";
67 case power_source_type::gpu:
68 return "gpu";
69 case power_source_type::memory:
70 return "memory";
71 case power_source_type::package:
72 return "package";
73 case power_source_type::platform:
74 return "platform";
75 case power_source_type::other:
76 return "other";
77 default:
78 return "unknown";
79 }
80}

References ac, battery, cpu, gpu, memory, other, package, platform, usb, and wireless.

◆ register_builtin_collectors()

bool kcenon::monitoring::register_builtin_collectors ( )
inline

Register all built-in collectors with the collector_registry.

This function registers the following collectors:

Plugin-based collectors (using collector_plugin interface) are registered with the collector_registry using factory-based lazy loading, enabling runtime enable/disable and plugin management.

All collectors are also registered with metric_factory for backward compatibility.

Call this function once at application startup before using the registry.

Returns
true if all collectors were registered successfully

Definition at line 70 of file builtin_collectors.h.

70 {
71 bool all_success = true;
72 auto& registry = collector_registry::instance();
73
74 // Register plugin-based collectors with collector_registry for runtime plugin management
75 // (Only collectors that implement collector_plugin interface)
76 registry.register_factory<battery_collector>("battery_collector");
77 registry.register_factory<uptime_collector>("uptime_collector");
78 registry.register_factory<interrupt_collector>("interrupt_collector");
79 registry.register_factory<network_metrics_collector>("network_metrics_collector");
80 registry.register_factory<platform_metrics_collector>("platform_metrics_collector");
81 registry.register_factory<process_metrics_collector>("process_metrics_collector");
82 registry.register_factory<security_collector>("security_collector");
83 registry.register_factory<smart_collector>("smart_collector");
84 registry.register_factory<vm_collector>("vm_collector");
85
86 // Also register all collectors with metric_factory for backward compatibility
87 all_success &= register_plugin_collector<battery_collector>("battery_collector");
88 all_success &= register_plugin_collector<uptime_collector>("uptime_collector");
89 all_success &= register_plugin_collector<interrupt_collector>("interrupt_collector");
90 all_success &= register_plugin_collector<network_metrics_collector>("network_metrics_collector");
91 all_success &= register_plugin_collector<platform_metrics_collector>("platform_metrics_collector");
92 all_success &= register_plugin_collector<process_metrics_collector>("process_metrics_collector");
93 all_success &= register_plugin_collector<security_collector>("security_collector");
94 all_success &= register_plugin_collector<smart_collector>("smart_collector");
95 all_success &= register_plugin_collector<vm_collector>("vm_collector");
96 all_success &= register_standalone_collector<system_resource_collector>("system_resource_collector");
97
98 return all_success;
99}
Battery status monitoring collector implementing collector_plugin interface.
Hardware and software interrupt statistics monitoring collector.
Unified network metrics collector implementing collector_plugin interface.
Unified platform-agnostic metrics collector.
Unified process-level metrics collector.
Security event monitoring collector.
System uptime monitoring collector implementing collector_plugin interface.
Virtualization metrics monitoring collector.

References kcenon::monitoring::collector_registry::instance(), register_plugin_collector(), and register_standalone_collector().

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_crtp_collector()

template<typename T >
bool kcenon::monitoring::register_crtp_collector ( const std::string & name)

Helper function to register a CRTP-based collector.

Template Parameters
TThe collector type
Parameters
nameThe collector name
Returns
true if registration successful

Definition at line 147 of file collector_adapters.h.

147 {
148 return metric_factory::instance().register_collector(name, []() {
149 return std::make_unique<crtp_collector_adapter<T>>();
150 });
151}

References kcenon::monitoring::metric_factory::instance(), and kcenon::monitoring::metric_factory::register_collector().

Here is the call graph for this function:

◆ register_plugin_collector()

template<typename T >
bool kcenon::monitoring::register_plugin_collector ( const std::string & name)

Helper function to register a plugin-based collector.

Template Parameters
TThe collector type
Parameters
nameThe collector name
Returns
true if registration successful

Definition at line 134 of file collector_adapters.h.

134 {
135 return metric_factory::instance().register_collector(name, []() {
136 return std::make_unique<plugin_collector_adapter<T>>();
137 });
138}

References kcenon::monitoring::metric_factory::instance(), and kcenon::monitoring::metric_factory::register_collector().

Referenced by register_builtin_collectors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_standalone_collector()

template<typename T >
bool kcenon::monitoring::register_standalone_collector ( const std::string & name)

Helper function to register a standalone collector.

Template Parameters
TThe collector type
Parameters
nameThe collector name
Returns
true if registration successful

Definition at line 160 of file collector_adapters.h.

160 {
161 return metric_factory::instance().register_collector(name, []() {
162 return std::make_unique<standalone_collector_adapter<T>>();
163 });
164}

References kcenon::monitoring::metric_factory::instance(), and kcenon::monitoring::metric_factory::register_collector().

Referenced by register_builtin_collectors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ security_event_type_to_string()

std::string kcenon::monitoring::security_event_type_to_string ( security_event_type type)
inline

Convert security_event_type to string representation.

Parameters
typeThe event type to convert
Returns
String name of the event type

Definition at line 59 of file security_collector.h.

59 {
60 switch (type) {
61 case security_event_type::login_success: return "LOGIN_SUCCESS";
62 case security_event_type::login_failure: return "LOGIN_FAILURE";
63 case security_event_type::logout: return "LOGOUT";
64 case security_event_type::sudo_usage: return "SUDO_USAGE";
65 case security_event_type::permission_change: return "PERMISSION_CHANGE";
66 case security_event_type::account_created: return "ACCOUNT_CREATED";
67 case security_event_type::account_deleted: return "ACCOUNT_DELETED";
68 case security_event_type::account_modified: return "ACCOUNT_MODIFIED";
69 case security_event_type::session_start: return "SESSION_START";
70 case security_event_type::session_end: return "SESSION_END";
71 default: return "UNKNOWN";
72 }
73}

References account_created, account_deleted, account_modified, login_failure, login_success, logout, permission_change, session_end, session_start, and sudo_usage.

◆ sensor_type_to_string()

std::string kcenon::monitoring::sensor_type_to_string ( sensor_type type)
inline

Convert sensor_type to string representation.

Definition at line 50 of file temperature_collector.h.

50 {
51 switch (type) {
52 case sensor_type::cpu:
53 return "cpu";
54 case sensor_type::gpu:
55 return "gpu";
56 case sensor_type::motherboard:
57 return "motherboard";
58 case sensor_type::storage:
59 return "storage";
60 case sensor_type::ambient:
61 return "ambient";
62 case sensor_type::other:
63 return "other";
64 default:
65 return "unknown";
66 }
67}

References ambient, cpu, gpu, motherboard, other, and storage.

◆ tcp_state_to_string()

std::string kcenon::monitoring::tcp_state_to_string ( tcp_state state)
inline

Convert tcp_state to string representation.

Parameters
stateThe TCP state to convert
Returns
String name of the state

Definition at line 64 of file network_metrics_collector.h.

64 {
65 switch (state) {
66 case tcp_state::ESTABLISHED: return "ESTABLISHED";
67 case tcp_state::SYN_SENT: return "SYN_SENT";
68 case tcp_state::SYN_RECV: return "SYN_RECV";
69 case tcp_state::FIN_WAIT1: return "FIN_WAIT1";
70 case tcp_state::FIN_WAIT2: return "FIN_WAIT2";
71 case tcp_state::TIME_WAIT: return "TIME_WAIT";
72 case tcp_state::CLOSE: return "CLOSE";
73 case tcp_state::CLOSE_WAIT: return "CLOSE_WAIT";
74 case tcp_state::LAST_ACK: return "LAST_ACK";
75 case tcp_state::LISTEN: return "LISTEN";
76 case tcp_state::CLOSING: return "CLOSING";
77 default: return "UNKNOWN";
78 }
79}

References CLOSE, CLOSE_WAIT, CLOSING, ESTABLISHED, FIN_WAIT1, FIN_WAIT2, LAST_ACK, LISTEN, SYN_RECV, SYN_SENT, and TIME_WAIT.

◆ to_string()

auto kcenon::monitoring::to_string ( plugin_load_error error) -> std::string

◆ vm_type_to_string()

std::string kcenon::monitoring::vm_type_to_string ( vm_type type)
inline

Convert vm_type to string representation.

Parameters
typeThe VM type to convert
Returns
String name of the VM type

Definition at line 51 of file vm_collector.h.

51 {
52 switch (type) {
53 case vm_type::none: return "NONE";
54 case vm_type::kvm: return "KVM";
55 case vm_type::hyperv: return "HYPER-V";
56 case vm_type::vmware: return "VMWARE";
57 case vm_type::virtualbox: return "VIRTUALBOX";
58 case vm_type::xen: return "XEN";
59 case vm_type::docker: return "DOCKER";
60 case vm_type::other: return "OTHER";
61 default: return "UNKNOWN";
62 }
63}

References docker, hyperv, kvm, none, other, virtualbox, vmware, and xen.