collector

package
v0.0.0-...-f62340a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CbsNamespace     = "QCE/BLOCK_STORAGE"
	CbsInstanceidKey = "diskId"
)
View Source
const (
	CdbNamespace     = "QCE/CDB"
	CdbInstanceidKey = "InstanceId"
)
View Source
const (
	CdnNamespace     = "QCE/CDN"
	CdnInstanceidKey = "domain"
)
View Source
const (
	CfsNamespace     = "QCE/CFS"
	CfsInstanceIdKey = "FileSystemId"
)
View Source
const (
	ClbNamespace     = "QCE/LB_PUBLIC"
	ClbInstanceidKey = "vip"
)
View Source
const (
	Clb7Namespace     = "QCE/LOADBALANCE"
	Clb7InstanceidKey = "vip"
)
View Source
const (
	ClbPrivateNamespace     = "QCE/LB_PRIVATE"
	ClbPrivateInstanceidKey = "vip"
)
View Source
const (
	CMQNamespace     = "QCE/CMQ"
	CMQInstanceIDKey = "queueId"
)
View Source
const (
	CMQTopicNamespace     = "QCE/CMQTOPIC"
	CMQTopicInstanceIDKey = "topicId"
)
View Source
const (
	CvmNamespace     = "QCE/CVM"
	CvmInstanceidKey = "InstanceId"
)
View Source
const (
	CynosdbNamespace     = "QCE/CYNOSDB_MYSQL"
	CynosdbInstanceidKey = "InstanceId"
)
View Source
const (
	DcNamespace     = "QCE/DC"
	DcInstanceidKey = "directConnectId"
)
View Source
const (
	DcdbNamespace     = "QCE/TDMYSQL"
	DcdbInstanceidKey = "InstanceId"
)
View Source
const (
	DcgNamespace     = "QCE/DCG"
	DcgInstanceidKey = "directConnectGatewayId"
)
View Source
const (
	DcxNamespace     = "QCE/DCX"
	DcxInstanceidKey = "directConnectConnId"
)
View Source
const (
	DTSNamespace     = "QCE/DTS"
	DTSInstanceIdKey = "SubscribeId"
)
View Source
const (
	EIPNamespace     = "QCE/LB"
	EIPInstanceidKey = "eip"
)
View Source
const (
	ESNamespace     = "QCE/CES"
	ESInstanceIDKey = "uInstanceId"
)
View Source
const (
	KafkaNamespace     = "QCE/CKAFKA"
	KafkaInstanceIDKey = "instanceId"
)
View Source
const (
	LighthouseNamespace     = "QCE/LIGHTHOUSE"
	LighthouseInstanceIDKey = "InstanceId"
)
View Source
const (
	MariaDBNamespace     = "QCE/MARIADB"
	MariaDBInstanceIDKey = "InstanceId"
)
View Source
const (
	MemcachedNamespace     = "QCE/MEMCACHED"
	MemcachedInstanceIDKey = "instanceid"
)
View Source
const (
	MongoNamespace     = "QCE/CMONGO"
	MongoInstanceidKey = "target"
)
View Source
const (
	NacosNamespace     = "TSE/NACOS"
	NacosInstanceidKey = "NacosInstanceId"
)
View Source
const (
	NatNamespace       = "QCE/NAT_GATEWAY"
	NatMonitorQueryKey = "natId"
)
View Source
const (
	PGNamespace       = "QCE/POSTGRES"
	PGDBInstanceIDKey = "resourceId"
)
View Source
const (
	QaapNamespace     = "QCE/QAAP"
	QaapInstanceidKey = "channelId"
)
View Source
const (
	RedisNamespace     = "QCE/REDIS"
	RedisInstanceidKey = "instanceid"
)
View Source
const (
	RedisMemNamespace     = "QCE/REDIS_MEM"
	RedisMemInstanceidKey = "instanceid"
)
View Source
const (
	SqlServerNamespace     = "QCE/SQLSERVER"
	SqlServerInstanceidKey = "resourceId"
)
View Source
const (
	TdmqNamespace     = "QCE/TDMQ"
	TdmqInstanceidKey = "tenant"
)
View Source
const (
	VbcNamespace     = "QCE/VBC"
	VbcInstanceidKey = "CcnId"
)
View Source
const (
	VpngwNamespace     = "QCE/VPNGW"
	VpngwInstanceidKey = "vpnGwId"
)
View Source
const (
	VpnxNamespace     = "QCE/VPNX"
	VpnxInstanceidKey = "vpnConnId"
)
View Source
const (
	WafNamespace     = "QCE/WAF"
	WafInstanceidKey = "domain"
)
View Source
const (
	ZookeeperNamespace     = "TSE/ZOOKEEPER"
	ZookeeperInstanceidKey = "InstanceId"
)
View Source
const (
	CosNamespace = "QCE/COS"
)

Variables

View Source
var (
	MongoClusterMetrics = []string{
		"inserts", "reads", "updates", "deletes", "counts", "aggregates", "clusterconn", "commands", "connper", "clusterdiskusage",
		"qps", "success", "delay10", "delay50", "delay100", "timeouts",
	}
	MongoReplicaMetrics = []string{
		"replicadiskusage", "slavedelay", "oplogreservedtime",
	}
	MongoNodeMetrics = []string{
		"conn", "cpuusage", "memusage", "qr", "qw", "netin", "netout",
	}
)
View Source
var (
	QaapDetail2GroupidMetricNames = []string{
		"GroupInFlow", "GroupOutFlow", "GroupInbandwidth", "GroupOutbandwidth",
	}
	QaapIpDetailMetricNames = []string{
		"IpConnum", "IpInbandwidth", "IpInpacket", "IpLatency", "IpOutbandwidth", "IpOutpacket", "IpPacketLoss",
	}
	QaapListenerStatMetricNames = []string{
		"ListenerConnum", "ListenerOutbandwidth", "ListenerInpacket", "ListenerOutpacket", "ListenerInbandwidth",
	}
	QaapListenerRsMetricNames = []string{
		"ListenerRsStatus",
	}
	QaapRuleRsMetricNames = []string{
		"RuleRsStatus",
	}
)
View Source
var (
	RedisMetricNames = []string{
		"cpuusmin", "storagemin", "storageusmin", "keysmin", "expiredkeysmin", "evictedkeysmin", "connectionsmin", "connectionsusmin",
		"inflowmin", "inflowusmin", "outflowmin", "outflowusmin", "latencymin", "latencygetmin", "latencysetmin", "latencyothermin",
		"qpsmin", "statgetmin", "statsetmin", "statothermin", "bigvaluemin", "slowquerymin", "statsuccessmin", "statmissedmin",
		"cmderrmin", "cachehitratiomin",
	}
	RedisClusterMetricNames = []string{
		"cpuusmin", "cpumaxusmin", "storagemin", "storageusmin", "storagemaxusmin", "keysmin", "expiredkeysmin", "evictedkeysmin",
		"connectionsmin", "connectionsusmin", "inflowmin", "inflowusmin", "outflowmin", "outflowusmin", "latencymin", "latencygetmin",
		"latencysetmin", "latencyothermin", "qpsmin", "statgetmin", "statsetmin", "statothermin", "bigvaluemin", "slowquerymin",
		"statsuccessmin", "statmissedmin", "cmderrmin", "cachehitratiomin",
	}
)
View Source
var (
	BetweenRegionMetricNames = []string{
		"OutDropBandwidth", "InBandwidthRate", "OutBandwidthRate", "OutDropPkg", "OutDropPkgRate", "InBandwidth", "InPkg", "OutPkg", "OutBandwidth",
	}
	SingleRegionMetricNames = []string{
		"Regioninbandwidthbm", "Regionoutbandwidthbm", "Regionoutdropbandwidthbm", "Regioninpkgbm", "Regionoutbandwidthbmrate", "Regionoutdroppkgbmrate", "Regionoutpkgbm", "Regionoutdroppkgbm",
	}
)
View Source
var (
	Clb7ExcludeMetrics = []string{
		"outpkgratio",
		"intrafficratio",
		"inpkgratio",
		"qpsratio",
		"activeconnratio",
		"newactiveconnratio",
		"outtrafficratio",
		"rsptimeout",
		"setreqavg",
		"setreqmax",
		"setrspavg",
		"setrspmax",
		"settotalreq",
		"vrsptimeout",
		"vsettotalreq",
	}
)
View Source
var (
	ClbPrivateExcludeMetrics = []string{
		"ConnRatio", "OverloadCurConn", "SnatFail",
		"PvvInpkg", "PvvOutpkg", "PvvConnum", "PvvIntraffic", "PvvNewConn", "PvvOuttraffic",
		"VvIntraffic", "VvInpkg", "VvNewConn", "VvOutpkg", "VvOuttraffic", "VvConnum",
	}
)
View Source
var (
	CosSupportDimensions = []string{"appid", "bucket"}
)
View Source
var (
	CvmInvalidMetricNames = []string{"dccpuusage", "dcmemusage"}
)
View Source
var (
	DcxInvalidMetricNames = []string{"rxbytes", "txbytes"}
)
View Source
var EditionMap = map[string]string{"sparta-waf": "0", "clb-waf": "1"}
View Source
var (
	LbPrivateSupportDimensions = []string{"vip", "vpcId", "loadBalancerPort", "protocol", "lanIp", "port"}
)
View Source
var (
	RocketMQOnlyIncludeMetrics = []string{
		"ropratein",
		"roprateout",
		"ropthroughputin",
		"ropthroughputout",
		"ropmsgbacklog",
		"ropmsgaveragesize",
		"ropinmessagetotal",
		"ropgroupcount",
	}
)

Functions

This section is empty.

Types

type CfsHandler

type CfsHandler struct {
	// contains filtered or unexported fields
}

func (*CfsHandler) GetNamespace

func (h *CfsHandler) GetNamespace() string

func (*CfsHandler) GetSeries

func (h *CfsHandler) GetSeries(m *metric.TcmMetric) (slist []*metric.TcmSeries, err error)

func (*CfsHandler) GetSeriesByAll

func (h *CfsHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CfsHandler) GetSeriesByCustom

func (h *CfsHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CfsHandler) GetSeriesByOnly

func (h *CfsHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CfsHandler) IsMetricMetaValid

func (h *CfsHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*CfsHandler) IsMetricValid

func (h *CfsHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*CfsHandler) ModifyMetric

func (h *CfsHandler) ModifyMetric(m *metric.TcmMetric) error

func (*CfsHandler) ModifyMetricMeta

func (h *CfsHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type ClbPrivateHandler

type ClbPrivateHandler struct {
	// contains filtered or unexported fields
}

func (*ClbPrivateHandler) GetNamespace

func (h *ClbPrivateHandler) GetNamespace() string

func (*ClbPrivateHandler) GetSeries

func (h *ClbPrivateHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ClbPrivateHandler) GetSeriesByAll

func (h *ClbPrivateHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ClbPrivateHandler) GetSeriesByCustom

func (h *ClbPrivateHandler) GetSeriesByCustom(m *metric.TcmMetric) (slist []*metric.TcmSeries, err error)

func (*ClbPrivateHandler) GetSeriesByOnly

func (h *ClbPrivateHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ClbPrivateHandler) IsMetricMetaValid

func (h *ClbPrivateHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*ClbPrivateHandler) IsMetricValid

func (h *ClbPrivateHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*ClbPrivateHandler) ModifyMetric

func (h *ClbPrivateHandler) ModifyMetric(m *metric.TcmMetric) error

func (*ClbPrivateHandler) ModifyMetricMeta

func (h *ClbPrivateHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type CynosdbHandler

type CynosdbHandler struct {
	// contains filtered or unexported fields
}

func (*CynosdbHandler) GetNamespace

func (h *CynosdbHandler) GetNamespace() string

func (*CynosdbHandler) GetSeries

func (h *CynosdbHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CynosdbHandler) GetSeriesByAll

func (h *CynosdbHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CynosdbHandler) GetSeriesByCustom

func (h *CynosdbHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CynosdbHandler) GetSeriesByOnly

func (h *CynosdbHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*CynosdbHandler) IsMetricMetaValid

func (h *CynosdbHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*CynosdbHandler) IsMetricValid

func (h *CynosdbHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*CynosdbHandler) ModifyMetric

func (h *CynosdbHandler) ModifyMetric(m *metric.TcmMetric) error

func (*CynosdbHandler) ModifyMetricMeta

func (h *CynosdbHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type DcgHandler

type DcgHandler struct {
	// contains filtered or unexported fields
}

func (*DcgHandler) GetNamespace

func (h *DcgHandler) GetNamespace() string

func (*DcgHandler) GetSeries

func (h *DcgHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*DcgHandler) GetSeriesByAll

func (h *DcgHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*DcgHandler) GetSeriesByCustom

func (h *DcgHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*DcgHandler) GetSeriesByOnly

func (h *DcgHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*DcgHandler) IsMetricMetaValid

func (h *DcgHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*DcgHandler) IsMetricValid

func (h *DcgHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*DcgHandler) ModifyMetric

func (h *DcgHandler) ModifyMetric(m *metric.TcmMetric) error

func (*DcgHandler) ModifyMetricMeta

func (h *DcgHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type NacosHandler

type NacosHandler struct {
	// contains filtered or unexported fields
}

func (*NacosHandler) GetNamespace

func (h *NacosHandler) GetNamespace() string

func (*NacosHandler) GetSeries

func (h *NacosHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*NacosHandler) GetSeriesByAll

func (h *NacosHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*NacosHandler) GetSeriesByCustom

func (h *NacosHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*NacosHandler) GetSeriesByOnly

func (h *NacosHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*NacosHandler) IsMetricMetaValid

func (h *NacosHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*NacosHandler) IsMetricValid

func (h *NacosHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*NacosHandler) ModifyMetric

func (h *NacosHandler) ModifyMetric(m *metric.TcmMetric) error

func (*NacosHandler) ModifyMetricMeta

func (h *NacosHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type ProductHandler

type ProductHandler interface {
	// 获取云监控指标namespace
	GetNamespace() string
	// 对指标元数据做检验, true=可用, false=跳过
	IsMetricMetaValid(meta *metric.TcmMeta) bool
	// 修改指标元数据
	ModifyMetricMeta(meta *metric.TcmMeta) error
	// 对指标做校验, true=可用, false=跳过
	IsMetricValid(m *metric.TcmMetric) bool
	// 修改指标
	ModifyMetric(m *metric.TcmMetric) error
	// 获取该指标下符合条件的所有实例, 并生成所有的series
	GetSeries(tcmMetric *metric.TcmMetric) (series []*metric.TcmSeries, err error)
}

每个产品的指标处理逻辑

func NewCMQHandler

func NewCMQHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCMQTopicHandler

func NewCMQTopicHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCbsHandler

func NewCbsHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCdbHandler

func NewCdbHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCdnHandler

func NewCdnHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCfsHandler

func NewCfsHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewClb7Handler

func NewClb7Handler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewClbHandler

func NewClbHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewClbPrivateHandler

func NewClbPrivateHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCosHandler

func NewCosHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCvmHandler

func NewCvmHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewCynosdbHandler

func NewCynosdbHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewDTSHandler

func NewDTSHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewDcHandler

func NewDcHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewDcdbHandler

func NewDcdbHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewDcgHandler

func NewDcgHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewDcxHandler

func NewDcxHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewEIPHandler

func NewEIPHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewESHandler

func NewESHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewKafkaHandler

func NewKafkaHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewLighthouseHandler

func NewLighthouseHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewMariaDBHandler

func NewMariaDBHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewMemcachedHandler

func NewMemcachedHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewMongoHandler

func NewMongoHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewNacosHandler

func NewNacosHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewNatHandler

func NewNatHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewPGHandler

func NewPGHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewQaapHandler

func NewQaapHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewRedisHandler

func NewRedisHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewRedisMemHandler

func NewRedisMemHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (ProductHandler, error)

func NewSqlServerHandler

func NewSqlServerHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewTdmqHandler

func NewTdmqHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewVbcHandler

func NewVbcHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewVpngwHandler

func NewVpngwHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewVpnxHandler

func NewVpnxHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewWafHandler

func NewWafHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

func NewZookeeperHandler

func NewZookeeperHandler(cred common.CredentialIface, c *TcProductCollector, logger log.Logger) (handler ProductHandler, err error)

type QaapHandler

type QaapHandler struct {
	// contains filtered or unexported fields
}

func (*QaapHandler) GetNamespace

func (h *QaapHandler) GetNamespace() string

func (*QaapHandler) GetSeries

func (h *QaapHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*QaapHandler) GetSeriesByAll

func (h *QaapHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*QaapHandler) GetSeriesByCustom

func (h *QaapHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*QaapHandler) GetSeriesByOnly

func (h *QaapHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*QaapHandler) IsMetricMetaValid

func (h *QaapHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*QaapHandler) IsMetricValid

func (h *QaapHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*QaapHandler) ModifyMetric

func (h *QaapHandler) ModifyMetric(m *metric.TcmMetric) error

func (*QaapHandler) ModifyMetricMeta

func (h *QaapHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type TcMonitorCollector

type TcMonitorCollector struct {
	Collectors map[string]*TcProductCollector
	Reloaders  map[string]*TcProductCollectorReloader
	// contains filtered or unexported fields
}

总指标采集器, 包含多个产品的采集器

func NewTcMonitorCollector

func NewTcMonitorCollector(cred common.CredentialIface, conf *config.TencentConfig, logger log.Logger) (*TcMonitorCollector, error)

func (*TcMonitorCollector) Collect

func (n *TcMonitorCollector) Collect(ch chan<- prometheus.Metric)

func (*TcMonitorCollector) Describe

func (n *TcMonitorCollector) Describe(ch chan<- *prometheus.Desc)

type TcProductCollector

type TcProductCollector struct {
	Namespace    string
	MetricRepo   metric.TcmMetricRepository
	InstanceRepo instance.TcInstanceRepository
	MetricMap    map[string]*metric.TcmMetric
	InstanceMap  map[string]instance.TcInstance
	Querys       metric.TcmQuerySet
	Conf         *config.TencentConfig
	ProductConf  *config.TencentProduct
	// contains filtered or unexported fields
}

每个产品的指标采集默认实现, 不同的逻辑通过对应的productHandler实现

func NewTcProductCollector

func NewTcProductCollector(namespace string, metricRepo metric.TcmMetricRepository, cred common.CredentialIface,
	conf *config.TencentConfig, pconf *config.TencentProduct, logger log.Logger) (*TcProductCollector, error)

创建新的TcProductCollector, 每个产品一个

func (*TcProductCollector) Collect

func (c *TcProductCollector) Collect(ch chan<- prometheus.Metric) (err error)

执行所有指标的采集

func (*TcProductCollector) LoadMetricsByMetricConf

func (c *TcProductCollector) LoadMetricsByMetricConf() error

指标纬度配置

func (*TcProductCollector) LoadMetricsByProductConf

func (c *TcProductCollector) LoadMetricsByProductConf() error

产品纬度配置

type TcProductCollectorReloader

type TcProductCollectorReloader struct {
	// contains filtered or unexported fields
}

func NewTcProductCollectorReloader

func NewTcProductCollectorReloader(ctx context.Context, collector *TcProductCollector,
	reloadInterval time.Duration, logger log.Logger) *TcProductCollectorReloader

func (*TcProductCollectorReloader) Run

func (r *TcProductCollectorReloader) Run()

func (*TcProductCollectorReloader) Stop

func (r *TcProductCollectorReloader) Stop()

type VbcHandler

type VbcHandler struct {
	// contains filtered or unexported fields
}

func (*VbcHandler) GetNamespace

func (h *VbcHandler) GetNamespace() string

func (*VbcHandler) GetSeries

func (h *VbcHandler) GetSeries(m *metric.TcmMetric) (slist []*metric.TcmSeries, err error)

func (*VbcHandler) GetSeriesByAll

func (h *VbcHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VbcHandler) GetSeriesByCustom

func (h *VbcHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VbcHandler) GetSeriesByOnly

func (h *VbcHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VbcHandler) IsMetricMetaValid

func (h *VbcHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*VbcHandler) IsMetricValid

func (h *VbcHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*VbcHandler) ModifyMetric

func (h *VbcHandler) ModifyMetric(m *metric.TcmMetric) error

func (*VbcHandler) ModifyMetricMeta

func (h *VbcHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type VpngwHandler

type VpngwHandler struct {
	// contains filtered or unexported fields
}

func (*VpngwHandler) GetNamespace

func (h *VpngwHandler) GetNamespace() string

func (*VpngwHandler) GetSeries

func (h *VpngwHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpngwHandler) GetSeriesByAll

func (h *VpngwHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpngwHandler) GetSeriesByCustom

func (h *VpngwHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpngwHandler) GetSeriesByOnly

func (h *VpngwHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpngwHandler) IsMetricMetaValid

func (h *VpngwHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*VpngwHandler) IsMetricValid

func (h *VpngwHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*VpngwHandler) ModifyMetric

func (h *VpngwHandler) ModifyMetric(m *metric.TcmMetric) error

func (*VpngwHandler) ModifyMetricMeta

func (h *VpngwHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type VpnxHandler

type VpnxHandler struct {
	// contains filtered or unexported fields
}

func (*VpnxHandler) GetNamespace

func (h *VpnxHandler) GetNamespace() string

func (*VpnxHandler) GetSeries

func (h *VpnxHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpnxHandler) GetSeriesByAll

func (h *VpnxHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpnxHandler) GetSeriesByCustom

func (h *VpnxHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpnxHandler) GetSeriesByOnly

func (h *VpnxHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*VpnxHandler) IsMetricMetaValid

func (h *VpnxHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*VpnxHandler) IsMetricValid

func (h *VpnxHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*VpnxHandler) ModifyMetric

func (h *VpnxHandler) ModifyMetric(m *metric.TcmMetric) error

func (*VpnxHandler) ModifyMetricMeta

func (h *VpnxHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type WafHandler

type WafHandler struct {
	// contains filtered or unexported fields
}

func (*WafHandler) GetNamespace

func (h *WafHandler) GetNamespace() string

func (*WafHandler) GetSeries

func (h *WafHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*WafHandler) GetSeriesByAll

func (h *WafHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*WafHandler) GetSeriesByCustom

func (h *WafHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*WafHandler) GetSeriesByOnly

func (h *WafHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*WafHandler) IsMetricMetaValid

func (h *WafHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*WafHandler) IsMetricValid

func (h *WafHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*WafHandler) ModifyMetric

func (h *WafHandler) ModifyMetric(m *metric.TcmMetric) error

func (*WafHandler) ModifyMetricMeta

func (h *WafHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

type ZookeeperHandler

type ZookeeperHandler struct {
	// contains filtered or unexported fields
}

func (*ZookeeperHandler) GetNamespace

func (h *ZookeeperHandler) GetNamespace() string

func (*ZookeeperHandler) GetSeries

func (h *ZookeeperHandler) GetSeries(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ZookeeperHandler) GetSeriesByAll

func (h *ZookeeperHandler) GetSeriesByAll(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ZookeeperHandler) GetSeriesByCustom

func (h *ZookeeperHandler) GetSeriesByCustom(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ZookeeperHandler) GetSeriesByOnly

func (h *ZookeeperHandler) GetSeriesByOnly(m *metric.TcmMetric) ([]*metric.TcmSeries, error)

func (*ZookeeperHandler) IsMetricMetaValid

func (h *ZookeeperHandler) IsMetricMetaValid(meta *metric.TcmMeta) bool

func (*ZookeeperHandler) IsMetricValid

func (h *ZookeeperHandler) IsMetricValid(m *metric.TcmMetric) bool

func (*ZookeeperHandler) ModifyMetric

func (h *ZookeeperHandler) ModifyMetric(m *metric.TcmMetric) error

func (*ZookeeperHandler) ModifyMetricMeta

func (h *ZookeeperHandler) ModifyMetricMeta(meta *metric.TcmMeta) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL