Documentation
¶
Index ¶
- type ActiveAlert
- type Alert
- type AlertConfig
- type AlertManager
- type AlertRule
- type CPUUsage
- type Dashboard
- type DashboardData
- type DataPoint
- type DiskUsage
- type EndpointStatus
- type GrafanaConfig
- type GrafanaMonitor
- func (m *GrafanaMonitor) CollectMetrics(ctx context.Context) ([]*Metric, error)
- func (m *GrafanaMonitor) Connect(ctx context.Context) error
- func (m *GrafanaMonitor) CreateAlert(alert AlertConfig) error
- func (m *GrafanaMonitor) DeleteAlert(name string) error
- func (m *GrafanaMonitor) Disconnect(ctx context.Context) error
- func (m *GrafanaMonitor) GetAlerts(ctx context.Context) ([]*Alert, error)
- func (m *GrafanaMonitor) GetCategory() string
- func (m *GrafanaMonitor) GetConfiguration() *MonitorConfig
- func (m *GrafanaMonitor) GetInterval() time.Duration
- func (m *GrafanaMonitor) GetMetrics(metric, duration string) (*MetricsData, error)
- func (m *GrafanaMonitor) GetName() string
- func (m *GrafanaMonitor) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
- func (m *GrafanaMonitor) GetStatus() string
- func (m *GrafanaMonitor) GetSystemStatus() (*SystemStatus, error)
- func (m *GrafanaMonitor) GetType() string
- func (m *GrafanaMonitor) IsConnected() bool
- func (m *GrafanaMonitor) IsHealthy() bool
- func (m *GrafanaMonitor) ListAlerts() ([]*Alert, error)
- func (m *GrafanaMonitor) ListServices() ([]*ServiceInfo, error)
- func (m *GrafanaMonitor) Start() error
- func (m *GrafanaMonitor) StartDashboard(host string, port int) error
- func (m *GrafanaMonitor) Stop() error
- func (m *GrafanaMonitor) UpdateConfiguration(config *MonitorConfig) error
- type HealthCheck
- type HealthCheckResult
- type HealthChecker
- type MemoryUsage
- type Metric
- type MetricPoint
- type MetricSummary
- type MetricsData
- type Monitor
- type MonitorConfig
- type MonitorImpl
- func (m *MonitorImpl) CollectMetrics(ctx context.Context) ([]*Metric, error)
- func (m *MonitorImpl) CreateAlert(alert AlertConfig) error
- func (m *MonitorImpl) DeleteAlert(name string) error
- func (m *MonitorImpl) GetCategory() string
- func (m *MonitorImpl) GetConfiguration() *MonitorConfig
- func (m *MonitorImpl) GetInterval() time.Duration
- func (m *MonitorImpl) GetMetrics(metric, duration string) (*MetricsData, error)
- func (m *MonitorImpl) GetName() string
- func (m *MonitorImpl) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
- func (m *MonitorImpl) GetStatus() string
- func (m *MonitorImpl) GetSystemStatus() (*SystemStatus, error)
- func (m *MonitorImpl) IsHealthy() bool
- func (m *MonitorImpl) ListAlerts() ([]*Alert, error)
- func (m *MonitorImpl) ListServices() ([]*ServiceInfo, error)
- func (m *MonitorImpl) Start() error
- func (m *MonitorImpl) StartDashboard(host string, port int) error
- func (m *MonitorImpl) Stop() error
- func (m *MonitorImpl) UpdateConfiguration(config *MonitorConfig) error
- type MonitoringManager
- func (m *MonitoringManager) AddMonitor(monitor Monitor) error
- func (m *MonitoringManager) GetMonitor(name string) (Monitor, error)
- func (m *MonitoringManager) ListMonitors() []Monitor
- func (m *MonitoringManager) StartMonitoring(name string) error
- func (m *MonitoringManager) StopMonitoring(name string) error
- type NetworkMetrics
- type NetworkUsage
- type Position
- type PrometheusConfig
- type PrometheusMonitor
- func (m *PrometheusMonitor) CollectMetrics(ctx context.Context) ([]*Metric, error)
- func (m *PrometheusMonitor) CreateAlert(alert AlertConfig) error
- func (m *PrometheusMonitor) DeleteAlert(name string) error
- func (m *PrometheusMonitor) GetCategory() string
- func (m *PrometheusMonitor) GetConfiguration() *MonitorConfig
- func (m *PrometheusMonitor) GetInterval() time.Duration
- func (m *PrometheusMonitor) GetMetrics(metric, duration string) (*MetricsData, error)
- func (m *PrometheusMonitor) GetName() string
- func (m *PrometheusMonitor) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
- func (m *PrometheusMonitor) GetStatus() string
- func (m *PrometheusMonitor) GetSystemStatus() (*SystemStatus, error)
- func (m *PrometheusMonitor) IsHealthy() bool
- func (m *PrometheusMonitor) ListAlerts() ([]*Alert, error)
- func (m *PrometheusMonitor) ListServices() ([]*ServiceInfo, error)
- func (m *PrometheusMonitor) Start() error
- func (m *PrometheusMonitor) StartDashboard(host string, port int) error
- func (m *PrometheusMonitor) Stop() error
- func (m *PrometheusMonitor) UpdateConfiguration(config *MonitorConfig) error
- type ResourceUsage
- type ServiceInfo
- type ServiceStatus
- type Size
- type SystemStatus
- type Widget
- type WidgetData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveAlert ¶
type ActiveAlert struct {
Alert *AlertConfig `json:"alert" yaml:"alert"`
Triggered time.Time `json:"triggered" yaml:"triggered"`
Status string `json:"status" yaml:"status"`
Message string `json:"message" yaml:"message"`
Acknowledged bool `json:"acknowledged" yaml:"acknowledged"`
}
ActiveAlert represents an active alert
type AlertConfig ¶
type AlertConfig struct {
Name string `json:"name" yaml:"name"`
Condition string `json:"condition" yaml:"condition"`
Action string `json:"action" yaml:"action"`
Severity string `json:"severity" yaml:"severity"`
Enabled bool `json:"enabled" yaml:"enabled"`
CreatedAt time.Time `json:"created_at" yaml:"created_at"`
UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"`
}
AlertConfig represents a monitoring alert configuration
type AlertManager ¶
type AlertManager struct {
// contains filtered or unexported fields
}
AlertManager manages alerts
func NewAlertManager ¶
func NewAlertManager() *AlertManager
NewAlertManager creates a new alert manager
func (*AlertManager) AddRule ¶
func (m *AlertManager) AddRule(rule *AlertRule) error
AddRule adds an alert rule
func (*AlertManager) EvaluateRules ¶
EvaluateRules evaluates all alert rules against the given metrics
type CPUUsage ¶
type CPUUsage struct {
Usage float64 `json:"usage" yaml:"usage"`
LoadAverage float64 `json:"load_average" yaml:"load_average"`
Cores int `json:"cores" yaml:"cores"`
}
CPUUsage represents CPU usage metrics
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard manages monitoring dashboard
func (*Dashboard) GenerateData ¶
func (d *Dashboard) GenerateData(ctx context.Context) (*DashboardData, error)
GenerateData generates dashboard data
func (*Dashboard) ListWidgets ¶
ListWidgets returns a list of all widgets
type DashboardData ¶
type DashboardData struct {
Widgets []*WidgetData `json:"widgets"`
}
type DataPoint ¶
type DataPoint struct {
Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
Value float64 `json:"value" yaml:"value"`
Labels map[string]string `json:"labels" yaml:"labels"`
}
DataPoint represents a single data point for Prometheus integration
type DiskUsage ¶
type DiskUsage struct {
Used int64 `json:"used" yaml:"used"`
Available int64 `json:"available" yaml:"available"`
Total int64 `json:"total" yaml:"total"`
Usage float64 `json:"usage" yaml:"usage"`
}
DiskUsage represents disk usage metrics
type EndpointStatus ¶
type EndpointStatus struct {
URL string `json:"url" yaml:"url"`
Status string `json:"status" yaml:"status"`
ResponseTime time.Duration `json:"response_time" yaml:"response_time"`
StatusCode int `json:"status_code" yaml:"status_code"`
LastCheck time.Time `json:"last_check" yaml:"last_check"`
}
EndpointStatus represents the status of a service endpoint
type GrafanaConfig ¶
type GrafanaConfig struct {
URL string `json:"url"`
APIKey string `json:"api_key"`
Timeout int `json:"timeout"`
}
GrafanaConfig contains Grafana-specific settings
type GrafanaMonitor ¶
type GrafanaMonitor struct {
// contains filtered or unexported fields
}
GrafanaMonitor implements monitoring with Grafana
func (*GrafanaMonitor) CollectMetrics ¶
func (m *GrafanaMonitor) CollectMetrics(ctx context.Context) ([]*Metric, error)
CollectMetrics collects metrics from Grafana
func (*GrafanaMonitor) Connect ¶
func (m *GrafanaMonitor) Connect(ctx context.Context) error
Connect establishes connection to Grafana
func (*GrafanaMonitor) CreateAlert ¶
func (m *GrafanaMonitor) CreateAlert(alert AlertConfig) error
CreateAlert creates an alert rule in Grafana
func (*GrafanaMonitor) DeleteAlert ¶
func (m *GrafanaMonitor) DeleteAlert(name string) error
DeleteAlert deletes an alert
func (*GrafanaMonitor) Disconnect ¶
func (m *GrafanaMonitor) Disconnect(ctx context.Context) error
Disconnect closes the connection
func (*GrafanaMonitor) GetAlerts ¶
func (m *GrafanaMonitor) GetAlerts(ctx context.Context) ([]*Alert, error)
GetAlerts gets active alerts from Grafana
func (*GrafanaMonitor) GetCategory ¶
func (m *GrafanaMonitor) GetCategory() string
GetCategory returns the monitor category
func (*GrafanaMonitor) GetConfiguration ¶
func (m *GrafanaMonitor) GetConfiguration() *MonitorConfig
GetConfiguration returns the monitor configuration
func (*GrafanaMonitor) GetInterval ¶
func (m *GrafanaMonitor) GetInterval() time.Duration
GetInterval returns the monitor interval
func (*GrafanaMonitor) GetMetrics ¶
func (m *GrafanaMonitor) GetMetrics(metric, duration string) (*MetricsData, error)
GetMetrics gets metrics from Grafana
func (*GrafanaMonitor) GetName ¶
func (m *GrafanaMonitor) GetName() string
GetName returns the monitor name
func (*GrafanaMonitor) GetServiceStatus ¶
func (m *GrafanaMonitor) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
GetServiceStatus returns the service status
func (*GrafanaMonitor) GetStatus ¶
func (m *GrafanaMonitor) GetStatus() string
GetStatus returns the monitor status
func (*GrafanaMonitor) GetSystemStatus ¶
func (m *GrafanaMonitor) GetSystemStatus() (*SystemStatus, error)
GetSystemStatus returns the system status
func (*GrafanaMonitor) GetType ¶
func (m *GrafanaMonitor) GetType() string
GetType returns the monitor type
func (*GrafanaMonitor) IsConnected ¶
func (m *GrafanaMonitor) IsConnected() bool
IsConnected returns connection status
func (*GrafanaMonitor) IsHealthy ¶
func (m *GrafanaMonitor) IsHealthy() bool
IsHealthy returns the health status
func (*GrafanaMonitor) ListAlerts ¶
func (m *GrafanaMonitor) ListAlerts() ([]*Alert, error)
ListAlerts returns the list of alerts
func (*GrafanaMonitor) ListServices ¶
func (m *GrafanaMonitor) ListServices() ([]*ServiceInfo, error)
ListServices returns the list of services
func (*GrafanaMonitor) StartDashboard ¶
func (m *GrafanaMonitor) StartDashboard(host string, port int) error
StartDashboard starts a dashboard
func (*GrafanaMonitor) UpdateConfiguration ¶
func (m *GrafanaMonitor) UpdateConfiguration(config *MonitorConfig) error
UpdateConfiguration updates the monitor configuration
type HealthCheck ¶
type HealthCheckResult ¶
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker manages health checks
func NewHealthChecker ¶
func NewHealthChecker() *HealthChecker
NewHealthChecker creates a new health checker
func (*HealthChecker) AddCheck ¶
func (h *HealthChecker) AddCheck(check *HealthCheck) error
AddCheck adds a health check
func (*HealthChecker) GetHistory ¶
func (h *HealthChecker) GetHistory(name string, limit int) ([]*HealthCheckResult, error)
GetHistory returns health check history
func (*HealthChecker) RunCheck ¶
func (h *HealthChecker) RunCheck(ctx context.Context, name string) (*HealthCheckResult, error)
RunCheck runs a specific health check
type MemoryUsage ¶
type MemoryUsage struct {
Used int64 `json:"used" yaml:"used"`
Available int64 `json:"available" yaml:"available"`
Total int64 `json:"total" yaml:"total"`
Usage float64 `json:"usage" yaml:"usage"`
}
MemoryUsage represents memory usage metrics
type Metric ¶
type Metric struct {
Name string `json:"name"`
Value interface{} `json:"value"`
Unit string `json:"unit"`
Timestamp time.Time `json:"timestamp"`
Labels map[string]string `json:"labels"`
}
Additional type definitions for the test interfaces
type MetricPoint ¶
type MetricPoint struct {
Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
Value float64 `json:"value" yaml:"value"`
Labels map[string]string `json:"labels" yaml:"labels"`
}
MetricPoint represents a single metric data point
type MetricSummary ¶
type MetricSummary struct {
Average float64 `json:"average" yaml:"average"`
Min float64 `json:"min" yaml:"min"`
Max float64 `json:"max" yaml:"max"`
Count int64 `json:"count" yaml:"count"`
}
MetricSummary represents a summary of metrics
type MetricsData ¶
type MetricsData struct {
Metric string `json:"metric" yaml:"metric"`
TimeRange string `json:"time_range" yaml:"time_range"`
Data []MetricPoint `json:"data" yaml:"data"`
Points []*DataPoint `json:"points" yaml:"points"`
Summary *MetricSummary `json:"summary" yaml:"summary"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
StartTime time.Time `json:"start_time" yaml:"start_time"`
EndTime time.Time `json:"end_time" yaml:"end_time"`
}
MetricsData represents metrics data
type Monitor ¶
type Monitor interface {
GetName() string
GetCategory() string
GetInterval() time.Duration
GetStatus() string
Start() error
Stop() error
CollectMetrics(ctx context.Context) ([]*Metric, error)
GetConfiguration() *MonitorConfig
UpdateConfiguration(config *MonitorConfig) error
IsHealthy() bool
GetSystemStatus() (*SystemStatus, error)
GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
ListServices() ([]*ServiceInfo, error)
GetMetrics(metric, duration string) (*MetricsData, error)
CreateAlert(alert AlertConfig) error
ListAlerts() ([]*Alert, error)
DeleteAlert(name string) error
StartDashboard(host string, port int) error
}
Monitor interface defines monitoring operations
func NewGrafanaMonitor ¶
func NewGrafanaMonitor(cfg *MonitorConfig) (Monitor, error)
NewGrafanaMonitor creates a new Grafana monitor
type MonitorConfig ¶
type MonitorConfig struct {
Name string `json:"name"`
Category string `json:"category"`
Interval time.Duration `json:"interval"`
Enabled bool `json:"enabled"`
Endpoint string `json:"endpoint"`
Username string `json:"username"`
Password string `json:"password"`
Timeout int `json:"timeout"`
// Prometheus configuration
Prometheus PrometheusConfig `json:"prometheus"`
// Grafana configuration
Grafana GrafanaConfig `json:"grafana"`
}
type MonitorImpl ¶
type MonitorImpl struct {
// contains filtered or unexported fields
}
MonitorImpl implements the Monitor interface
func (*MonitorImpl) CollectMetrics ¶
func (m *MonitorImpl) CollectMetrics(ctx context.Context) ([]*Metric, error)
CollectMetrics collects metrics
func (*MonitorImpl) CreateAlert ¶
func (m *MonitorImpl) CreateAlert(alert AlertConfig) error
CreateAlert creates a new alert
func (*MonitorImpl) DeleteAlert ¶
func (m *MonitorImpl) DeleteAlert(name string) error
DeleteAlert deletes an alert by name
func (*MonitorImpl) GetCategory ¶
func (m *MonitorImpl) GetCategory() string
GetCategory returns the monitor category
func (*MonitorImpl) GetConfiguration ¶
func (m *MonitorImpl) GetConfiguration() *MonitorConfig
GetConfiguration returns the monitor configuration
func (*MonitorImpl) GetInterval ¶
func (m *MonitorImpl) GetInterval() time.Duration
GetInterval returns the monitor interval
func (*MonitorImpl) GetMetrics ¶
func (m *MonitorImpl) GetMetrics(metric, duration string) (*MetricsData, error)
GetMetrics returns metrics data
func (*MonitorImpl) GetName ¶
func (m *MonitorImpl) GetName() string
GetName returns the monitor name
func (*MonitorImpl) GetServiceStatus ¶
func (m *MonitorImpl) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
GetServiceStatus returns the status of a specific service
func (*MonitorImpl) GetStatus ¶
func (m *MonitorImpl) GetStatus() string
GetStatus returns the monitor status
func (*MonitorImpl) GetSystemStatus ¶
func (m *MonitorImpl) GetSystemStatus() (*SystemStatus, error)
GetSystemStatus returns overall system status
func (*MonitorImpl) IsHealthy ¶
func (m *MonitorImpl) IsHealthy() bool
IsHealthy returns whether the monitor is healthy
func (*MonitorImpl) ListAlerts ¶
func (m *MonitorImpl) ListAlerts() ([]*Alert, error)
ListAlerts returns all configured alerts
func (*MonitorImpl) ListServices ¶
func (m *MonitorImpl) ListServices() ([]*ServiceInfo, error)
ListServices returns a list of all services
func (*MonitorImpl) StartDashboard ¶
func (m *MonitorImpl) StartDashboard(host string, port int) error
StartDashboard starts the monitoring dashboard web server
func (*MonitorImpl) UpdateConfiguration ¶
func (m *MonitorImpl) UpdateConfiguration(config *MonitorConfig) error
UpdateConfiguration updates the monitor configuration
type MonitoringManager ¶
type MonitoringManager struct {
// contains filtered or unexported fields
}
MonitoringManager manages multiple monitors
func NewMonitoringManager ¶
func NewMonitoringManager() *MonitoringManager
NewMonitoringManager creates a new monitoring manager
func NewMonitoringService ¶
func NewMonitoringService(cfg *config.Config) *MonitoringManager
NewMonitoringService creates a new monitoring service with real integrations
func (*MonitoringManager) AddMonitor ¶
func (m *MonitoringManager) AddMonitor(monitor Monitor) error
AddMonitor adds a monitor to the manager
func (*MonitoringManager) GetMonitor ¶
func (m *MonitoringManager) GetMonitor(name string) (Monitor, error)
GetMonitor retrieves a monitor by name
func (*MonitoringManager) ListMonitors ¶
func (m *MonitoringManager) ListMonitors() []Monitor
ListMonitors returns a list of all monitors
func (*MonitoringManager) StartMonitoring ¶
func (m *MonitoringManager) StartMonitoring(name string) error
StartMonitoring starts monitoring for a specific monitor
func (*MonitoringManager) StopMonitoring ¶
func (m *MonitoringManager) StopMonitoring(name string) error
StopMonitoring stops monitoring for a specific monitor
type NetworkMetrics ¶
type NetworkMetrics struct {
Connections int64 `json:"connections" yaml:"connections"`
Latency float64 `json:"latency" yaml:"latency"`
Throughput float64 `json:"throughput" yaml:"throughput"`
}
NetworkMetrics represents network metrics for a service
type NetworkUsage ¶
type NetworkUsage struct {
BytesIn int64 `json:"bytes_in" yaml:"bytes_in"`
BytesOut int64 `json:"bytes_out" yaml:"bytes_out"`
PacketsIn int64 `json:"packets_in" yaml:"packets_in"`
PacketsOut int64 `json:"packets_out" yaml:"packets_out"`
}
NetworkUsage represents network usage metrics
type PrometheusConfig ¶
type PrometheusConfig struct {
URL string `json:"url"`
Username string `json:"username"`
Password string `json:"password"`
Timeout int `json:"timeout"`
MetricsPort int `json:"metrics_port"`
}
PrometheusConfig contains Prometheus-specific settings
type PrometheusMonitor ¶
type PrometheusMonitor struct {
// contains filtered or unexported fields
}
PrometheusMonitor implements Monitor interface for Prometheus
func NewPrometheusMonitor ¶
func NewPrometheusMonitor(endpoint string, config *MonitorConfig) (*PrometheusMonitor, error)
NewPrometheusMonitor creates a new Prometheus monitor
func (*PrometheusMonitor) CollectMetrics ¶
func (m *PrometheusMonitor) CollectMetrics(ctx context.Context) ([]*Metric, error)
CollectMetrics collects metrics from Prometheus
func (*PrometheusMonitor) CreateAlert ¶
func (m *PrometheusMonitor) CreateAlert(alert AlertConfig) error
CreateAlert creates a new alert
func (*PrometheusMonitor) DeleteAlert ¶
func (m *PrometheusMonitor) DeleteAlert(name string) error
DeleteAlert deletes an alert
func (*PrometheusMonitor) GetCategory ¶
func (m *PrometheusMonitor) GetCategory() string
GetCategory returns the monitor category
func (*PrometheusMonitor) GetConfiguration ¶
func (m *PrometheusMonitor) GetConfiguration() *MonitorConfig
GetConfiguration returns the monitor configuration
func (*PrometheusMonitor) GetInterval ¶
func (m *PrometheusMonitor) GetInterval() time.Duration
GetInterval returns the monitoring interval
func (*PrometheusMonitor) GetMetrics ¶
func (m *PrometheusMonitor) GetMetrics(metric, duration string) (*MetricsData, error)
GetMetrics returns historical metrics
func (*PrometheusMonitor) GetName ¶
func (m *PrometheusMonitor) GetName() string
GetName returns the monitor name
func (*PrometheusMonitor) GetServiceStatus ¶
func (m *PrometheusMonitor) GetServiceStatus(serviceName string, detailed bool) (*ServiceStatus, error)
GetServiceStatus returns service status
func (*PrometheusMonitor) GetStatus ¶
func (m *PrometheusMonitor) GetStatus() string
GetStatus returns the monitor status
func (*PrometheusMonitor) GetSystemStatus ¶
func (m *PrometheusMonitor) GetSystemStatus() (*SystemStatus, error)
GetSystemStatus returns overall system status
func (*PrometheusMonitor) IsHealthy ¶
func (m *PrometheusMonitor) IsHealthy() bool
IsHealthy returns the health status
func (*PrometheusMonitor) ListAlerts ¶
func (m *PrometheusMonitor) ListAlerts() ([]*Alert, error)
ListAlerts lists active alerts
func (*PrometheusMonitor) ListServices ¶
func (m *PrometheusMonitor) ListServices() ([]*ServiceInfo, error)
ListServices lists monitored services
func (*PrometheusMonitor) Start ¶
func (m *PrometheusMonitor) Start() error
Start starts the monitor
func (*PrometheusMonitor) StartDashboard ¶
func (m *PrometheusMonitor) StartDashboard(host string, port int) error
StartDashboard starts a monitoring dashboard
func (*PrometheusMonitor) UpdateConfiguration ¶
func (m *PrometheusMonitor) UpdateConfiguration(config *MonitorConfig) error
UpdateConfiguration updates the monitor configuration
type ResourceUsage ¶
type ResourceUsage struct {
CPU *CPUUsage `json:"cpu" yaml:"cpu"`
Memory *MemoryUsage `json:"memory" yaml:"memory"`
Disk *DiskUsage `json:"disk" yaml:"disk"`
Network *NetworkUsage `json:"network" yaml:"network"`
}
ResourceUsage represents system resource usage
type ServiceInfo ¶
type ServiceInfo struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Status string `json:"status" yaml:"status"`
Description string `json:"description" yaml:"description"`
}
ServiceInfo represents basic service information
type ServiceStatus ¶
type ServiceStatus struct {
Name string `json:"name" yaml:"name"`
Status string `json:"status" yaml:"status"`
Health string `json:"health" yaml:"health"`
Uptime time.Duration `json:"uptime" yaml:"uptime"`
CPU float64 `json:"cpu" yaml:"cpu"`
Memory float64 `json:"memory" yaml:"memory"`
Disk float64 `json:"disk" yaml:"disk"`
Network *NetworkMetrics `json:"network" yaml:"network"`
Endpoints []*EndpointStatus `json:"endpoints" yaml:"endpoints"`
LastCheck time.Time `json:"last_check" yaml:"last_check"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
}
ServiceStatus represents the status of a specific service
type SystemStatus ¶
type SystemStatus struct {
Overall string `json:"overall" yaml:"overall"`
Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
Services []*ServiceStatus `json:"services" yaml:"services"`
Resources *ResourceUsage `json:"resources" yaml:"resources"`
Alerts []*ActiveAlert `json:"alerts" yaml:"alerts"`
Uptime time.Duration `json:"uptime" yaml:"uptime"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
}
SystemStatus represents overall system status