Versions in this module Expand all Collapse all v0 v0.0.1 Jan 1, 2026 Changes in this version + const AttachMetricRedisBusinessKey + const CollectionName + const CollectionTaskCollectionName + const DefaultEtcdContainerName + const DefaultTelegrafResourceName + const GlobalStrategyID + const GroupStrategyCollection + const PubSubTopic + const Version + var ErrNacosConfigNotFound = errors.New("nacos config not found") + var MinioResouceName = "" + var ProviderSet = wire.NewSet(ProvideKeyManager, ProvideAgentManager, ProvideMinioManager, ...) + var TelegrafContainerName = "" + func ProvideDBClient(config *Config) (*mongo.Client, error) + func ProvideEtcdClient(config *Config) (*clientv3.Client, error) + func ProvidePluginMappingConfigLoader(logger *zap.Logger) (*config.PluginMappingConfigLoader, error) + func WithPort(port int) controllerOptionFunc + type AgentConfigStruct struct + CollectionJitter string + FlushInterval string + FlushJitter string + Hostname string + Interval string + MetricBatchSize int + MetricBufferLimit int + OmitHostname bool + Precision string + RoundInterval bool + type AgentDiscovery struct + func NewAgentDiscovery(etcdClient *clientv3.Client, mongoClient *mongo.Client, watchPrefix string, ...) *AgentDiscovery + func (ad *AgentDiscovery) PeriodicSync(ctx context.Context) + func (ad *AgentDiscovery) Start() error + func (ad *AgentDiscovery) Stop() + func (ad *AgentDiscovery) SyncAgentsFromEtcd(ctx context.Context) error + func (ad *AgentDiscovery) WatchAgents(ctx context.Context) + type AgentEventNotifier struct + func NewAgentEventNotifier(webhookURLs []string, secret, controllerID, functionArea string) *AgentEventNotifier + func NewAgentEventNotifierWithConfig(webhookURLs []string, secret, controllerID, functionArea string, ...) *AgentEventNotifier + func (n *AgentEventNotifier) NotifyAgentRegistered(agent *models.Agent) error + func (n *AgentEventNotifier) NotifyAgentUnregistered(agentCode string) error + func (n *AgentEventNotifier) NotifyStatusChanged(agentCode, oldStatus, newStatus string) error + func (n *AgentEventNotifier) Start() + func (n *AgentEventNotifier) Stop() + type AgentManager struct + func ProvideAgentManager(registry *RegistryManager, rm *ResourceManager, cm *ConfigManager, ...) (*AgentManager, error) + func (am *AgentManager) ApplyPackageConfigs(ctx context.Context, agentCode, packageName string, configs []*pb.ConfigItem) error + func (am *AgentManager) ExecuteCommandViaProxy(ctx context.Context, agentCode, command string, ...) (string, error) + func (am *AgentManager) GetAgent(ctx context.Context, agentCode string) (*models.Agent, error) + func (am *AgentManager) GetAgentDetail(ctx context.Context, agentID string) (*models.Agent, error) + func (am *AgentManager) GetAgentHost(ctx context.Context, agentCode string) (string, error) + func (am *AgentManager) GetAgentPackages(ctx context.Context, agentID string) ([]*pb.PackItem, error) + func (am *AgentManager) GetBatchOperator() *BatchOperator + func (am *AgentManager) GetFileOperation() *FileOperation + func (am *AgentManager) GetHealthMonitor() *HealthMonitor + func (am *AgentManager) GetMetricsQuery() *MetricsQuery + func (am *AgentManager) GetPackageConfigs(ctx context.Context, agentCode, packageName string) ([]*pb.ConfigItem, error) + func (am *AgentManager) GetPackageLogs(ctx context.Context, agentCode, packageName string, count int32) ([]string, error) + func (am *AgentManager) ListAgents(ctx context.Context, filter map[string]string, page, pageSize int) ([]models.Agent, int, error) + func (am *AgentManager) PackageList(ctx context.Context, agentCode string) ([]*pb.PackItem, error) + func (am *AgentManager) RestartAgent(ctx context.Context, agentCode string) error + func (am *AgentManager) Start() error + func (am *AgentManager) StartPackage(ctx context.Context, agentCode, packageName string) error + func (am *AgentManager) StartPackageWatcher(ctx context.Context) + func (am *AgentManager) Stop() error + func (am *AgentManager) StopPackage(ctx context.Context, agentCode, packageName string) error + func (am *AgentManager) UninstallAgent(ctx context.Context, agentCode string) error + type AgentStatusEvent struct + Address string + AgentCode string + ControllerID string + EventType string + FunctionArea string + HealthStatus string + LastHeartbeat string + NewStatus string + OldStatus string + ServiceCount int + Signature string + Timestamp time.Time + Version string + type AppResolver struct + ConfigManager *ConfigManager + func (ar *AppResolver) Resolve(ctx context.Context, agentID, appID string) (map[string]string, error) + type ApplicationTargetConverter struct + func NewApplicationTargetConverter(logger *zap.Logger) *ApplicationTargetConverter + func (c *ApplicationTargetConverter) Convert(targets []*CollectionTargetDTO, strategy *UnifiedCollectionStrategyDTO) (map[string]interface{}, error) + func (c *ApplicationTargetConverter) Supports(collectionType string) bool + type BaseConfig struct + DefaultPort int + Deployment Deployment + FirewallTemplatePath string + GrpcProxy int + HomePath string + JumpServerIdleTimeout int + LokiLabelKey string + LokiListenPath string + PipelineTemplates string + PreferredNetworks []string + PrometheusLabelKey string + PrometheusListenPath string + Resources map[models.ResourceType]string + SshProxy int + Templates []string + UpstreamLokiUrl string + UpstreamPrometheusUrl string + type BatchOperator struct + func NewBatchOperator(agentManager *AgentManager) *BatchOperator + func (bo *BatchOperator) BatchRestartPackages(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error) + func (bo *BatchOperator) BatchStartPackages(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error) + func (bo *BatchOperator) BatchStopPackages(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error) + func (bo *BatchOperator) BatchUpdateConfigs(ctx context.Context, req *models.BatchConfigRequest) (*models.BatchOperationResult, error) + type CollectionTargetConverter struct + func NewCollectionTargetConverter(logger *zap.Logger, configLoader *config.PluginMappingConfigLoader) *CollectionTargetConverter + func (c *CollectionTargetConverter) ConvertTargetsToCollectionTasks(ctx context.Context, collectionType string, ...) ([]models.CollectionTask, error) + type CollectionTargetDTO struct + Address string + CollectionType string + Config map[string]interface{} + ID string + Port int + TargetGroupID string + type CollectionTaskService struct + func NewCollectionTaskService(mongoClient *mongo.Client, logger *zap.Logger) *CollectionTaskService + func (s *CollectionTaskService) DistributeTasks(ctx context.Context, req *pb.DistributeTasksReq) (*pb.DistributeTasksResp, error) + func (s *CollectionTaskService) GetTaskStatus(ctx context.Context, req *pb.GetTaskStatusReq) (*pb.GetTaskStatusResp, error) + func (s *CollectionTaskService) GetTasks(ctx context.Context, req *pb.GetTasksReq) (*pb.GetTasksResp, error) + func (s *CollectionTaskService) RegisterGRPCService(grpcServer *grpc.Server) + func (s *CollectionTaskService) UpdateTaskStatus(ctx context.Context, req *pb.UpdateTaskStatusReq) (*pb.UpdateTaskStatusResp, error) + type CollectionTypeMapper interface + GetDefaultConfig func(collectionType string) map[string]interface{} + GetTaskType func(collectionType string) string + func NewConfigBasedCollectionTypeMapper(logger *zap.Logger, configLoader *config.PluginMappingConfigLoader) CollectionTypeMapper + type CollectionTypeMapping struct + DefaultConfig map[string]interface{} + TaskType string + type Config struct + BaseConfig BaseConfig + Database DatabaseConfig + EtcdConfig map[string]interface{} + FunctionArea string + GitConfig GitConfig + MetricsManager MetricsManagerConfig + Minio MinioConfig + Nacos NacosConfig + Redis RedisConfig + Server ServerConfig + SkipInit bool + SyslogManager SyslogManagerConfig + Telegraf TelegrafConfig + UniOpsConfig UniOpsConfig + Upstream Upstream + UseDockerEtcd bool + func LoadConfig(configPath string) (*Config, error) + func ProvideConfig(configPath string) (*Config, error) + type ConfigBasedCollectionTypeMapper struct + func (m *ConfigBasedCollectionTypeMapper) GetDefaultConfig(collectionType string) map[string]interface{} + func (m *ConfigBasedCollectionTypeMapper) GetTaskType(collectionType string) string + type ConfigManager struct + Config *Config + EtcdClient *clientv3.Client + KeyManager *KeyManager + NacosManager *NacosManager + func ProvideConfigManager(km *KeyManager, etcdClient *clientv3.Client, config *Config, nm *NacosManager) (*ConfigManager, error) + func (cm *ConfigManager) BatchGetConfigs(resourceType models.ResourceType, resourceIDs []string) (map[string]map[string]interface{}, error) + func (cm *ConfigManager) BatchUpdateConfigs(updates map[models.ResourceType]map[string]map[string]interface{}) error + func (cm *ConfigManager) CompareConfigVersions(resourceType models.ResourceType, resourceID string, version1, version2 string) (map[string]interface{}, error) + func (cm *ConfigManager) ContainerName(resourceType models.ResourceType) (string, error) + func (cm *ConfigManager) DeleteConfig(resourceType models.ResourceType, containerName string) error + func (cm *ConfigManager) FilterConfigs(resourceType models.ResourceType, filter func(map[string]interface{}) bool) ([]string, error) + func (cm *ConfigManager) GetAppVariables(appID string) (map[string]string, error) + func (cm *ConfigManager) GetConfig(resourceType models.ResourceType, containerName string) (map[string]interface{}, error) + func (cm *ConfigManager) GetConfigStats(resourceType models.ResourceType) (map[string]int, error) + func (cm *ConfigManager) GetConfigWithMeta(resourceType models.ResourceType, containerName string) (config map[string]interface{}, meta map[string]interface{}, err error) + func (cm *ConfigManager) GetContainerNameByResourceType(resourceType models.ResourceType) (string, error) + func (cm *ConfigManager) GetGlobalVariables() (map[string]string, error) + func (cm *ConfigManager) GetJson(resourceType models.ResourceType) (string, error) + func (cm *ConfigManager) ListApps() ([]string, error) + func (cm *ConfigManager) ListConfigKeys(resourceType models.ResourceType) ([]string, error) + func (cm *ConfigManager) ListConfigsWithDetails(resourceType models.ResourceType) (map[string]map[string]interface{}, error) + func (cm *ConfigManager) ListResourceIDs(resourceType models.ResourceType) ([]string, error) + func (cm *ConfigManager) SearchConfigs(resourceType models.ResourceType, searchTerm string) ([]string, error) + func (cm *ConfigManager) SetAppVariables(appID string, variables map[string]string) error + func (cm *ConfigManager) SetGlobalVariables(variables map[string]string) error + func (cm *ConfigManager) Start() error + func (cm *ConfigManager) Stop() error + func (cm *ConfigManager) UpdateConfig(resourceType models.ResourceType, containerName string, ...) error + func (cm *ConfigManager) UpdateConfigWithMeta(resourceType models.ResourceType, containerName string, ...) error + type ConfigProvider interface + GetConfig func(serviceName string) (map[string]interface{}, error) + SetConfig func(serviceName string, config map[string]interface{}) error + type ConfigTemplate struct + func NewConfigTemplate(templateString string) (*ConfigTemplate, error) + func (ct *ConfigTemplate) Generate(data TemplateData) (string, error) + type Controller struct + AgentManager *AgentManager + ConfigManager *ConfigManager + DeploymentManager *DeploymentManager + GrpcProxyManager *GrpcProxyManager + JumperServerManager *JumperServerManager + KeyManager *KeyManager + LokiForwarder *LokiForwarder + MinioManager *MinioManager + MonitoringService *MonitoringService + PluginTemplateService *PluginTemplateService + PrometheusForwarder *PrometheusForwarder + RedisManager *RedisManager + RegistryManager *RegistryManager + ResourceManager *ResourceManager + TelegrafManager *TelegrafManager + func InitializeControllerComponents(configPath string) (*Controller, error) + func ProvideController(cm *ConfigManager, rm *ResourceManager, regm *RegistryManager, km *KeyManager, ...) (*Controller, error) + func (c *Controller) CreateDeployment(req models.DeploymentRequest) (*models.Deployment, error) + func (c *Controller) CreateResource(resourceType models.ResourceType, resourceID string, ...) error + func (c *Controller) DeleteConfig(resourceType models.ResourceType, resourceID string) error + func (c *Controller) DeleteResource(resourceType models.ResourceType, resourceID string) error + func (c *Controller) GetAgentVariables(ctx context.Context, agentID, appID string) (map[string]string, error) + func (c *Controller) GetAssets(tags string) ([]*structs.L2DeviceRemoteInfo, error) + func (c *Controller) GetConfig(resourceType models.ResourceType, resourceID string) (map[string]interface{}, error) + func (c *Controller) GetMongoClient() *mongo.Client + func (c *Controller) GetRegisteredAgentsCount() int + func (c *Controller) GetResourceStatus(resourceType models.ResourceType, resourceID string) (string, error) + func (c *Controller) GetStatus() (*models.ControllerStatus, error) + func (c *Controller) ListConfigs(resourceType models.ResourceType) ([]string, error) + func (c *Controller) ListDeployments(w http.ResponseWriter, r *http.Request) + func (c *Controller) ListResources() []string + func (c *Controller) RegisterService() error + func (c *Controller) RegisterToUpstreamEtcd(upstreamEtcdEndpoints []string) error + func (c *Controller) Start(options ...controllerOptionFunc) error + func (c *Controller) Stop() error + func (c *Controller) UpdateConfig(resourceType models.ResourceType, resourceID string, ...) error + type DataQualityChecker struct + func NewDataQualityChecker(qualityService *DataQualityService, metadataService *MetricMetadataService) *DataQualityChecker + func (c *DataQualityChecker) CheckMetric(ctx context.Context, metricName string, value float64, timestamp time.Time) ([]*models.QualityCheckResult, error) + func (c *DataQualityChecker) CheckMetricsBatch(ctx context.Context, metrics map[string]float64, timestamp time.Time) (map[string][]*models.QualityCheckResult, error) + func (c *DataQualityChecker) ClearCache() + type DataQualityService struct + func NewDataQualityService(oneOpsBaseURL string) *DataQualityService + func ProvideDataQualityService(config *Config) *DataQualityService + func (s *DataQualityService) GetRules(ctx context.Context, enabled bool) ([]*models.DataQualityRule, error) + func (s *DataQualityService) GetRulesByMetric(ctx context.Context, metricName string) ([]*models.DataQualityRule, error) + type DatabaseConfig struct + Database string + MaxPoolSize uint64 + Type string + URI string + type DefaultTargetConverter struct + func NewDefaultTargetConverter(logger *zap.Logger) *DefaultTargetConverter + func (c *DefaultTargetConverter) Convert(targets []*CollectionTargetDTO, strategy *UnifiedCollectionStrategyDTO) (map[string]interface{}, error) + func (c *DefaultTargetConverter) Supports(collectionType string) bool + type Deployment struct + ConcurrentDeployments int + type DeploymentManager struct + ConfigManager *ConfigManager + MinioManager *MinioManager + MongoClient *mongo.Client + RegistryManager *RegistryManager + func ProvideDeployManager(configManager *ConfigManager, registryManager *RegistryManager, ...) *DeploymentManager + func (dm *DeploymentManager) CreateDeployment(req models.DeploymentRequest) (*models.Deployment, error) + func (dm *DeploymentManager) GetDeployment(deploymentID string) (*models.Deployment, error) + func (dm *DeploymentManager) ListDeployments() ([]models.Deployment, error) + func (dm *DeploymentManager) UpdateDeploymentDeviceStatus(deploymentID string, deviceStatus models.TargetDevice) error + type EffectiveStrategy struct + CollectionTasks []models.CollectionTask + GlobalStrategy *models.EnhancedGlobalMetricStrategy + GroupStrategies []*models.GroupMetricStrategy + InstanceStrategy *models.EnhancedInstanceMetricStrategy + type EnhancedStrategyConverter struct + func NewEnhancedStrategyConverter(logger *zap.Logger, configLoader *config.PluginMappingConfigLoader) *EnhancedStrategyConverter + func (esc *EnhancedStrategyConverter) ConvertCollectionTaskToPluginConfig(ctx context.Context, task *models.CollectionTask) (map[string]interface{}, []map[string]interface{}, []map[string]interface{}, ...) + func (esc *EnhancedStrategyConverter) GetConfigLoader() *config.PluginMappingConfigLoader + type FileOperation struct + func NewFileOperation(agentManager *AgentManager) *FileOperation + func (fo *FileOperation) CreateDirectory(ctx context.Context, agentCode, dirPath string, mode uint32) (map[string]interface{}, error) + func (fo *FileOperation) DeleteFile(ctx context.Context, agentCode, filePath string, recursive bool) (map[string]interface{}, error) + func (fo *FileOperation) DownloadFile(ctx context.Context, agentCode, filePath string, offset, length int64) (io.ReadCloser, error) + func (fo *FileOperation) GetFileInfo(ctx context.Context, agentCode, filePath string) (map[string]interface{}, error) + func (fo *FileOperation) GetUploadStatus(ctx context.Context, agentCode, sessionID string) (map[string]interface{}, error) + func (fo *FileOperation) ListFiles(ctx context.Context, agentCode, dirPath string) (map[string]interface{}, error) + func (fo *FileOperation) StartFileUpload(ctx context.Context, agentCode, filePath string, fileSize int64, ...) (map[string]interface{}, error) + func (fo *FileOperation) UploadFileChunk(ctx context.Context, agentCode, sessionID string, chunkIndex int64, ...) error + type GitConfig struct + Address string + Branch string + Password string + Username string + type GlobalResolver struct + ConfigManager *ConfigManager + func ProvideGlobalResolver(cm *ConfigManager) *GlobalResolver + func (gr *GlobalResolver) Resolve(ctx context.Context, agentID, appID string) (map[string]string, error) + type GroupStrategyManager struct + func NewGroupStrategyManager(mongoClient *mongo.Client, logger *zap.Logger) *GroupStrategyManager + func (gsm *GroupStrategyManager) CreateGroupStrategy(ctx context.Context, strategy *models.GroupMetricStrategy) error + func (gsm *GroupStrategyManager) DeleteGroupStrategy(ctx context.Context, id string) error + func (gsm *GroupStrategyManager) GetGroupStrategiesForAgent(ctx context.Context, agentCode string, agentManager *AgentManager) ([]*models.GroupMetricStrategy, error) + func (gsm *GroupStrategyManager) GetGroupStrategy(ctx context.Context, id string) (*models.GroupMetricStrategy, error) + func (gsm *GroupStrategyManager) ListGroupStrategies(ctx context.Context) ([]*models.GroupMetricStrategy, error) + func (gsm *GroupStrategyManager) MatchGroupStrategies(ctx context.Context, agentLabels map[string]string) ([]*models.GroupMetricStrategy, error) + func (gsm *GroupStrategyManager) UpdateGroupStrategy(ctx context.Context, strategy *models.GroupMetricStrategy) error + type GrpcProxyManager struct + StreamDirector proxy.StreamDirector + func ProvideGrpcProxyManager(registryManager *RegistryManager, am *AgentManager, km *KeyManager, ...) *GrpcProxyManager + func (gpm *GrpcProxyManager) Start() error + func (gpm *GrpcProxyManager) Stop() error + type HealthMonitor struct + func NewHealthMonitor(agentManager *AgentManager) *HealthMonitor + func (hm *HealthMonitor) GetAgentOverallHealth(ctx context.Context, agentCode string) (map[string]interface{}, error) + func (hm *HealthMonitor) GetHealthHistory(ctx context.Context, agentCode, packageName string, limit int32) ([]*pb.HealthHistoryEntry, error) + func (hm *HealthMonitor) GetServiceHealth(ctx context.Context, agentCode, packageName string) (*pb.ServiceHealth, error) + func (hm *HealthMonitor) ListAgentHealth(ctx context.Context, agentCode string, filterStatus []pb.HealthStatus) ([]*pb.ServiceHealth, error) + type JumperServerManager struct + func ProvideJumperServerManager(registryManager *RegistryManager, km *KeyManager, config *Config) *JumperServerManager + func (jsm *JumperServerManager) Start() error + func (jsm *JumperServerManager) Stop() error + type KeyManager struct + func NewKeyManager(config *Config) (*KeyManager, error) + func ProvideKeyManager(config *Config) (*KeyManager, error) + func (km *KeyManager) GenerateResourceKey(resourceType, containerName string) (string, error) + func (km *KeyManager) GenerateResourcePrefix(resourceType string) (string, error) + func (km *KeyManager) GenerateServiceKey(serviceName, hostIdentifier, port string) (string, error) + func (km *KeyManager) GenerateServicePrefix(serviceName string) (string, error) + func (km *KeyManager) ParseResourceKey(key string) (string, string, string, error) + func (km *KeyManager) ParseServiceKey(key string) (string, string, string, string, string, error) + type LayerResolver interface + Resolve func(ctx context.Context, agentID, appID string) (map[string]string, error) + type LayeredVariableResolver struct + func NewLayeredVariableResolver(rm *RegistryManager, cm *ConfigManager) *LayeredVariableResolver + func (lvr *LayeredVariableResolver) Resolve(ctx context.Context, agentID, appID string) (map[string]string, error) + type LokiForwarder struct + BufferSize int + Client *http.Client + FlushInterval time.Duration + LokiLabelKey string + RedisManager *RedisManager + UpstreamURL string + func ProvideLokiForwarder(config *ConfigManager, redisManager *RedisManager) *LokiForwarder + func (lf *LokiForwarder) ForwardHandler(w http.ResponseWriter, r *http.Request) + type LokiPushRequest struct + Streams []LokiStream + type LokiStream struct + Stream map[string]string + Values [][]string + type Manager interface + Start func() error + Stop func() error + type MetricDataPoint struct + Timestamp time.Time + Value float64 + type MetricMetadataService struct + func NewMetricMetadataService(oneOpsBaseURL string) *MetricMetadataService + func ProvideMetricMetadataService(config *Config) *MetricMetadataService + func (s *MetricMetadataService) GetMetadata(ctx context.Context, name string) (*models.MetricMetadata, error) + func (s *MetricMetadataService) ListMetadata(ctx context.Context, category string) ([]*models.MetricMetadata, error) + type MetricsManagerConfig struct + Port int + RemoteWriteURL string + type MetricsQuery struct + func NewMetricsQuery(agentManager *AgentManager) *MetricsQuery + func (mq *MetricsQuery) GetAgentMetricsSummary(ctx context.Context, agentCode string) (map[string]interface{}, error) + func (mq *MetricsQuery) GetApplicationMetrics(ctx context.Context, agentCode, serviceName string) (map[string]interface{}, error) + func (mq *MetricsQuery) GetMetricsHistory(ctx context.Context, agentCode, metricType, serviceName string, ...) (map[string]interface{}, error) + func (mq *MetricsQuery) GetServiceMetrics(ctx context.Context, agentCode, packageName string) (*pb.ServiceMetrics, error) + func (mq *MetricsQuery) GetSystemMetrics(ctx context.Context, agentCode string) (*pb.SystemMetrics, error) + func (mq *MetricsQuery) ListServiceMetrics(ctx context.Context, agentCode string, runningOnly bool) ([]*pb.ServiceMetrics, error) + type MetricsStrategyService struct + func NewMetricsStrategyService(mongoClient *mongo.Client, agentManager *AgentManager, ...) *MetricsStrategyService + func (s *MetricsStrategyService) DeleteInstanceStrategy(ctx context.Context, agentCode string) error + func (s *MetricsStrategyService) GenerateConfigFromEnhancedStrategy(ctx context.Context, agentCode string) (string, error) + func (s *MetricsStrategyService) GetApplicationStrategy(ctx context.Context, agentCode string) (*models.ApplicationMetricStrategy, error) + func (s *MetricsStrategyService) GetAvailableMetrics(ctx context.Context, agentCode string) ([]string, error) + func (s *MetricsStrategyService) GetConfigStatus(ctx context.Context, agentCode string) (*models.ConfigStatus, error) + func (s *MetricsStrategyService) GetEffectiveEnhancedStrategy(ctx context.Context, agentCode string) (*EffectiveStrategy, error) + func (s *MetricsStrategyService) GetEnhancedGlobalStrategy(ctx context.Context) (*models.EnhancedGlobalMetricStrategy, error) + func (s *MetricsStrategyService) GetEnhancedInstanceStrategy(ctx context.Context, agentCode string) (*models.EnhancedInstanceMetricStrategy, error) + func (s *MetricsStrategyService) PreviewTask(ctx context.Context, task models.CollectionTask) (*models.MetricRulePreview, error) + func (s *MetricsStrategyService) UpdateApplicationStrategy(ctx context.Context, strategy *models.ApplicationMetricStrategy) error + type MinioConfig struct + AccessKeyID string + BucketName string + Endpoint string + ProxyAddr string + SecretAccessKey string + UseSSL bool + type MinioManager struct + ConfigManager *ConfigManager + KeyManager *KeyManager + RegistryManager *RegistryManager + func ProvideMinioManager(km *KeyManager, configManager *ConfigManager, registryManager *RegistryManager) (*MinioManager, error) + func (mm *MinioManager) CreateBucket(bucketName string) error + func (mm *MinioManager) DeleteObject(bucketName, objectName string) error + func (mm *MinioManager) DownloadFile(bucketName, objectName string, filePath string) error + func (mm *MinioManager) GetMiniManagerStatus() (models.ResourceStatus, error) + func (mm *MinioManager) GetObjectInfo(bucketName, objectName string) (minio.ObjectInfo, error) + func (mm *MinioManager) GetPresignedURL(bucketName, objectName string, expiry time.Duration, method string) (string, error) + func (mm *MinioManager) GetProxyLatestPackageURL(bucketName, objectName string) (string, error) + func (mm *MinioManager) GetProxyPackageURL(bucketName, objectName string) (string, error) + func (mm *MinioManager) ListBuckets() ([]minio.BucketInfo, error) + func (mm *MinioManager) ListObjects(bucketName string) ([]minio.ObjectInfo, error) + func (mm *MinioManager) ListPackages(bucketName string) ([]string, error) + func (mm *MinioManager) RegisterService() error + func (mm *MinioManager) Start() error + func (mm *MinioManager) Stop() error + func (mm *MinioManager) UploadFile(bucketName, objectName string, filePath string) error + type MonitoringService struct + func ProvideMonitoringService(mongoClient *mongo.Client, config *Config, ...) (*MonitoringService, error) + func (ms *MonitoringService) CreatePlugin(ctx context.Context, plugin *models.PluginConfig) error + func (ms *MonitoringService) CreateTask(ctx context.Context, task *models.MonitoringTask) error + func (ms *MonitoringService) DeletePlugin(ctx context.Context, pluginID string) error + func (ms *MonitoringService) DeleteTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) EnsureIndexes(ctx context.Context) error + func (ms *MonitoringService) GetPlugin(ctx context.Context, pluginID string) (*models.PluginConfig, error) + func (ms *MonitoringService) GetStatus(ctx context.Context) (*models.MonitoringStatus, error) + func (ms *MonitoringService) GetTask(ctx context.Context, taskID string) (*models.MonitoringTask, error) + func (ms *MonitoringService) ListPlugins(ctx context.Context, filter map[string]interface{}) ([]*models.PluginConfig, error) + func (ms *MonitoringService) ListTasks(ctx context.Context, filter map[string]interface{}) ([]*models.MonitoringTask, error) + func (ms *MonitoringService) PauseTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) PublishTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) ReloadTelegrafConfig(ctx context.Context) error + func (ms *MonitoringService) ResumeTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) RevokeTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) StartTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) StopTask(ctx context.Context, taskID string) error + func (ms *MonitoringService) UpdatePlugin(ctx context.Context, pluginID string, plugin *models.PluginConfig) error + func (ms *MonitoringService) UpdateTask(ctx context.Context, taskID string, task *models.MonitoringTask) error + type NacosConfig struct + AgentGroup string + CacheDir string + DataID string + Group string + LogDir string + LogLevel string + Namespace string + Password string + Port int + Server string + Username string + type NacosManager struct + func ProvideNacosManager(config *Config) (*NacosManager, error) + func (nm *NacosManager) BatchGetConfig(params []vo.ConfigParam) (map[string]string, error) + func (nm *NacosManager) BatchSetConfig(configs map[string]vo.ConfigParam) error + func (nm *NacosManager) DeleteConfig(dataId, group string) error + func (nm *NacosManager) GetConfig(dataId, group string) (string, error) + func (nm *NacosManager) GetConfigWithRetry(dataId, group string, maxRetries int) (string, error) + func (nm *NacosManager) ListenConfig(dataId, group string, onChange func(string)) error + func (nm *NacosManager) SetConfig(dataId, group, content string) error + type PackageInfo struct + AgentCode string + ID string + Name string + Version string + type PackageWatcher struct + func (pw *PackageWatcher) Watch(ctx context.Context) + type PluginTemplateService struct + func ProvidePluginTemplateService(mongoClient *mongo.Client, config *Config) (*PluginTemplateService, error) + func (pts *PluginTemplateService) ConvertConfigToTOML(config map[string]interface{}) (string, error) + func (pts *PluginTemplateService) CreateTemplate(ctx context.Context, tmpl *models.PluginTemplate) error + func (pts *PluginTemplateService) DeleteTemplate(ctx context.Context, templateID string) error + func (pts *PluginTemplateService) EnsureIndexes(ctx context.Context) error + func (pts *PluginTemplateService) GetTemplate(ctx context.Context, templateID string) (*models.PluginTemplate, error) + func (pts *PluginTemplateService) GetTemplatesByType(ctx context.Context, pluginType string) ([]*models.PluginTemplate, error) + func (pts *PluginTemplateService) ListTemplates(ctx context.Context, filter map[string]interface{}) ([]*models.PluginTemplate, error) + func (pts *PluginTemplateService) PresetTemplates(ctx context.Context) error + func (pts *PluginTemplateService) RenderTemplate(ctx context.Context, templateID string, params map[string]interface{}) (string, error) + func (pts *PluginTemplateService) RenderTemplateFromContent(ctx context.Context, templateContent string, params map[string]interface{}) (string, error) + func (pts *PluginTemplateService) UpdateTemplate(ctx context.Context, templateID string, tmpl *models.PluginTemplate) error + func (pts *PluginTemplateService) ValidateTemplate(ctx context.Context, templateContent string) error + func (pts *PluginTemplateService) ValidateTemplateParameters(ctx context.Context, templateID string, params map[string]interface{}) error + type PrometheusForwarder struct + AddressLabels map[string]map[string]string + AttachLabelKey string + BufferSize int + Client *http.Client + FlushInterval time.Duration + RedisManager *RedisManager + UpstreamURL string + func ProvidePrometheusForwarder(config *ConfigManager, redisManager *RedisManager) *PrometheusForwarder + func (pf *PrometheusForwarder) ForwardHandler(w http.ResponseWriter, r *http.Request) + type RedisConfig struct + Addresses []string + DB int + Password string + PoolSize int + type RedisManager struct + func ProvideRedisManager(config *Config) (*RedisManager, error) + func (rm *RedisManager) Close() error + func (rm *RedisManager) Get(key string) (map[string]map[string]any, error) + func (rm *RedisManager) GetAll() ([]map[string]map[string]map[string]any, error) + func (rm *RedisManager) GetClient() *redis.Client + func (rm *RedisManager) Start() error + func (rm *RedisManager) Stop() error + func (rm *RedisManager) Subscribe() error + type RegistryManager struct + ConfigManager *ConfigManager + HostIdentifier string + KeyManager *KeyManager + func ProvideRegistryManager(km *KeyManager, cm *ConfigManager, mongoClient *mongo.Client) (*RegistryManager, error) + func (rm *RegistryManager) FirstByName(serviceName string) (*models.ServiceInfo, error) + func (rm *RegistryManager) GetAgentCount() (int, error) + func (rm *RegistryManager) GetAgentVariables(agentID string) (map[string]string, error) + func (rm *RegistryManager) GetControllerAddress() (string, error) + func (rm *RegistryManager) GetEtcdAddress() (string, error) + func (rm *RegistryManager) GetService(key string) (*models.ServiceInfo, error) + func (rm *RegistryManager) GetVariables(ctx context.Context, agentID, appID string) (map[string]string, error) + func (rm *RegistryManager) ListAgents(ctx context.Context, filter map[string]string, page, pageSize int) ([]models.Agent, int, error) + func (rm *RegistryManager) ListServices() []*models.ServiceInfo + func (rm *RegistryManager) RefreshService(serviceID string, ttl time.Duration) error + func (rm *RegistryManager) RegisterService(service *models.ServiceInfo, ttl time.Duration) error + func (rm *RegistryManager) SetAgentVariables(agentID string, variables map[string]string) error + func (rm *RegistryManager) Start() error + func (rm *RegistryManager) Stop() error + func (rm *RegistryManager) UnregisterService(key string) error + func (rm *RegistryManager) UpdateServiceConfig(serviceID string, config map[string]interface{}) error + func (rm *RegistryManager) WatchServices(ctx context.Context) (<-chan *models.ServiceEvent, error) + type ResourceManager struct + Config *Config + KeyManager *KeyManager + Resources *tools.SafeMap[string, *models.ResourceInfo] + func ProvideResourceManager(km *KeyManager, c *Config) (*ResourceManager, error) + func (rm *ResourceManager) ClearContainers() error + func (rm *ResourceManager) CreateResource(resourceType models.ResourceType, containerName string, ...) (string, error) + func (rm *ResourceManager) DeleteResource(multiLevelKey string) error + func (rm *ResourceManager) GetAllResourcesStatus() map[string]string + func (rm *ResourceManager) GetResourceFromContainerID(containerID string) (string, error) + func (rm *ResourceManager) GetResourceInfo(multiLevelKey string) (*models.ResourceInfo, error) + func (rm *ResourceManager) GetResourceLogs(multiLevelKey string, tail int) (string, error) + func (rm *ResourceManager) GetResourceStatus(multiLevelKey string) (string, error) + func (rm *ResourceManager) GetStatus() map[string]interface{} + func (rm *ResourceManager) ListAllResources() []string + func (rm *ResourceManager) RestartResource(multiLevelKey string) error + func (rm *ResourceManager) Start() error + func (rm *ResourceManager) StartResource(multiLevelKey string) error + func (rm *ResourceManager) Stop() error + func (rm *ResourceManager) StopResource(multiLevelKey string) error + type ResourceProvider interface + GetServiceInfo func(serviceName string) (*ServiceInfo, error) + RestartService func(serviceName string) error + StartService func(serviceName string) error + StopService func(serviceName string) error + type SNMPTargetConverter struct + func NewSNMPTargetConverter(defaultPort int, defaultCommunity string, logger *zap.Logger) *SNMPTargetConverter + func (c *SNMPTargetConverter) Convert(targets []*CollectionTargetDTO, strategy *UnifiedCollectionStrategyDTO) (map[string]interface{}, error) + func (c *SNMPTargetConverter) Supports(collectionType string) bool + type SafeResourceMap struct + type ServerConfig struct + GRPCPort int + HTTPPort int + type ServiceInfo struct + Env []string + ID string + Image string + Name string + Ports []types.Port + Status string + Volumes []string + type StrategyMerger struct + func NewStrategyMerger(logger *zap.Logger) *StrategyMerger + func (sm *StrategyMerger) GetEffectiveStrategyForAgent(ctx context.Context, agentCode string, ...) (*EffectiveStrategy, error) + func (sm *StrategyMerger) MergeStrategies(ctx context.Context, globalStrategy *models.EnhancedGlobalMetricStrategy, ...) (*EffectiveStrategy, error) + type StrategyToConfigConverter struct + func NewStrategyToConfigConverter(logger *zap.Logger, configLoader *config.PluginMappingConfigLoader) *StrategyToConfigConverter + func (c *StrategyToConfigConverter) ConvertStrategyToConfig(ctx context.Context, globalStrategy *models.GlobalMetricStrategy, ...) (map[string][]map[string]interface{}, map[string]interface{}, error) + func (c *StrategyToConfigConverter) GenerateConfigFromStrategy(ctx context.Context, configGenerator *TelegrafConfigGenerator, ...) (string, error) + func (c *StrategyToConfigConverter) GetMetricPrefixesForPlugin(pluginType string) []string + func (c *StrategyToConfigConverter) GetPluginForMetric(metricName string) string + type SyslogManagerConfig struct + LokiEndpoint string + Port int + Protocol string + type TargetConverter interface + Convert func(targets []*CollectionTargetDTO, strategy *UnifiedCollectionStrategyDTO) (map[string]interface{}, error) + Supports func(collectionType string) bool + type TargetConverterRegistry struct + func NewTargetConverterRegistry(logger *zap.Logger, mapper CollectionTypeMapper) *TargetConverterRegistry + func (r *TargetConverterRegistry) GetConverter(collectionType string) TargetConverter + func (r *TargetConverterRegistry) Register(collectionType string, converter TargetConverter) + type TelegrafConfig struct + ConfigPath string + Enable *bool + Image string + LokiEndpoint string + Name string + PrometheusEndpoint string + PrometheusPort int + type TelegrafConfigGenerator struct + BaseConfigPath string + CollectionTargetConverter *CollectionTargetConverter + EnhancedConverter *EnhancedStrategyConverter + MetricMetadataService *MetricMetadataService + TemplateService *PluginTemplateService + func ProvideTelegrafConfigGenerator(templateService *PluginTemplateService, config *Config, ...) (*TelegrafConfigGenerator, error) + func (tcg *TelegrafConfigGenerator) ConfigToTOML(config map[string]interface{}) ([]byte, error) + func (tcg *TelegrafConfigGenerator) ExtractMetadataFromConfig(ctx context.Context, configStr string) ([]*models.MetricMetadata, error) + func (tcg *TelegrafConfigGenerator) GenerateApplicationMetricsConfig(appTargets []map[string]interface{}) map[string]interface{} + func (tcg *TelegrafConfigGenerator) GenerateConfig(ctx context.Context, tasks []*models.MonitoringTask, ...) (string, error) + func (tcg *TelegrafConfigGenerator) GenerateConfigFromOneOpsDTO(ctx context.Context, collectionType string, ...) (string, error) + func (tcg *TelegrafConfigGenerator) GenerateConfigFromStrategy(ctx context.Context, globalStrategy *models.GlobalMetricStrategy, ...) (string, error) + func (tcg *TelegrafConfigGenerator) GenerateEBPFConfig(ctx context.Context, target map[string]interface{}) (map[string]interface{}, error) + func (tcg *TelegrafConfigGenerator) GenerateNETCONFConfig(ctx context.Context, targets []map[string]interface{}) ([]map[string]interface{}, error) + func (tcg *TelegrafConfigGenerator) GeneratePacketCaptureConfig(ctx context.Context, targets []map[string]interface{}) ([]map[string]interface{}, error) + func (tcg *TelegrafConfigGenerator) GeneratePluginConfigFromRaw(config map[string]interface{}) (string, error) + func (tcg *TelegrafConfigGenerator) GeneratePluginConfigFromTemplate(ctx context.Context, templateID string, params map[string]interface{}) (string, error) + func (tcg *TelegrafConfigGenerator) GenerateSNMPConfig(snmpTargets []map[string]interface{}) map[string]interface{} + func (tcg *TelegrafConfigGenerator) GenerateSSHConfig(ctx context.Context, targets []map[string]interface{}) ([]map[string]interface{}, error) + func (tcg *TelegrafConfigGenerator) ValidateConfig(configStr string) error + type TelegrafConfigStruct struct + Agent *AgentConfigStruct + GlobalTags map[string]string + Inputs map[string][]map[string]interface{} + Outputs map[string][]map[string]interface{} + type TelegrafConfigValidator struct + MetricMetadataService *MetricMetadataService + func NewTelegrafConfigValidator(metricMetadataService *MetricMetadataService) *TelegrafConfigValidator + func (v *TelegrafConfigValidator) ValidateConfig(ctx context.Context, configStr string) error + func (v *TelegrafConfigValidator) ValidatePluginConfig(ctx context.Context, pluginType string, config map[string]interface{}) error + type TelegrafManager struct + Config *Config + ConfigGenerator *TelegrafConfigGenerator + ConfigManager *ConfigManager + KeyManager *KeyManager + RegistryManager *RegistryManager + ResourceManager *ResourceManager + func ProvideTelegrafManager(rm *ResourceManager, cm *ConfigManager, registry *RegistryManager, ...) (*TelegrafManager, error) + func (tm *TelegrafManager) GetConfig() (map[string]interface{}, error) + func (tm *TelegrafManager) GetConfigVersion() string + func (tm *TelegrafManager) GetLastReloadTime() *time.Time + func (tm *TelegrafManager) GetStatus() map[string]interface{} + func (tm *TelegrafManager) GetTelegrafStatus() (string, error) + func (tm *TelegrafManager) MultiLevelKey() string + func (tm *TelegrafManager) ReloadConfig() error + func (tm *TelegrafManager) Restart() error + func (tm *TelegrafManager) Start() error + func (tm *TelegrafManager) Stop() error + func (tm *TelegrafManager) UpdateConfig(config map[string]interface{}) error + func (tm *TelegrafManager) UpdateConfigFromTasks(ctx context.Context, tasks []*models.MonitoringTask, ...) error + func (tm *TelegrafManager) UpdateTelegrafConfig(config map[string]interface{}) error + type TemplateData map[string]interface + type UniOpsConfig struct + Account string + Address string + Password string + Webhook WebhookConfig + type UnifiedCollectionStrategyDTO struct + CollectionType string + DefaultInterval int + EffectiveConfig map[string]interface{} + type Upstream struct + EtcdAddresses []string + Password string + Username string + Watch string + type WebhookConfig struct + RetryInterval int + RetryMaxAttempts int + Secret string + Timeout int + URLs []string