alibabacloud

package
v0.0.0-...-5c7ffcf Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

介绍

同步 aliyun cloudmonitor 的数据到 HoloInsight.
实现原理就是定时轮询 aliyun openapi 查数据, 然后写到我们, 效率很低但没有其他办法.

遇到的问题

  1. aliyun 的 openapi 一次只能查一个 metric, 一个时间区间
  2. aliyun 的 openapi 有限流, 普通用户每个月只有几百万次的免费额度; TODO 有限速吗?
  3. aliyun 的 指标非常多, 我们需要精挑细选一些有用的指标
  4. aliyun 的 数据 自身就有一定的延迟, 我们同步数据的时候最好按区间去同步

优化

  1. 区间查询 + 降频
  2. 减少指标
  3. metrics endpoints 用 aliyun 内网域名
  4. 查一下用户有没有购买对应的云产品, 如果没买就不查云产品指标了 (依赖更多阿里云api, 以及需要更高权限)

Documentation

Index

Constants

View Source
const (
	AlbNamespace = "acs_alb"
	AlbPrefix    = "alibabacloud_alb"
)

https://help.aliyun.com/document_detail/201639.html

View Source
const (
	// https://help.aliyun.com/document_detail/162844.html?spm=a2c4g.11186623.0.0.4b776c8aOiSc8z
	EcsNamespace = "acs_ecs_dashboard"
	EcsPrefix    = "alibabacloud_ecs"
)
View Source
const (
	// https://help.aliyun.com/document_detail/201596.htm?spm=a2c4g.11186623.0.0.68a41153GfPlBj#concept-2038833
	// ob的指标非常 多/乱, 有过滤的我用代码生成, 没规律的手动填写
	// 由于指标非常 多/乱, 可能存在指标遗漏/错误, 这些只能上线之后遇到反馈了再去支持
	OceanbaseNamespace = "acs_oceanbase"
	OceanbasePefix     = "alibabacloud_oceanbase"
)
View Source
const (
	RdsNamespace = "acs_rds_dashboard"
	RdsPrefix    = "alibabacloud_rds"
)
View Source
const (
	RedisNamespace = "acs_kvstore"
	RedisPrefix    = "alibabacloud_redis"
)
View Source
const (
	// 官方已经不推荐使用了
	// https://help.aliyun.com/document_detail/162852.html
	SlbNamespace = "acs_slb_dashboard"
	SlbPrefix    = "alibabacloud_slb"
)

Variables

View Source
var (
	// redis 标准版
	RedisStandardMetricNames = []*AliyunMetricDesc{

		{MetricName: "standard_avg_rt", AliyunMetricName: "StandardAvgRt", Average: true, Maximum: true},

		{MetricName: "standard_connection_usage", AliyunMetricName: "StandardConnectionUsage", Average: true, Maximum: true},

		{MetricName: "standard_cpu_usage", AliyunMetricName: "StandardCpuUsage", Average: true, Maximum: true},

		{MetricName: "standard_failed_count", AliyunMetricName: "StandardFailedCount", Average: true, Maximum: true},

		{MetricName: "standard_hit_rate", AliyunMetricName: "StandardHitRate", Average: true, Maximum: true},

		{MetricName: "standard_intranet_in", AliyunMetricName: "StandardIntranetIn", Average: true, Maximum: true},

		{MetricName: "standard_intranet_in_ratio", AliyunMetricName: "StandardIntranetInRatio", Average: true, Maximum: true},

		{MetricName: "standard_intranet_out", AliyunMetricName: "StandardIntranetOut", Average: true, Maximum: true},

		{MetricName: "standard_intranet_out_ratio", AliyunMetricName: "StandardIntranetOutRatio", Average: true, Maximum: true},

		{MetricName: "standard_keys", AliyunMetricName: "StandardKeys", Average: true, Maximum: true},

		{MetricName: "standard_max_rt", AliyunMetricName: "StandardMaxRt", Average: true, Maximum: true},

		{MetricName: "standard_memory_usage", AliyunMetricName: "StandardMemoryUsage", Average: true, Maximum: true},

		{MetricName: "standard_qps_usage", AliyunMetricName: "StandardQPSUsage", Average: true, Maximum: true},

		{MetricName: "standard_sync_delay_time", AliyunMetricName: "StandardSyncDelayTime", Average: true, Maximum: true},

		{MetricName: "standard_used_connection", AliyunMetricName: "StandardUsedConnection", Average: true, Maximum: true},

		{MetricName: "standard_used_memory", AliyunMetricName: "StandardUsedMemory", Average: true, Maximum: true},

		{MetricName: "standard_used_qps", AliyunMetricName: "StandardUsedQPS", Average: true, Maximum: true},
	}
	// redis 集群版
	RedisClusterMetricNames = []*AliyunMetricDesc{

		{MetricName: "sharding_avg_rt", AliyunMetricName: "ShardingAvgRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_connection_usage", AliyunMetricName: "ShardingConnectionUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_cpu_usage", AliyunMetricName: "ShardingCpuUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_hit_rate", AliyunMetricName: "ShardingHitRate", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_intranet_in", AliyunMetricName: "ShardingIntranetIn", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_intranet_in_ratio", AliyunMetricName: "ShardingIntranetInRatio", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_intranet_out", AliyunMetricName: "ShardingIntranetOut", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_intranet_out_ratio", AliyunMetricName: "ShardingIntranetOutRatio", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_keys", AliyunMetricName: "ShardingKeys", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_max_rt", AliyunMetricName: "ShardingMaxRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_memory_usage", AliyunMetricName: "ShardingMemoryUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_avg_request_size", AliyunMetricName: "ShardingProxyAvgRequestSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_avg_response_size", AliyunMetricName: "ShardingProxyAvgResponseSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_avg_rt", AliyunMetricName: "ShardingProxyAvgRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_connection_usage", AliyunMetricName: "ShardingProxyConnectionUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_cpu_usage", AliyunMetricName: "ShardingProxyCpuUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_intranet_in", AliyunMetricName: "ShardingProxyIntranetIn", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_intranet_out", AliyunMetricName: "ShardingProxyIntranetOut", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_max_request_size", AliyunMetricName: "ShardingProxyMaxRequestSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_max_response_size", AliyunMetricName: "ShardingProxyMaxResponseSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_max_rt", AliyunMetricName: "ShardingProxyMaxRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_total_qps", AliyunMetricName: "ShardingProxyTotalQps", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_proxy_used_connection", AliyunMetricName: "ShardingProxyUsedConnection", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_qps_usage", AliyunMetricName: "ShardingQPSUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_sync_delay_time", AliyunMetricName: "ShardingSyncDelayTime", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_used_connection", AliyunMetricName: "ShardingUsedConnection", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_used_memory", AliyunMetricName: "ShardingUsedMemory", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "sharding_used_qps", AliyunMetricName: "ShardingUsedQPS", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},
	}
	// redis 读写分离版
	RedisRwsplitMetricNames = []*AliyunMetricDesc{

		{MetricName: "splitrw_avg_rt", AliyunMetricName: "SplitrwAvgRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_connection_usage", AliyunMetricName: "SplitrwConnectionUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_cpu_usage", AliyunMetricName: "SplitrwCpuUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_failed_count", AliyunMetricName: "SplitrwFailedCount", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_hit_rate", AliyunMetricName: "SplitrwHitRate", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_intranet_in", AliyunMetricName: "SplitrwIntranetIn", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_intranet_in_ratio", AliyunMetricName: "SplitrwIntranetInRatio", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_intranet_out", AliyunMetricName: "SplitrwIntranetOut", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_intranet_out_ratio", AliyunMetricName: "SplitrwIntranetOutRatio", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_keys", AliyunMetricName: "SplitrwKeys", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_max_rt", AliyunMetricName: "SplitrwMaxRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_memory_usage", AliyunMetricName: "SplitrwMemoryUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_avg_request_size", AliyunMetricName: "SplitrwProxyAvgRequestSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_avg_response_size", AliyunMetricName: "SplitrwProxyAvgResponseSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_avg_rt", AliyunMetricName: "SplitrwProxyAvgRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_connection_usage", AliyunMetricName: "SplitrwProxyConnectionUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_cpu_usage", AliyunMetricName: "SplitrwProxyCpuUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_intranet_in", AliyunMetricName: "SplitrwProxyIntranetIn", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_intranet_out", AliyunMetricName: "SplitrwProxyIntranetOut", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_max_request_size", AliyunMetricName: "SplitrwProxyMaxRequestSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_max_response_size", AliyunMetricName: "SplitrwProxyMaxResponseSize", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_max_rt", AliyunMetricName: "SplitrwProxyMaxRt", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_total_qps", AliyunMetricName: "SplitrwProxyTotalQps", Average: true, Maximum: true},

		{MetricName: "splitrw_proxy_used_connection", AliyunMetricName: "SplitrwProxyUsedConnection", Average: true, Maximum: true},

		{MetricName: "splitrw_qps_usage", AliyunMetricName: "SplitrwQPSUsage", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_sync_delay_time", AliyunMetricName: "SplitrwSyncDelayTime", Average: true, Maximum: true},

		{MetricName: "splitrw_used_connection", AliyunMetricName: "SplitrwUsedConnection", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_used_memory", AliyunMetricName: "SplitrwUsedMemory", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},

		{MetricName: "splitrw_used_qps", AliyunMetricName: "SplitrwUsedQPS", Dimensions: []string{"nodeId"}, Average: true, Maximum: true},
	}
)
View Source
var (
	AlbMetricNames = []*AliyunMetricDesc{

		{MetricName: "listener_active_connection", AliyunMetricName: "ListenerActiveConnection", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_client_tls_negotiation_error", AliyunMetricName: "ListenerClientTLSNegotiationError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_2xx", AliyunMetricName: "ListenerHTTPCode2XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_3xx", AliyunMetricName: "ListenerHTTPCode3XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_4xx", AliyunMetricName: "ListenerHTTPCode4XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_500", AliyunMetricName: "ListenerHTTPCode500", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_502", AliyunMetricName: "ListenerHTTPCode502", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_503", AliyunMetricName: "ListenerHTTPCode503", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_504", AliyunMetricName: "ListenerHTTPCode504", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_5xx", AliyunMetricName: "ListenerHTTPCode5XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_upstream_2xx", AliyunMetricName: "ListenerHTTPCodeUpstream2XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_upstream_3xx", AliyunMetricName: "ListenerHTTPCodeUpstream3XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_upstream_4xx", AliyunMetricName: "ListenerHTTPCodeUpstream4XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_code_upstream_5xx", AliyunMetricName: "ListenerHTTPCodeUpstream5XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_fixed_response", AliyunMetricName: "ListenerHTTPFixedResponse", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_http_redirect", AliyunMetricName: "ListenerHTTPRedirect", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_healthy_host_count", AliyunMetricName: "ListenerHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_in_bits", AliyunMetricName: "ListenerInBits", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_new_connection", AliyunMetricName: "ListenerNewConnection", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_non_sticky_request", AliyunMetricName: "ListenerNonStickyRequest", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_out_bits", AliyunMetricName: "ListenerOutBits", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_qps", AliyunMetricName: "ListenerQPS", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_rejected_connection", AliyunMetricName: "ListenerRejectedConnection", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_un_healthy_host_count", AliyunMetricName: "ListenerUnHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_upstream_connection_error", AliyunMetricName: "ListenerUpstreamConnectionError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_upstream_response_time", AliyunMetricName: "ListenerUpstreamResponseTime", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "listener_upstream_tls_negotiation_error", AliyunMetricName: "ListenerUpstreamTLSNegotiationError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort"}, Value: true},

		{MetricName: "load_balancer_active_connection", AliyunMetricName: "LoadBalancerActiveConnection", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_client_tls_negotiation_error", AliyunMetricName: "LoadBalancerClientTLSNegotiationError", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_2xx", AliyunMetricName: "LoadBalancerHTTPCode2XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_3xx", AliyunMetricName: "LoadBalancerHTTPCode3XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_4xx", AliyunMetricName: "LoadBalancerHTTPCode4XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_500", AliyunMetricName: "LoadBalancerHTTPCode500", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_502", AliyunMetricName: "LoadBalancerHTTPCode502", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_503", AliyunMetricName: "LoadBalancerHTTPCode503", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_504", AliyunMetricName: "LoadBalancerHTTPCode504", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_5xx", AliyunMetricName: "LoadBalancerHTTPCode5XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_upstream_2xx", AliyunMetricName: "LoadBalancerHTTPCodeUpstream2XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_upstream_3xx", AliyunMetricName: "LoadBalancerHTTPCodeUpstream3XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_upstream_4xx", AliyunMetricName: "LoadBalancerHTTPCodeUpstream4XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_code_upstream_5xx", AliyunMetricName: "LoadBalancerHTTPCodeUpstream5XX", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_fixed_response", AliyunMetricName: "LoadBalancerHTTPFixedResponse", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_http_redirect", AliyunMetricName: "LoadBalancerHTTPRedirect", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_healthy_host_count", AliyunMetricName: "LoadBalancerHealthyHostCount", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_in_bits", AliyunMetricName: "LoadBalancerInBits", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_new_connection", AliyunMetricName: "LoadBalancerNewConnection", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_non_sticky_request", AliyunMetricName: "LoadBalancerNonStickyRequest", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_out_bits", AliyunMetricName: "LoadBalancerOutBits", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_qps", AliyunMetricName: "LoadBalancerQPS", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_rejected_connection", AliyunMetricName: "LoadBalancerRejectedConnection", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_un_healthy_host_count", AliyunMetricName: "LoadBalancerUnHealthyHostCount", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_upstream_connection_error", AliyunMetricName: "LoadBalancerUpstreamConnectionError", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_upstream_response_time", AliyunMetricName: "LoadBalancerUpstreamResponseTime", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "load_balancer_upstream_tls_negotiation_error", AliyunMetricName: "LoadBalancerUpstreamTLSNegotiationError", Dimensions: []string{"loadBalancerId"}, Value: true},

		{MetricName: "rule_http_code_upstream_2xx", AliyunMetricName: "RuleHTTPCodeUpstream2XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_3xx", AliyunMetricName: "RuleHTTPCodeUpstream3XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_4xx", AliyunMetricName: "RuleHTTPCodeUpstream4XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_5xx", AliyunMetricName: "RuleHTTPCodeUpstream5XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_healthy_host_count", AliyunMetricName: "RuleHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_non_sticky_request", AliyunMetricName: "RuleNonStickyRequest", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_qps", AliyunMetricName: "RuleQPS", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_un_healthy_host_count", AliyunMetricName: "RuleUnHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_upstream_connection_error", AliyunMetricName: "RuleUpstreamConnectionError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_upstream_response_time", AliyunMetricName: "RuleUpstreamResponseTime", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_upstream_tls_negotiation_error", AliyunMetricName: "RuleUpstreamTLSNegotiationError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "server_group_http_code_upstream_2xx", AliyunMetricName: "ServerGroupHTTPCodeUpstream2XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_http_code_upstream_3xx", AliyunMetricName: "ServerGroupHTTPCodeUpstream3XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_http_code_upstream_4xx", AliyunMetricName: "ServerGroupHTTPCodeUpstream4XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_http_code_upstream_5xx", AliyunMetricName: "ServerGroupHTTPCodeUpstream5XX", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_healthy_host_count", AliyunMetricName: "ServerGroupHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_non_sticky_request", AliyunMetricName: "ServerGroupNonStickyRequest", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_qps", AliyunMetricName: "ServerGroupQPS", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_un_healthy_host_count", AliyunMetricName: "ServerGroupUnHealthyHostCount", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_upstream_connection_error", AliyunMetricName: "ServerGroupUpstreamConnectionError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_upstream_response_time", AliyunMetricName: "ServerGroupUpstreamResponseTime", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "server_group_upstream_tls_negotiation_error", AliyunMetricName: "ServerGroupUpstreamTLSNegotiationError", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "serverGroupId"}, Value: true},

		{MetricName: "rule_http_code_upstream_2xx_ratio", AliyunMetricName: "RuleHTTPCodeUpstream2XXRatio", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_3xx_ratio", AliyunMetricName: "RuleHTTPCodeUpstream3XXRatio", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_4xx_ratio", AliyunMetricName: "RuleHTTPCodeUpstream4XXRatio", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},

		{MetricName: "rule_http_code_upstream_5xx_ratio", AliyunMetricName: "RuleHTTPCodeUpstream5XXRatio", Dimensions: []string{"loadBalancerId", "listenerProtocol", "listenerPort", "ruleId"}, Value: true},
	}
)
View Source
var (
	EcsMetricNames = []*AliyunMetricDesc{

		{MetricName: "cpu_utilization", AliyunMetricName: "CPUUtilization", Average: true},

		{MetricName: "disk_read_bps", AliyunMetricName: "DiskReadBPS", Average: true},

		{MetricName: "disk_read_iops", AliyunMetricName: "DiskReadIOPS", Average: true},

		{MetricName: "disk_write_bps", AliyunMetricName: "DiskWriteBPS", Average: true},

		{MetricName: "disk_write_iops", AliyunMetricName: "DiskWriteIOPS", Average: true},

		{MetricName: "internet_in_rate", AliyunMetricName: "InternetInRate", Average: true},

		{MetricName: "internet_out_rate", AliyunMetricName: "InternetOutRate", Average: true},

		{MetricName: "internet_out_rate_percent", AliyunMetricName: "InternetOutRate_Percent", Average: true},

		{MetricName: "intranet_in_rate", AliyunMetricName: "IntranetInRate", Average: true},

		{MetricName: "intranet_out_rate", AliyunMetricName: "IntranetOut", Average: true},

		{MetricName: "concurrent_connections", AliyunMetricName: "concurrentConnections", Maximum: true},

		{MetricName: "cpu_cores", AliyunMetricName: "cpu_cores", Value: true},

		{MetricName: "cpu_idle", AliyunMetricName: "cpu_idle", Average: true},
		{MetricName: "cpu_other", AliyunMetricName: "cpu_other", Average: true},
		{MetricName: "cpu_system", AliyunMetricName: "cpu_system", Average: true},
		{MetricName: "cpu_total", AliyunMetricName: "cpu_total", Average: true},
		{MetricName: "cpu_user", AliyunMetricName: "cpu_user", Average: true},
		{MetricName: "cpu_wait", AliyunMetricName: "cpu_wait", Average: true},

		{MetricName: "disk_readbytes", AliyunMetricName: "disk_readbytes", Average: true},

		{MetricName: "disk_readiops", AliyunMetricName: "disk_readiops", Average: true},

		{MetricName: "disk_writebytes", AliyunMetricName: "disk_writebytes", Average: true},

		{MetricName: "disk_writeiops", AliyunMetricName: "disk_writeiops", Average: true},

		{MetricName: "diskusage_avail", AliyunMetricName: "diskusage_avail", Average: true},

		{MetricName: "load_1m", AliyunMetricName: "load_1m", Average: true},
		{MetricName: "load_5m", AliyunMetricName: "load_5m", Average: true},
		{MetricName: "load_15m", AliyunMetricName: "load_15m", Average: true},

		{MetricName: "memory_totalspace", AliyunMetricName: "memory_totalspace", Average: true},

		{MetricName: "memory_usedspace", AliyunMetricName: "memory_usedspace", Average: true},

		{MetricName: "memory_freespace", AliyunMetricName: "memory_freespace", Average: true},

		{MetricName: "memory_freeutilization", AliyunMetricName: "memory_freeutilization", Average: true},

		{MetricName: "memory_usedutilization", AliyunMetricName: "memory_usedutilization", Average: true},
	}
)
View Source
var (
	OceanbaseMetricNames = []*AliyunMetricDesc{

		{MetricName: "disk_ob_data_usage", AliyunMetricName: "disk_ob_data_usage", Max: true, Dimensions: clusterDimensions},
		{MetricName: "disk_ob_data_size_instance", AliyunMetricName: "disk_ob_data_size_instance", Average: true, Dimensions: instanceDimensions},
		{MetricName: "disk_ob_data_usage_instance", AliyunMetricName: "disk_ob_data_usage_instance", Average: true, Dimensions: instanceDimensions},
		{MetricName: "load_load1_instance", AliyunMetricName: "load_load1_instance", Average: true, Dimensions: instanceDimensions},
	}
)
View Source
var (
	RdsMetricNames = []*AliyunMetricDesc{

		{MetricName: "connection_usage", AliyunMetricName: "ConnectionUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "cpu_usage", AliyunMetricName: "CpuUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "data_delay", AliyunMetricName: "DataDelay", Average: true, Minimum: true, Maximum: true},

		{MetricName: "disk_usage", AliyunMetricName: "DiskUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "iops_usage", AliyunMetricName: "IOPSUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "memory_usage", AliyunMetricName: "MemoryUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_active_sessions", AliyunMetricName: "MySQL_ActiveSessions", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_delete", AliyunMetricName: "MySQL_ComDelete", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_insert", AliyunMetricName: "MySQL_ComInsert", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_insert_select", AliyunMetricName: "MySQL_ComInsertSelect", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_replace", AliyunMetricName: "MySQL_ComReplace", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_replace_select", AliyunMetricName: "MySQL_ComReplaceSelect", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_select", AliyunMetricName: "MySQL_ComSelect", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_com_update", AliyunMetricName: "MySQL_ComUpdate", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_data_disk_size", AliyunMetricName: "MySQL_DataDiskSize", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_ibuf_dirty_ratio", AliyunMetricName: "MySQL_IbufDirtyRatio", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_ibuf_read_hit", AliyunMetricName: "MySQL_IbufReadHit", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_ibuf_request_r", AliyunMetricName: "MySQL_IbufRequestR", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_ibuf_request_w", AliyunMetricName: "MySQL_IbufRequestW", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_ibuf_use_ratio", AliyunMetricName: "MySQL_IbufUseRatio", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_data_read", AliyunMetricName: "MySQL_InnoDBDataRead", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_data_written", AliyunMetricName: "MySQL_InnoDBDataWritten", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_log_fsync", AliyunMetricName: "MySQL_InnoDBLogFsync", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_log_write_requests", AliyunMetricName: "MySQL_InnoDBLogWriteRequests", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_log_writes", AliyunMetricName: "MySQL_InnoDBLogWrites", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_row_delete", AliyunMetricName: "MySQL_InnoDBRowDelete", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_row_insert", AliyunMetricName: "MySQL_InnoDBRowInsert", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_row_read", AliyunMetricName: "MySQL_InnoDBRowRead", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_inno_db_row_update", AliyunMetricName: "MySQL_InnoDBRowUpdate", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_instance_disk_size", AliyunMetricName: "MySQL_InstanceDiskSize", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_log_disk_size", AliyunMetricName: "MySQL_LogDiskSize", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_network_in_new", AliyunMetricName: "MySQL_NetworkInNew", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_network_out_new", AliyunMetricName: "MySQL_NetworkOutNew", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_other_disk_size", AliyunMetricName: "MySQL_OtherDiskSize", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_proxy_cpu_usage", AliyunMetricName: "MySQL_ProxyCpuUsage", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_qps", AliyunMetricName: "MySQL_QPS", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_slave_io_running", AliyunMetricName: "MySQL_SlaveIORunning", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_slave_sql_running", AliyunMetricName: "MySQL_SlaveSQLRunning", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_slow_queries", AliyunMetricName: "MySQL_SlowQueries", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_tps", AliyunMetricName: "MySQL_TPS", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_temp_disk_table_creates", AliyunMetricName: "MySQL_TempDiskTableCreates", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_threads_connected", AliyunMetricName: "MySQL_ThreadsConnected", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_threads_running", AliyunMetricName: "MySQL_ThreadsRunning", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysql_tmp_disk_size", AliyunMetricName: "MySQL_TmpDiskSize", Average: true, Minimum: true, Maximum: true},

		{MetricName: "mysqlibuf_pool_reads", AliyunMetricName: "MySQL_ibufPoolReads", Average: true, Minimum: true, Maximum: true},

		{MetricName: "sqlserver_network_in_new", AliyunMetricName: "SQLServer_NetworkInNew", Average: true, Minimum: true, Maximum: true},

		{MetricName: "sqlserver_network_out_new", AliyunMetricName: "SQLServer_NetworkOutNew", Average: true, Minimum: true, Maximum: true},
	}
)
View Source
var (
	SlbMetricNames = []*AliyunMetricDesc{

		{MetricName: "active_connection", AliyunMetricName: "ActiveConnection", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "drop_connection", AliyunMetricName: "DropConnection", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "drop_packet_rx", AliyunMetricName: "DropPacketRX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "drop_packet_tx", AliyunMetricName: "DropPacketTX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "drop_traffic_rx", AliyunMetricName: "DropTrafficRX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "drop_traffic_tx", AliyunMetricName: "DropTrafficTX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "group_active_connection", AliyunMetricName: "GroupActiveConnection", Dimensions: []string{"groupId"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "group_new_connection", AliyunMetricName: "GroupNewConnection", Dimensions: []string{"groupId"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "group_total_traffic_rx", AliyunMetricName: "GroupTotalTrafficRX", Dimensions: []string{"groupId"}, Value: true},

		{MetricName: "group_total_traffic_tx", AliyunMetricName: "GroupTotalTrafficTX", Dimensions: []string{"groupId"}, Value: true},

		{MetricName: "group_traffic_rx", AliyunMetricName: "GroupTrafficRX", Dimensions: []string{"groupId"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "group_traffic_tx", AliyunMetricName: "GroupTrafficTX", Dimensions: []string{"groupId"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "group_unhealthy_server_count", AliyunMetricName: "GroupUnhealthyServerCount", Dimensions: []string{"groupId"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "healthy_server_count_with_rule", AliyunMetricName: "HealthyServerCountWithRule", Dimensions: []string{"port", "vip", "domain", "url"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "heathy_server_count", AliyunMetricName: "HeathyServerCount", Dimensions: []string{"port", "vip"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "inactive_connection", AliyunMetricName: "InactiveConnection", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_active_connection", AliyunMetricName: "InstanceActiveConnection", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_drop_connection", AliyunMetricName: "InstanceDropConnection", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_drop_packet_rx", AliyunMetricName: "InstanceDropPacketRX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_drop_packet_tx", AliyunMetricName: "InstanceDropPacketTX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_drop_traffic_rx", AliyunMetricName: "InstanceDropTrafficRX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_drop_traffic_tx", AliyunMetricName: "InstanceDropTrafficTX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_inactive_connection", AliyunMetricName: "InstanceInactiveConnection", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_max_connection", AliyunMetricName: "InstanceMaxConnection", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_max_connection_utilization", AliyunMetricName: "InstanceMaxConnectionUtilization", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_new_connection", AliyunMetricName: "InstanceNewConnection", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_new_connection_utilization", AliyunMetricName: "InstanceNewConnectionUtilization", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_packet_rx", AliyunMetricName: "InstancePacketRX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_packet_tx", AliyunMetricName: "InstancePacketTX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_qps", AliyunMetricName: "InstanceQps", Average: true},

		{MetricName: "instance_qps_utilization", AliyunMetricName: "InstanceQpsUtilization", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_rt", AliyunMetricName: "InstanceRt", Average: true},

		{MetricName: "instance_status_code_2xx", AliyunMetricName: "InstanceStatusCode2xx", Average: true},

		{MetricName: "instance_status_code_3xx", AliyunMetricName: "InstanceStatusCode3xx", Average: true},

		{MetricName: "instance_status_code_4xx", AliyunMetricName: "InstanceStatusCode4xx", Average: true},

		{MetricName: "instance_status_code_5xx", AliyunMetricName: "InstanceStatusCode5xx", Average: true},

		{MetricName: "instance_status_code_other", AliyunMetricName: "InstanceStatusCodeOther", Average: true},

		{MetricName: "instance_traffic_rx", AliyunMetricName: "InstanceTrafficRX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_traffic_tx", AliyunMetricName: "InstanceTrafficTX", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_traffic_tx_utilization", AliyunMetricName: "InstanceTrafficTXUtilization", Average: true, Minimum: true, Maximum: true},

		{MetricName: "instance_upstream_code_4xx", AliyunMetricName: "InstanceUpstreamCode4xx", Average: true},

		{MetricName: "instance_upstream_code_5xx", AliyunMetricName: "InstanceUpstreamCode5xx", Average: true},

		{MetricName: "instance_upstream_rt", AliyunMetricName: "InstanceUpstreamRt", Average: true},

		{MetricName: "max_connection", AliyunMetricName: "MaxConnection", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "new_connection", AliyunMetricName: "NewConnection", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "packet_rx", AliyunMetricName: "PacketRX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "packet_tx", AliyunMetricName: "PacketTX", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "qps", AliyunMetricName: "Qps", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "rt", AliyunMetricName: "Rt", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "status_code_2xx", AliyunMetricName: "StatusCode2xx", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "status_code_3xx", AliyunMetricName: "StatusCode3xx", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "status_code_4xx", AliyunMetricName: "StatusCode4xx", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "status_code_5xx", AliyunMetricName: "StatusCode5xx", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "status_code_other", AliyunMetricName: "StatusCodeOther", Dimensions: []string{"port", "protocol"}, Average: true},

		{MetricName: "traffic_rx_new", AliyunMetricName: "TrafficRXNew", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "traffic_tx_new", AliyunMetricName: "TrafficTXNew", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "unhealthy_server_count", AliyunMetricName: "UnhealthyServerCount", Dimensions: []string{"port", "vip"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "unhealthy_server_count_with_rule", AliyunMetricName: "UnhealthyServerCountWithRule", Dimensions: []string{"port", "vip", "domain", "url"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "upstream_code_4xx", AliyunMetricName: "UpstreamCode4xx", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "upstream_code_5xx", AliyunMetricName: "UpstreamCode5xx", Dimensions: []string{"port", "protocol"}, Average: true, Minimum: true, Maximum: true},

		{MetricName: "upstream_rt", AliyunMetricName: "UpstreamRt", Dimensions: []string{"port", "protocol"}, Average: true},
	}
)

Functions

This section is empty.

Types

type AliyunMetric

type AliyunMetric struct {
	Name      string
	Tags      map[string]string
	Timestamp int64
	Value     map[string]float64
}

type AliyunMetricDesc

type AliyunMetricDesc struct {
	MetricName       string
	AliyunMetricName string
	Dimensions       []string
	Average          bool
	Minimum          bool
	Maximum          bool
	Value            bool
	Sum              bool
	Max              bool
}

type AliyunMetricsService

type AliyunMetricsService struct {
}

func (*AliyunMetricsService) DescribeMetricList

func (*AliyunMetricsService) DescribeMetricList2

func (s *AliyunMetricsService) DescribeMetricList2(ratelimiter ratelimit.Limiter, request *DescribeMetricList2Request) ([]*AliyunMetric, error)

func (*AliyunMetricsService) GetClient

func (s *AliyunMetricsService) GetClient(endpoint, ak, sk string) (*cms20190101.Client, error)

type DescribeMetricList2Request

type DescribeMetricList2Request struct {
	Start            time.Time
	End              time.Time
	Namespace        string
	Name             string
	Endpoint, Ak, Sk string
}

type DescribeMetricListResponse_Datapoint

type DescribeMetricListResponse_Datapoint struct {
	Timestamp  int64   `json:"timestamp"`
	InstanceId string  `json:"instanceId"`
	UserId     string  `json:"userId"`
	Minimum    float64 `json:"Minimum"`
	Maximum    float64 `json:"Maximum"`
	Average    float64 `json:"Average"`
}

Jump to

Keyboard shortcuts

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