diff --git a/README.md b/README.md index 7df08c5..4cfd0fa 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,14 @@ global: metrics_conf_path: "/root/metrics.yml" # This is optional. We recommend that you use an absolute path for the metrics configuration file path. If this line is absent, the program will use configuration file in the directory where the startup command is executed by default. endpoints_conf_path: "/root/endpoints.yml" # This is optional. We recommend that you use an absolute path for the service endpoints configuration file path. If this line is absent, the program will use configuration file in the directory where the startup command is executed by default. ignore_ssl_verify: false # This is optional. The SSL certificate is verified by default when the exporter queries resources or indicators. If the exporter is abnormal due to SSL certificate verification, you can set this configuration to true to skip SSL certificate verification. + + # This is optional. You can replace the proxy schema, host and port in the example below according to actual situation. + proxy_schema: "http" + proxy_host: "proxy.huaweicloud.com" + proxy_port: 8080 + # This is optional. If the proxy requires authentication, please configure the username and password + proxy_username: "username" + proxy_password: "password" auth: auth_url: "https://iam.{region_id}.myhuaweicloud.com/v3" project_name: "{project_name}" diff --git a/README_cn.md b/README_cn.md index 64115ae..e09e85b 100644 --- a/README_cn.md +++ b/README_cn.md @@ -52,6 +52,14 @@ Prometheus是用于展示大型测量数据的开源可视化工具,在工业 |智能数据湖运营平台|SYS.DAYU |√|云服务| |云防火墙|SYS.CFW |√|RMS| |广域网质量监控|SYS.WANQMonitor |√|云服务| +|云日志服务|SYS.LTS |×|云服务| +|视频直播|SYS.LIVE |×|云服务| +|云原生应用网络|SYS.ANC|√|RMS| +|企业主机安全|SYS.HSS|×|云服务| +|表格存储服务|SYS.CloudTable|×|云服务| +|事件网格|SYS.EG|√|RMS| +|对象存储服务|SYS.OBS|√|RMS| +|云解析服务|SYS.DNS|√|云服务| 注:自定义标签时,key只能包含大写字母、小写字母以及中划线 @@ -90,6 +98,14 @@ global: metrics_conf_path: "/root/metric.yml" # 可选配置,指定指标配置文件路径,建议使用绝对路径。若未指定,程序将默认使用执行启动命令所在目录下的指标配置文件。 endpoints_conf_path: "/root/endpoints.yml" # 可选配置,指定服务域名配置文件路径,建议使用绝对路径。若未指定,程序将默认使用执行启动命令所在目录下的服务域名配置文件。 ignore_ssl_verify: false # 可选配置,exporter查询资源/指标时默认校验ssl证书;若用户因ssl证书校验导致功能异常,可将该配置项配置为true跳过ssl证书校验 + + # 可选配置,根据实际情况替换示例中的代理协议、地址和端口号 + proxy_schema: "http" + proxy_host: "proxy.huaweicloud.com" + proxy_port: 8080 + # 可选配置,如果代理需要认证,请配置用户名和密码 + proxy_username: "username" + proxy_password: "password" auth: auth_url: "https://iam.{region_id}.myhuaweicloud.com/v3" project_name: "cn-north-1" # 华为云项目名称,可以在“华为云->统一身份认证服务->项目”中查看 diff --git a/clouds.yml b/clouds.yml index af06d24..665d327 100644 --- a/clouds.yml +++ b/clouds.yml @@ -3,6 +3,11 @@ global: scrape_batch_size: 300 resource_sync_interval_minutes: 180 ignore_ssl_verify: false + proxy_schema: "" + proxy_host: "" + proxy_port: 0 + proxy_username: "" + proxy_password: "" auth: auth_url: "https://iam.xxx.yyy.com/v3" project_name: "{project_name}" diff --git a/collector/apic.go b/collector/apic.go index a62e756..e12a895 100644 --- a/collector/apic.go +++ b/collector/apic.go @@ -5,7 +5,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" apig "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/apig/v2" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/apig/v2/model" cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" @@ -174,6 +173,6 @@ func showDetailsOfInstanceV2(instanceID string) (*model.ShowDetailsOfInstanceV2R func getAPICSClient() *apig.ApigClient { return apig.NewApigClient(apig.ApigClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("apig", "v2")).Build()) } diff --git a/collector/apig.go b/collector/apig.go index 6939d9f..87a7d86 100644 --- a/collector/apig.go +++ b/collector/apig.go @@ -6,7 +6,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def" apig "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/apig/v2" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" @@ -122,6 +121,6 @@ func getAllAPIGAppsInstances() ([]APIGAppsInfo, error) { func getAPIGSClient() *apig.ApigClient { return apig.NewApigClient(apig.ApigClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("apig", "v1.0")).Build()) } diff --git a/collector/cbr.go b/collector/cbr.go index 50f966e..858bb69 100644 --- a/collector/cbr.go +++ b/collector/cbr.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" cbr "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cbr/v1" cbrmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cbr/v1/model" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" @@ -89,6 +88,6 @@ func getAllCbrInstancesFromCBR() ([]ResourceBaseInfo, error) { func getCBRClient() *cbr.CbrClient { return cbr.NewCbrClient(cbr.CbrClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("cbr", "v3")).Build()) } diff --git a/collector/cc.go b/collector/cc.go index e1aec84..8832d12 100644 --- a/collector/cc.go +++ b/collector/cc.go @@ -6,7 +6,6 @@ import ( http_client "github.com/huaweicloud/huaweicloud-sdk-go-v3/core" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" cc "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3/model" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3/region" @@ -164,7 +163,7 @@ func getCCClient() *cc.CcClient { func getCCClientBuilder() *http_client.HcHttpClientBuilder { builder := cc.CcClientBuilder().WithCredential(global.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithDomainId(conf.DomainID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) if endpoint, ok := endpointConfig["cc"]; ok { builder.WithEndpoint(endpoint) } else { diff --git a/collector/cdm.go b/collector/cdm.go index 848d9e2..08f9257 100644 --- a/collector/cdm.go +++ b/collector/cdm.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" cdm "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdm/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdm/v1/model" cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" @@ -49,7 +48,7 @@ func (getter CDMInfo) GetResourceInfo() (map[string]labelInfo, []cesmodel.Metric func getCDMClient() *cdm.CdmClient { return cdm.NewCdmClient(cdm.CdmClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("cdm", "v1.1")).Build()) } diff --git a/collector/cloudtable.go b/collector/cloudtable.go new file mode 100644 index 0000000..ccb45c6 --- /dev/null +++ b/collector/cloudtable.go @@ -0,0 +1,75 @@ +package collector + +import ( + "time" + + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" + cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + clouttable "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtable/v2" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtable/v2/model" + + "github.com/huaweicloud/cloudeye-exporter/logs" +) + +var cloudTableInfo serversInfo + +type CloudTableInfo struct{} + +func getCloudTableClient() *clouttable.CloudTableClient { + return clouttable.NewCloudTableClient(clouttable.CloudTableClientBuilder().WithCredential( + basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithEndpoint(getEndpoint("cloudtable", "v2")).Build()) +} + +func (ct CloudTableInfo) GetResourceInfo() (map[string]labelInfo, []cesmodel.MetricInfoList) { + resourceInfos := map[string]labelInfo{} + cloudTableInfo.Lock() + defer cloudTableInfo.Unlock() + if cloudTableInfo.LabelInfo == nil || time.Now().Unix() > cloudTableInfo.TTL { + clusters := GetClusterInfo() + for _, cluster := range clusters { + info := labelInfo{ + Name: []string{"clusterName"}, + Value: []string{*cluster.ClusterName}, + } + resourceInfos[*cluster.ClusterId] = info + } + allMetrics, err := listAllMetrics("SYS.CloudTable") + if err != nil { + logs.Logger.Errorf("[%s] Get all metrics of SYS.CloudTable error: %s", err.Error()) + return cloudTableInfo.LabelInfo, cloudTableInfo.FilterMetrics + } + for _, metric := range allMetrics { + if info, ok := resourceInfos[metric.Dimensions[0].Value]; ok { + resourceInfos[GetResourceKeyFromMetricInfo(metric)] = info + } + } + cloudTableInfo.LabelInfo = resourceInfos + cloudTableInfo.FilterMetrics = allMetrics + cloudTableInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return cloudTableInfo.LabelInfo, cloudTableInfo.FilterMetrics +} + +func GetClusterInfo() []model.ClusterDetail { + cloudTableClusterLimit := int32(100) + cloudTableClusterOffset := int32(0) + request := &model.ListClustersRequest{Limit: &cloudTableClusterLimit, Offset: &cloudTableClusterOffset} + var clusters []model.ClusterDetail + for { + response, err := getCloudTableClient().ListClusters(request) + if err != nil { + logs.Logger.Errorf("list cloud table clusters error: %s, limit: %d, offset: %d", err.Error(), + *request.Limit, *request.Offset) + return clusters + } + tempClusters := *response.Clusters + if len(tempClusters) == 0 { + break + } + clusters = append(clusters, tempClusters...) + *request.Offset += cloudTableClusterLimit + } + return clusters +} diff --git a/collector/cloudtable_test.go b/collector/cloudtable_test.go new file mode 100644 index 0000000..decc912 --- /dev/null +++ b/collector/cloudtable_test.go @@ -0,0 +1,60 @@ +package collector + +import ( + "errors" + "testing" + + "github.com/agiledragon/gomonkey/v2" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def" + cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cloudtable/v2/model" + "github.com/stretchr/testify/assert" +) + +func TestCloudTableInfo_GetResourceInfo(t *testing.T) { + clusterID := "cls-0001" + clusterName := "cluster1" + respPage1 := model.ListClustersResponse{ + HttpStatusCode: 200, + Clusters: &[]model.ClusterDetail{ + {ClusterId: &clusterID, ClusterName: &clusterName}, + }, + } + respPage2 := model.ListClustersResponse{ + HttpStatusCode: 200, + Clusters: &[]model.ClusterDetail{}, + } + cloudTableClient := getCloudTableClient() + patches := gomonkey.NewPatches() + defer patches.Reset() + patches.ApplyMethodFunc(cloudTableClient.HcClient, "Sync", func(req interface{}, reqDef *def.HttpRequestDef) (interface{}, error) { + request, ok := req.(*model.ListClustersRequest) + if !ok { + return nil, errors.New("test error") + } + if *request.Offset == 0 { + return &respPage1, nil + } + return &respPage2, nil + }) + patches.ApplyFuncReturn(listAllMetrics, []cesmodel.MetricInfoList{ + { + Namespace: "SYS.CloudTable", + MetricName: "cmdProcessCPU", + Dimensions: []cesmodel.MetricsDimension{ + { + Name: "cluster_id", + Value: "cls-0001", + }, + { + Name: "instance_name", + Value: "server-1-1", + }, + }, + }, + }, nil) + var getter CloudTableInfo + resourceInfos, filteredMetrics := getter.GetResourceInfo() + assert.NotNil(t, resourceInfos) + assert.NotNil(t, filteredMetrics) +} diff --git a/collector/common.go b/collector/common.go new file mode 100644 index 0000000..4e9c17e --- /dev/null +++ b/collector/common.go @@ -0,0 +1,35 @@ +package collector + +import ( + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" +) + +func GetHttpConfig() *config.HttpConfig { + httpConfig := config.DefaultHttpConfig() + if !isProxyValid() { + return httpConfig + } + + global := CloudConf.Global + proxy := config.Proxy{ + Schema: global.HttpSchema, + Host: global.HttpHost, + Port: global.HttpPort, + } + if isUserInfoValid() { + proxy.Username = global.UserName + proxy.Password = global.Password + } + httpConfig.HttpProxy = &proxy + return httpConfig +} + +func isProxyValid() bool { + global := CloudConf.Global + return global.HttpSchema != "" && global.HttpHost != "" && global.HttpPort > 0 +} + +func isUserInfoValid() bool { + global := CloudConf.Global + return global.UserName != "" && global.Password != "" +} diff --git a/collector/config.go b/collector/config.go index 4695694..96dfc11 100644 --- a/collector/config.go +++ b/collector/config.go @@ -10,7 +10,6 @@ import ( "strings" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" v3 "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/model" "gopkg.in/yaml.v3" @@ -42,6 +41,13 @@ type Global struct { LogsConfPath string `yaml:"logs_conf_path"` EndpointsConfPath string `yaml:"endpoints_conf_path"` IgnoreSSLVerify bool `yaml:"ignore_ssl_verify"` + + // 用户配置的proxy信息 + HttpSchema string `yaml:"proxy_schema"` + HttpHost string `yaml:"proxy_host"` + HttpPort int `yaml:"proxy_port"` + UserName string `yaml:"proxy_username"` + Password string `yaml:"proxy_password"` } type CloudConfig struct { @@ -233,7 +239,7 @@ func getProjectInfo() (*model.KeystoneListProjectsResponse, error) { WithAk(conf.AccessKey). WithSk(conf.SecretKey). Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). Build()) return iamclient.KeystoneListProjects(&model.KeystoneListProjectsRequest{Name: &conf.ProjectName}) } diff --git a/collector/ddms.go b/collector/ddms.go index afa1ebc..d611ac3 100644 --- a/collector/ddms.go +++ b/collector/ddms.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" ddm "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ddm/v1" ddmmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ddm/v1/model" @@ -114,6 +113,6 @@ func getDdmsInstanceNodes(instanceId string) ([]ddmmodel.ShowNodeResponse, error func getDDMSClient() *ddm.DdmClient { return ddm.NewDdmClient(ddm.DdmClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("ddm", "v1")).Build()) } diff --git a/collector/ddos.go b/collector/ddos.go index b09586c..7c8fd20 100644 --- a/collector/ddos.go +++ b/collector/ddos.go @@ -3,6 +3,9 @@ package collector import ( "time" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" + aad "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aad/v1" + aadmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aad/v1/model" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" "github.com/huaweicloud/cloudeye-exporter/logs" @@ -12,32 +15,44 @@ var ddosInfo serversInfo type DDOSInfo struct{} +func getDDOSClient() *aad.AadClient { + return aad.NewAadClient(aad.AadClientBuilder().WithCredential( + global.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithDomainId(conf.DomainID).Build()). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithEndpoint(getEndpoint("ddos", "v1")).Build()) +} + func (getter DDOSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInfoList) { resourceInfos := map[string]labelInfo{} filterMetrics := make([]model.MetricInfoList, 0) ddosInfo.Lock() defer ddosInfo.Unlock() if ddosInfo.LabelInfo == nil || time.Now().Unix() > ddosInfo.TTL { - instances, err := getAllDDosInstancesFromRMS() + sysConfigMap := getMetricConfigMap("SYS.DDOS") + if sysConfigMap == nil { + return ddosInfo.LabelInfo, ddosInfo.FilterMetrics + } + + // 查询aad实例并封装资源+指标查询条件 + instances, err := getResourcesBaseInfoFromRMS("aad", "instances") if err != nil { logs.Logger.Errorf("Get All DDos Instances error: %s", err.Error()) return ddosInfo.LabelInfo, ddosInfo.FilterMetrics } - sysConfigMap := getMetricConfigMap("SYS.DDOS") - for _, instance := range instances { - if metricNames, ok := sysConfigMap["instance_id"]; ok { - metrics := buildSingleDimensionMetrics(metricNames, "SYS.DDOS", "instance_id", instance.ID) - filterMetrics = append(filterMetrics, metrics...) - info := labelInfo{ - Name: []string{"name", "epId"}, - Value: []string{instance.Name, instance.EpId}, - } - keys, values := getTags(instance.Tags) - info.Name = append(info.Name, keys...) - info.Value = append(info.Value, values...) - resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info - } - } + var instanceMetrics []model.MetricInfoList + instanceMetrics, resourceInfos = buildAadInstanceMetrics(sysConfigMap, instances, resourceInfos) + filterMetrics = append(filterMetrics, instanceMetrics...) + + // 查询cnad防护包资源+指标 + var packageMetrics []model.MetricInfoList + packageMetrics, resourceInfos = getCnadPackageResources(sysConfigMap, resourceInfos) + filterMetrics = append(filterMetrics, packageMetrics...) + + // 获取防护包IP子维度相关指标+资源] + var packageIpMetrics []model.MetricInfoList + packageIpMetrics, resourceInfos = getCnadProtectedIpResources(sysConfigMap, resourceInfos) + filterMetrics = append(filterMetrics, packageIpMetrics...) + ddosInfo.LabelInfo = resourceInfos ddosInfo.FilterMetrics = filterMetrics ddosInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() @@ -45,6 +60,96 @@ func (getter DDOSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricIn return ddosInfo.LabelInfo, ddosInfo.FilterMetrics } -func getAllDDosInstancesFromRMS() ([]ResourceBaseInfo, error) { - return getResourcesBaseInfoFromRMS("aad", "instances") +func buildAadInstanceMetrics(sysConfigMap map[string][]string, resources []ResourceBaseInfo, + resourceInfos map[string]labelInfo) ([]model.MetricInfoList, map[string]labelInfo) { + var filterMetrics []model.MetricInfoList + for _, resource := range resources { + metricNames, ok := sysConfigMap["instance_id"] + if !ok { + continue + } + metrics := buildSingleDimensionMetrics(metricNames, "SYS.DDOS", "instance_id", resource.ID) + filterMetrics = append(filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"name", "epId"}, + Value: []string{resource.Name, resource.EpId}, + } + keys, values := getTags(resource.Tags) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + return filterMetrics, resourceInfos +} + +func getCnadPackageResources(sysConfigMap map[string][]string, resourceInfos map[string]labelInfo) ([]model.MetricInfoList, map[string]labelInfo) { + var filterMetrics []model.MetricInfoList + request := &aadmodel.ListPackageRequest{} + packageResponse, err := getDDOSClient().ListPackage(request) + if err != nil { + logs.Logger.Errorf("Get cnad package resource error: %s", err.Error()) + return filterMetrics, resourceInfos + } + if packageResponse == nil || packageResponse.HttpStatusCode != 200 { + logs.Logger.Errorf("Get cnad package resource return http code: %d", packageResponse.HttpStatusCode) + return filterMetrics, resourceInfos + } + + metricNames, ok := sysConfigMap["package"] + if !ok { + return filterMetrics, resourceInfos + } + for _, packageItem := range *packageResponse.Items { + packageId := packageItem.PackageId + packageName := packageItem.PackageName + metrics := buildSingleDimensionMetrics(metricNames, "SYS.DDOS", "package", packageId) + info := labelInfo{ + Name: []string{"name", "region"}, + Value: []string{packageName, packageItem.RegionId}, + } + filterMetrics = append(filterMetrics, metrics...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + return filterMetrics, resourceInfos +} + +func getCnadProtectedIpResources(sysConfigMap map[string][]string, resourceInfos map[string]labelInfo) ([]model. + MetricInfoList, map[string]labelInfo) { + var filterMetrics []model.MetricInfoList + request := &aadmodel.ListProtectedIpRequest{} + protectIpResponse, err := getDDOSClient().ListProtectedIp(request) + if err != nil { + logs.Logger.Errorf("Get cnad protected ip resource error: %s", err.Error()) + return filterMetrics, resourceInfos + } + + if protectIpResponse == nil || protectIpResponse.HttpStatusCode != 200 { + logs.Logger.Errorf("Get cnad protected ip resource return http code: %d", protectIpResponse.HttpStatusCode) + return filterMetrics, resourceInfos + } + + metricNames, ok := sysConfigMap["package,ip"] + if !ok { + return filterMetrics, resourceInfos + } + + for _, protectedIpItem := range *protectIpResponse.Items { + packageId := protectedIpItem.PackageId + packageName := protectedIpItem.PackageName + protectedIpId := protectedIpItem.Id + protectedIp := protectedIpItem.Ip + metrics := buildDimensionMetrics(metricNames, "SYS.DDOS", []model.MetricsDimension{ + {Name: "package", Value: packageId}, + {Name: "ip", Value: protectedIpId}, + }) + + // 将父维度资源中的防护包名+企业项目设置到资源标签中 + info := labelInfo{ + Name: []string{"package_name", "ip_address", "region"}, + Value: []string{packageName, protectedIp, protectedIpItem.Region}, + } + filterMetrics = append(filterMetrics, metrics...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + return filterMetrics, resourceInfos } diff --git a/collector/ddos_test.go b/collector/ddos_test.go index 4f2e028..369d34c 100644 --- a/collector/ddos_test.go +++ b/collector/ddos_test.go @@ -4,17 +4,56 @@ import ( "testing" "github.com/agiledragon/gomonkey/v2" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aad/v1/model" "github.com/stretchr/testify/assert" ) func TestDdosGetResourceInfo(t *testing.T) { - sysConfig := map[string][]string{"instance_id": {"instance_drop_rate"}} - patches := gomonkey.ApplyFuncReturn(getMetricConfigMap, sysConfig) - patches.ApplyFuncReturn(listResources, mockRmsResource(), nil) + metricConf = map[string]MetricConf{ + "SYS.DDOS": { + DimMetricName: map[string][]string{"instance_id": {"instance_drop_rate"}, + "package": {"instance_drop_rate"}, "package,ip": {"ip_drop_rate"}, + }, + }, + } + patches := gomonkey.ApplyFuncReturn(listResources, mockRmsResource(), nil) defer patches.Reset() + ddosClient := getDDOSClient() + patches.ApplyMethodFunc(ddosClient, "ListProtectedIp", func(req *model.ListProtectedIpRequest) (*model. + ListProtectedIpResponse, error) { + var totalCount int32 = 1 + items := []model.ProtectedIpResponse{ + { + Id: "test-protected-ip-id", + PackageId: "0001-0001-000001", + PackageName: "test-package-name", + }, + } + return &model.ListProtectedIpResponse{ + Total: &totalCount, + Items: &items, + HttpStatusCode: 200, + }, nil + }) + + patches.ApplyMethodFunc(ddosClient, "ListPackage", func(req *model.ListPackageRequest) (*model. + ListPackageResponse, error) { + var totalCount int32 = 1 + items := []model.PackageResponse{ + { + PackageId: "0001-0001-000003", + PackageName: "test-package-name", + }, + } + return &model.ListPackageResponse{ + Total: &totalCount, + Items: &items, + HttpStatusCode: 200, + }, nil + }) var ddosgetter DDOSInfo labels, metrics := ddosgetter.GetResourceInfo() - assert.Equal(t, 1, len(labels)) - assert.Equal(t, 1, len(metrics)) + assert.Equal(t, 3, len(labels)) + assert.Equal(t, 3, len(metrics)) } diff --git a/collector/dds.go b/collector/dds.go index 5c6f342..db8d22f 100644 --- a/collector/dds.go +++ b/collector/dds.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" dds "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dds/v3" ddsmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dds/v3/model" @@ -125,6 +124,6 @@ func fmtDdsInstance(instance ddsmodel.QueryInstanceResponse) DdsInstanceInfo { func getDDSClient() *dds.DdsClient { return dds.NewDdsClient(dds.DdsClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("dds", "v3")).Build()) } diff --git a/collector/dns.go b/collector/dns.go new file mode 100644 index 0000000..a53d8d1 --- /dev/null +++ b/collector/dns.go @@ -0,0 +1,142 @@ +package collector + +import ( + "time" + + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + dns "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dns/v2" + dnsModel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dns/v2/model" + + "github.com/huaweicloud/cloudeye-exporter/logs" +) + +var dnsServerInfo serversInfo + +type DNSInfo struct{} + +func (getter DNSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInfoList) { + filterMetrics := make([]model.MetricInfoList, 0) + resourceInfos := map[string]labelInfo{} + dnsServerInfo.Lock() + defer dnsServerInfo.Unlock() + + if dnsServerInfo.LabelInfo == nil || time.Now().Unix() > dnsServerInfo.TTL { + sysConfigMap := getMetricConfigMap("SYS.DNS") + + // get record set + metricNames, ok := sysConfigMap["dns_recordset_id"] + if !ok { + logs.Logger.Warnf("Metric config is empty of SYS.DNS, dim_metric_name is dns_recordset_id") + return resourceInfos, filterMetrics + } + + var allRecordSets []dnsModel.ListRecordSetsWithTags + publicRecordSets, err := getAllRecordSets("public") + if err != nil { + logs.Logger.Errorf("Failed to get public record sets, error is: %s", err.Error()) + return resourceInfos, filterMetrics + } + allRecordSets = append(allRecordSets, publicRecordSets...) + + privateRecordSets, err := getAllRecordSets("private") + if err != nil { + logs.Logger.Errorf("Failed to get private record sets, error is: %s", err.Error()) + return resourceInfos, filterMetrics + } + allRecordSets = append(allRecordSets, privateRecordSets...) + + for _, record := range allRecordSets { + metrics := buildSingleDimensionMetrics(metricNames, "SYS.DNS", "dns_recordset_id", *record.Id) + filterMetrics = append(filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"name", "type"}, + Value: []string{*record.Name, *record.Type}, + } + tagMap := fmtTags(*record.Tags) + keys, values := getTags(tagMap) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + + // get public zone + metricNames, ok = sysConfigMap["dns_zone_id"] + if !ok { + logs.Logger.Warnf("Metric config is empty of SYS.DNS, dim_metric_name is dns_zone_id") + return resourceInfos, filterMetrics + } + publicZones, err := getAllPublicZones() + if err != nil { + logs.Logger.Errorf("Failed to get all public zones, error is: %s", err.Error()) + return resourceInfos, filterMetrics + } + for _, zone := range publicZones { + metrics := buildSingleDimensionMetrics(metricNames, "SYS.DNS", "dns_zone_id", *zone.Id) + filterMetrics = append(filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"name", "zone_type", "epId"}, + Value: []string{*zone.Name, *zone.ZoneType, *zone.EnterpriseProjectId}, + } + tagMap := fmtTags(*zone.Tags) + keys, values := getTags(tagMap) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + dnsServerInfo.LabelInfo = resourceInfos + dnsServerInfo.FilterMetrics = filterMetrics + dnsServerInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return dnsServerInfo.LabelInfo, dnsServerInfo.FilterMetrics +} + +func getAllRecordSets(zoneType string) ([]dnsModel.ListRecordSetsWithTags, error) { + limit := int32(500) + offset := int32(0) + var recordSets []dnsModel.ListRecordSetsWithTags + + for { + request := &dnsModel.ListRecordSetsRequest{ZoneType: &zoneType, Limit: &limit, Offset: &offset} + response, err := getDnsClient().ListRecordSets(request) + if err != nil { + logs.Logger.Errorf("Failed to get all record sets, type is: %s, error is: %s", zoneType, err.Error()) + return nil, err + } + if len(*response.Recordsets) == 0 { + break + } + recordSets = append(recordSets, *response.Recordsets...) + *request.Offset += limit + } + return recordSets, nil +} + +func getAllPublicZones() ([]dnsModel.PublicZoneResp, error) { + limit := int32(500) + offset := int32(0) + + var publicZones []dnsModel.PublicZoneResp + public := "public" + for { + request := &dnsModel.ListPublicZonesRequest{Type: &public, Limit: &limit, Offset: &offset} + response, err := getDnsClient().ListPublicZones(request) + if err != nil { + logs.Logger.Errorf("Failed to get all public zones, error is: %s", err.Error()) + return nil, err + } + if len(*response.Zones) == 0 { + break + } + publicZones = append(publicZones, *response.Zones...) + *request.Offset += limit + } + return publicZones, nil +} + +func getDnsClient() *dns.DnsClient { + return dns.NewDnsClient(dns.DnsClientBuilder().WithCredential( + basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithEndpoint(getEndpoint("dns", "v2")).Build()) +} diff --git a/collector/dws.go b/collector/dws.go index e51b1b2..d29cce9 100644 --- a/collector/dws.go +++ b/collector/dws.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" dws "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dws/v2" dwsmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dws/v2/model" @@ -54,6 +53,6 @@ func (getter DWSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInf func getDWSClient() *dws.DwsClient { return dws.NewDwsClient(dws.DwsClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("dws", "v1.0")).Build()) } diff --git a/collector/ecs.go b/collector/ecs.go index 87b78d8..966b5cb 100644 --- a/collector/ecs.go +++ b/collector/ecs.go @@ -5,7 +5,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" ecs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2" ecsmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2/model" @@ -70,7 +69,7 @@ type EcsInstancesInfo struct { func getECSClient() *ecs.EcsClient { return ecs.NewEcsClient(ecs.EcsClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("ecs", "v2")).Build()) } func getAllServer() ([]EcsInstancesInfo, error) { diff --git a/collector/eg.go b/collector/eg.go new file mode 100644 index 0000000..70ebf0b --- /dev/null +++ b/collector/eg.go @@ -0,0 +1,116 @@ +package collector + +import ( + "time" + + cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + + "github.com/huaweicloud/cloudeye-exporter/logs" +) + +var ( + egInfo serversInfo + egDimConfigMap = map[string]map[string]string{ + "channel_id": { + "resourceType": "channels", + "providerId": "eg", + "nameInSubResource": "channel_name", + }, + "source_name": { + "resourceType": "sources", + "providerId": "eg", + "nameInSubResource": "source_name", + }, + "subscription_id": { + "resourceType": "subscriptions", + "providerId": "eg", + "nameInSubResource": "subscription_name", + }, + "streaming_id": { + "resourceType": "streamings", + "providerId": "eg", + "nameInSubResource": "streaming_name", + }, + } +) + +type EgInfo struct{} + +func (getter EgInfo) GetResourceInfo() (map[string]labelInfo, []cesmodel.MetricInfoList) { + egInfo.Lock() + defer egInfo.Unlock() + if egInfo.LabelInfo == nil || time.Now().Unix() > egInfo.TTL { + resourceInfos := map[string]labelInfo{} + allMetrics, err := listAllMetrics("SYS.EG") + if err != nil { + logs.Logger.Errorf("Get all eg metrics: %s", err.Error()) + return egInfo.LabelInfo, egInfo.FilterMetrics + } + egResourceMetricMap := getEgSubResourceMetrics(allMetrics) + getEgResourceInfoFromRms("source_name", resourceInfos, egResourceMetricMap) + getEgResourceInfoFromRms("channel_id", resourceInfos, egResourceMetricMap) + getEgResourceInfoFromRms("subscription_id", resourceInfos, egResourceMetricMap) + getEgResourceInfoFromRms("streaming_id", resourceInfos, egResourceMetricMap) + egInfo.LabelInfo = resourceInfos + var filteredMetrics []cesmodel.MetricInfoList + for _, metrics := range allMetrics { + if _, ok := resourceInfos[GetResourceKeyFromMetricInfo(metrics)]; ok { + filteredMetrics = append(filteredMetrics, metrics) + } + } + egInfo.FilterMetrics = filteredMetrics + egInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return egInfo.LabelInfo, egInfo.FilterMetrics +} + +func getEgResourceInfoFromRms(dimName string, resourceInfos map[string]labelInfo, allMetricMap map[string][]cesmodel.MetricInfoList) { + dimConfig, ok := egDimConfigMap[dimName] + if !ok { + return + } + rmsResourceInfos, err := getResourcesBaseInfoFromRMS(dimConfig["providerId"], dimConfig["resourceType"]) + if err != nil { + return + } + for _, rmsResourceInfo := range rmsResourceInfos { + info := labelInfo{ + Name: []string{"name", "epId"}, + Value: []string{rmsResourceInfo.Name, rmsResourceInfo.EpId}, + } + keys, values := getTags(rmsResourceInfo.Tags) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[rmsResourceInfo.ID] = info + + // 设置子维度指标资源关联 + subMetricList, ok := allMetricMap[rmsResourceInfo.ID] + if !ok { + continue + } + for _, subMetric := range subMetricList { + resourceInfos[GetResourceKeyFromMetricInfo(subMetric)] = labelInfo{ + Name: []string{dimConfig["nameInSubResource"], "epId"}, + Value: []string{rmsResourceInfo.Name, rmsResourceInfo.EpId}, + } + } + } +} + +func getEgSubResourceMetrics(allMetrics []cesmodel.MetricInfoList) map[string][]cesmodel.MetricInfoList { + resultMap := make(map[string][]cesmodel.MetricInfoList) + for _, metric := range allMetrics { + if len(metric.Dimensions) < 2 { + continue + } + firstDimValue := metric.Dimensions[0].Value + subMetricList, ok := resultMap[firstDimValue] + if ok { + subMetricList = append(subMetricList, metric) + } else { + subMetricList = []cesmodel.MetricInfoList{metric} + } + resultMap[firstDimValue] = subMetricList + } + return resultMap +} diff --git a/collector/eg_test.go b/collector/eg_test.go new file mode 100644 index 0000000..f88c3fa --- /dev/null +++ b/collector/eg_test.go @@ -0,0 +1,101 @@ +package collector + +import ( + "testing" + + "github.com/agiledragon/gomonkey/v2" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + "github.com/stretchr/testify/assert" +) + +func TestEGInfo_GetResourceInfo(t *testing.T) { + metricConf = map[string]MetricConf{ + "SYS.EG": { + Resource: "rms", + DimMetricName: map[string][]string{ + "source_name": {"event_num"}, + "channel_id": {"pub_process_time"}, + "streaming_id": {"streaming_live_status"}, + "subscription_id": {"sub_num"}, + "subscription_id,target_id": {"sub_failed_rate"}, + }, + }, + } + patches := gomonkey.ApplyFuncReturn(listAllMetrics, []model.MetricInfoList{ + { + MetricName: "event_num", + Dimensions: []model.MetricsDimension{ + {Name: "source_name", Value: "test-source-name"}, + }, + }, + { + MetricName: "pub_process_time", + Dimensions: []model.MetricsDimension{ + {Name: "channel_id", Value: "440a1bf6-68cc-4a6a-b286-e89811a99b61"}, + }, + }, + { + MetricName: "streaming_live_status", + Dimensions: []model.MetricsDimension{ + {Name: "streaming_id", Value: "139c8a1c-3b5d-4a97-8095-1b8aeed2b93e"}, + }, + }, + { + MetricName: "sub_num", + Dimensions: []model.MetricsDimension{ + {Name: "subscription_id", Value: "0cbcebbf-7732-4d50-8186-45cdf2fec1f3"}, + }, + }, + { + MetricName: "sub_failed_rate", + Dimensions: []model.MetricsDimension{ + {Name: "subscription_id", Value: "0cbcebbf-7732-4d50-8186-45cdf2fec1f3"}, + {Name: "target_id", Value: "04c73e29-848a-4a45-8dd2-6dc1b79c2832"}, + }, + }, + }, nil) + defer patches.Reset() + outputs := []gomonkey.OutputCell{ + { + Values: gomonkey.Params{[]ResourceBaseInfo{ + { + ID: "test-source-name", + Name: "test-source-name", + EpId: "0", + }, + }, nil}, + }, + { + Values: gomonkey.Params{[]ResourceBaseInfo{ + { + ID: "440a1bf6-68cc-4a6a-b286-e89811a99b61", + Name: "test-channel-name", + EpId: "0", + }, + }, nil}, + }, + { + Values: gomonkey.Params{[]ResourceBaseInfo{ + { + ID: "139c8a1c-3b5d-4a97-8095-1b8aeed2b93e", + Name: "test-stream-name", + EpId: "0", + }, + }, nil}, + }, + { + Values: gomonkey.Params{[]ResourceBaseInfo{ + { + ID: "0cbcebbf-7732-4d50-8186-45cdf2fec1f3", + Name: "test-subscription-name", + EpId: "0", + }, + }, nil}, + }, + } + patches.ApplyFuncSeq(getResourcesBaseInfoFromRMS, outputs) + var egInfo EgInfo + labels, metrics := egInfo.GetResourceInfo() + assert.Equal(t, 5, len(labels)) + assert.Equal(t, 5, len(metrics)) +} diff --git a/collector/elb.go b/collector/elb.go index 73cd7ed..4c16e2b 100644 --- a/collector/elb.go +++ b/collector/elb.go @@ -6,7 +6,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" elb "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/elb/v3" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/elb/v3/model" @@ -21,7 +20,7 @@ var poolsMap map[string]model.Pool func getELBClient() *elb.ElbClient { return elb.NewElbClient(elb.ElbClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("elb", "v2")).Build()) } diff --git a/collector/eps.go b/collector/eps.go index bbcb538..19fbf15 100644 --- a/collector/eps.go +++ b/collector/eps.go @@ -6,7 +6,6 @@ import ( http_client "github.com/huaweicloud/huaweicloud-sdk-go-v3/core" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" eps "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/eps/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/eps/v1/model" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/eps/v1/region" @@ -35,7 +34,7 @@ func getEPSClientBuilder() *http_client.HcHttpClientBuilder { builder := eps.EpsClientBuilder().WithCredential(global.NewCredentialsBuilder(). WithAk(conf.AccessKey).WithSk(conf.SecretKey). WithDomainId(conf.DomainID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) if endpoint, ok := endpointConfig["eps"]; ok { builder.WithEndpoint(endpoint) } else { diff --git a/collector/evs.go b/collector/evs.go index e0c5701..dc9f0db 100644 --- a/collector/evs.go +++ b/collector/evs.go @@ -6,7 +6,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" evs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/evs/v2" evsmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/evs/v2/model" @@ -86,7 +85,7 @@ func (getter EVSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInf func getEVSClient() *evs.EvsClient { return evs.NewEvsClient(evs.EvsClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("evs", "v2")).Build()) } diff --git a/collector/extensions.go b/collector/extensions.go index 1d4a41f..a43c965 100644 --- a/collector/extensions.go +++ b/collector/extensions.go @@ -53,6 +53,12 @@ var ( "SYS.CFW": CFWInfo{}, "SYS.WANQMonitor": WanMonitorInfo{}, "SYS.ANC": ANCInfo{}, + "SYS.LTS": LTSInfo{}, + "SYS.HSS": HSSInfo{}, + "SYS.CloudTable": CloudTableInfo{}, + "SYS.EG": EgInfo{}, + "SYS.OBS": OBSInfo{}, + "SYS.DNS": DNSInfo{}, } ) diff --git a/collector/gaussdbv5.go b/collector/gaussdbv5.go index b4f1430..8eb3525 100644 --- a/collector/gaussdbv5.go +++ b/collector/gaussdbv5.go @@ -5,7 +5,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" gaussdbforopengauss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/gaussdbforopengauss/v3" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/gaussdbforopengauss/v3/model" @@ -76,7 +75,7 @@ func (getter GAUSSDBV5Info) GetResourceInfo() (map[string]labelInfo, []cesmodel. func getGaussdbforopengaussClient() *gaussdbforopengauss.GaussDBforopenGaussClient { return gaussdbforopengauss.NewGaussDBforopenGaussClient(gaussdbforopengauss.GaussDBforopenGaussClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("gaussdb-opengauss", "v3")).Build()) } diff --git a/collector/hss.go b/collector/hss.go new file mode 100644 index 0000000..534325c --- /dev/null +++ b/collector/hss.go @@ -0,0 +1,43 @@ +package collector + +import ( + "time" + + cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" +) + +var hssInfo serversInfo + +type HSSInfo struct{} + +func (getter HSSInfo) GetResourceInfo() (map[string]labelInfo, []cesmodel.MetricInfoList) { + resourceInfos := map[string]labelInfo{} + filterMetrics := make([]cesmodel.MetricInfoList, 0) + if hssInfo.LabelInfo == nil || time.Now().Unix() > hssInfo.TTL { + enterpriseProjects, err := listEps() + if err != nil { + return hssInfo.LabelInfo, hssInfo.FilterMetrics + } + sysConfigMap := getMetricConfigMap("SYS.HSS") + if nil == sysConfigMap { + return hssInfo.LabelInfo, hssInfo.FilterMetrics + } + hssEpIdMetricNames, ok := sysConfigMap["hss_enterprise_project_id"] + if !ok { + return hssInfo.LabelInfo, hssInfo.FilterMetrics + } + for _, enterpriseProject := range enterpriseProjects { + metrics := buildSingleDimensionMetrics(hssEpIdMetricNames, "SYS.HSS", "hss_enterprise_project_id", enterpriseProject.Id) + filterMetrics = append(filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"epName", "epId"}, + Value: []string{enterpriseProject.Name, enterpriseProject.Id}, + } + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + hssInfo.LabelInfo = resourceInfos + hssInfo.FilterMetrics = filterMetrics + hssInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return hssInfo.LabelInfo, hssInfo.FilterMetrics +} diff --git a/collector/hss_test.go b/collector/hss_test.go new file mode 100644 index 0000000..d1b62fe --- /dev/null +++ b/collector/hss_test.go @@ -0,0 +1,33 @@ +package collector + +import ( + "testing" + + "github.com/agiledragon/gomonkey/v2" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/eps/v1/model" + "github.com/stretchr/testify/assert" +) + +func TestGetHSSResourceInfo(t *testing.T) { + metricConf = make(map[string]MetricConf) + metricConf["SYS.HSS"] = MetricConf{ + Resource: "service", + DimMetricName: map[string][]string{ + "hss_enterprise_project_id": {"host_num", "unprotected_host_num", "risky_host_num", "uninstalled_or_offline_agent_num"}, + }, + } + patches := gomonkey.NewPatches() + patches.ApplyFuncReturn(listEps, []model.EpDetail{ + { + Id: "0", + Name: "default", + Description: "默认企业项目", + Status: 1, + }, + }, nil) + defer patches.Reset() + var hssInfo HSSInfo + info, lists := hssInfo.GetResourceInfo() + assert.NotNil(t, info) + assert.NotNil(t, lists) +} diff --git a/collector/lakeformation.go b/collector/lakeformation.go index 1798c2d..02a799b 100644 --- a/collector/lakeformation.go +++ b/collector/lakeformation.go @@ -4,7 +4,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" lakeformation "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/lakeformation/v1" lakeformationmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/lakeformation/v1/model" @@ -60,7 +59,7 @@ func (getter LakeFormationInfo) GetResourceInfo() (map[string]labelInfo, []model func getLakeFormationClient() *lakeformation.LakeFormationClient { return lakeformation.NewLakeFormationClient(lakeformation.LakeFormationClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("lakeformation", "v1")).Build()) } diff --git a/collector/lts.go b/collector/lts.go new file mode 100644 index 0000000..644c854 --- /dev/null +++ b/collector/lts.go @@ -0,0 +1,150 @@ +package collector + +import ( + "errors" + "fmt" + "time" + + "github.com/huaweicloud/cloudeye-exporter/logs" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" +) + +var ltsInfo serversInfo + +type LTSInfo struct{} + +type ListLogGroupRequest struct { +} + +type ListLogStreamRequest struct { + LogGroupID string `json:"log_group_id"` +} + +type ListLogGroupResponse struct { + LogGroups []LogGroup `json:"log_groups"` + HttpStatusCode int `json:"-"` +} + +type ListLogStreamResponse struct { + LogStreams []LogStream `json:"log_streams"` + HttpStatusCode int `json:"-"` +} + +type LogGroup struct { + LogGroupName string `json:"log_group_name"` + Tag map[string]string `json:"tag"` + LogGroupID string `json:"log_group_id"` + LogGroupAlias string `json:"log_group_alias"` +} + +type LogStream struct { + LogStreamName string `json:"log_stream_name"` + LogStreamNameAlias string `json:"log_stream_name_alias"` + LogStreamID string `json:"log_stream_id"` + Tag map[string]string `json:"tag"` +} + +func (getter LTSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInfoList) { + filterMetrics := make([]model.MetricInfoList, 0, 0) + resourceInfos := map[string]labelInfo{} + + ltsInfo.Lock() + defer ltsInfo.Unlock() + if ltsInfo.LabelInfo == nil || time.Now().Unix() > ltsInfo.TTL { + logGroups, err := getAllLogGroup() + if err != nil { + logs.Logger.Errorf("Get all log group error, error is %s", err.Error()) + return nil, nil + } + buildLogGroupInfos(logGroups, &filterMetrics, resourceInfos) + buildLogStreamInfos(logGroups, &filterMetrics, resourceInfos) + + ltsInfo.LabelInfo = resourceInfos + ltsInfo.FilterMetrics = filterMetrics + ltsInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return ltsInfo.LabelInfo, ltsInfo.FilterMetrics +} + +func buildLogGroupInfos(logGroups []LogGroup, filterMetrics *[]model.MetricInfoList, resourceInfos map[string]labelInfo) { + sysConfigMap := getMetricConfigMap("SYS.LTS") + groupIDMetrics := sysConfigMap["log_group_id"] + for _, group := range logGroups { + metrics := buildSingleDimensionMetrics(groupIDMetrics, "SYS.LTS", "log_group_id", group.LogGroupID) + *filterMetrics = append(*filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"log_group_name"}, + Value: []string{group.LogGroupName}, + } + keys, values := getTags(group.Tag) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } +} + +func buildLogStreamInfos(logGroups []LogGroup, filterMetrics *[]model.MetricInfoList, resourceInfos map[string]labelInfo) { + sysConfigMap := getMetricConfigMap("SYS.LTS") + logStreamMetrics := sysConfigMap["log_group_id,log_stream_id"] + for _, group := range logGroups { + logStreams, err := getAllLogStream(group.LogGroupID) + if err != nil { + logs.Logger.Errorf("Get all log group error, error is %s", err.Error()) + return + } + + for _, stream := range logStreams { + metrics := buildDimensionMetrics(logStreamMetrics, "SYS.LTS", []model.MetricsDimension{ + { + Name: "log_group_id", + Value: group.LogGroupID, + }, + { + Name: "log_stream_id", + Value: stream.LogStreamID, + }, + }) + *filterMetrics = append(*filterMetrics, metrics...) + info := labelInfo{ + Name: []string{"log_group_name", "log_stream_name"}, + Value: []string{group.LogGroupName, stream.LogStreamName}, + } + keys, values := getTags(stream.Tag) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[GetResourceKeyFromMetricInfo(metrics[0])] = info + } + + } +} + +func getAllLogGroup() ([]LogGroup, error) { + requestDef := genDefaultReqDefWithOffsetAndLimit("/v2/{project_id}/groups", new(ListLogGroupResponse)) + request := ListLogGroupRequest{} + resp, err := getHcClient(getEndpoint("lts", "v2")).Sync(request, requestDef) + if err != nil { + return nil, err + } + jobsInfo, ok := resp.(*ListLogGroupResponse) + if !ok { + return nil, errors.New("resp type is not ListFlinkJobsResponse") + } + return jobsInfo.LogGroups, nil +} + +func getAllLogStream(logGroupID string) ([]LogStream, error) { + uri := fmt.Sprintf("/v2/{project_id}/groups/%s/streams", logGroupID) + requestDef := genDefaultReqDefWithOffsetAndLimit(uri, new(ListLogStreamResponse)) + request := ListLogStreamRequest{ + LogGroupID: logGroupID, + } + resp, err := getHcClient(getEndpoint("lts", "v2")).Sync(request, requestDef) + if err != nil { + return nil, err + } + jobsInfo, ok := resp.(*ListLogStreamResponse) + if !ok { + return nil, errors.New("resp type is not ListFlinkJobsResponse") + } + return jobsInfo.LogStreams, nil +} diff --git a/collector/lts_test.go b/collector/lts_test.go new file mode 100644 index 0000000..f2a2bf8 --- /dev/null +++ b/collector/lts_test.go @@ -0,0 +1,69 @@ +package collector + +import ( + "testing" + + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def" + "github.com/stretchr/testify/assert" + + "github.com/huaweicloud/cloudeye-exporter/logs" +) + +func TestLTSGetResourceInfo(t *testing.T) { + + patches := getPatches() + defer patches.Reset() + conf.DomainID = "123" + logs.InitLog("") + sysConfig := map[string][]string{ + "log_group_id": {"packet_loss_rate_avg"}, + "log_group_id,log_stream_id": {"packet_loss_rate_avg"}, + } + patches.ApplyFuncReturn(getMetricConfigMap, sysConfig) + + logGroupResp := ListLogGroupResponse{ + LogGroups: []LogGroup{ + { + LogGroupName: "test-group1", + LogGroupID: "xxxxx1", + LogGroupAlias: "xxx-alias1", + }, + { + LogGroupName: "test-group2", + LogGroupID: "xxxxx2", + LogGroupAlias: "xxx-alias2", + }, + }, + HttpStatusCode: 200, + } + logStreamResp := ListLogStreamResponse{ + LogStreams: []LogStream{ + { + LogStreamName: "xxx-name1", + LogStreamNameAlias: "xxx-alias1", + LogStreamID: "xxxx1", + }, + { + LogStreamName: "xxx-name2", + LogStreamNameAlias: "xxx-alias2", + LogStreamID: "xxxx2", + }, + }, + HttpStatusCode: 200, + } + patches.ApplyMethodFunc(getHcClient(getEndpoint("lts", "v2")), "Sync", func(req interface{}, reqDef *def.HttpRequestDef) (interface{}, error) { + if reqDef.Path == "/v2/{project_id}/groups" { + return &logGroupResp, nil + } + if reqDef.Path == "/v2/{project_id}/groups/xxxxx1/streams" { + return &logStreamResp, nil + } + return nil, nil + }) + + var ltsInfo LTSInfo + resourceInfo, metrics := ltsInfo.GetResourceInfo() + assert.Equal(t, 4, len(resourceInfo)) + assert.Equal(t, 4, len(metrics)) + +} diff --git a/collector/metrics.go b/collector/metrics.go index b3e737a..a241c19 100644 --- a/collector/metrics.go +++ b/collector/metrics.go @@ -4,7 +4,6 @@ import ( "sync" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" ces "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" cesv2 "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v2" @@ -21,7 +20,7 @@ var ( func getCESClient() *ces.CesClient { return ces.NewCesClient(ces.CesClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("ces", "v1")).Build()) } @@ -72,7 +71,7 @@ func listAllMetrics(namespace string) ([]model.MetricInfoList, error) { func getCESClientV2() *cesv2.CesClient { return cesv2.NewCesClient(ces.CesClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("ces", "v2")).Build()) } diff --git a/collector/mrs.go b/collector/mrs.go index b3a5c26..82dea6e 100644 --- a/collector/mrs.go +++ b/collector/mrs.go @@ -6,7 +6,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" mrs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mrs/v1" mrsmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mrs/v1/model" @@ -78,7 +77,7 @@ func getMRSClusterFromRMS() ([]ResourceBaseInfo, error) { func getMRSClient() *mrs.MrsClient { return mrs.NewMrsClient(mrs.MrsClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("mrs", "v1.1")).Build()) } diff --git a/collector/nosql.go b/collector/nosql.go index 19fef34..0dff245 100644 --- a/collector/nosql.go +++ b/collector/nosql.go @@ -5,7 +5,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" nosql "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/gaussdbfornosql/v3" nosqlmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/gaussdbfornosql/v3/model" @@ -118,6 +117,6 @@ func getAllNoSQLInstances() ([]nosqlmodel.ListInstancesResult, error) { func getNoSQLClient() *nosql.GaussDBforNoSQLClient { return nosql.NewGaussDBforNoSQLClient(nosql.GaussDBforNoSQLClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("gaussdb-nosql", "v3")).Build()) } diff --git a/collector/obs.go b/collector/obs.go new file mode 100644 index 0000000..9a75acd --- /dev/null +++ b/collector/obs.go @@ -0,0 +1,109 @@ +package collector + +import ( + "time" + + "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + cesmodel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + iam "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3/model" + + "github.com/huaweicloud/cloudeye-exporter/logs" +) + +var obsServerInfo serversInfo + +type OBSInfo struct{} + +func (getter OBSInfo) GetResourceInfo() (map[string]labelInfo, []model.MetricInfoList) { + filterMetrics := make([]model.MetricInfoList, 0) + resourceInfos := map[string]labelInfo{} + obsServerInfo.Lock() + defer obsServerInfo.Unlock() + + if obsServerInfo.LabelInfo == nil || time.Now().Unix() > obsServerInfo.TTL { + allMetrics, err := listAllMetrics("SYS.OBS") + if err != nil { + logs.Logger.Errorf("[%s] Get all metrics of SYS.OBS failed, error is: %s", err.Error()) + return resourceInfos, filterMetrics + } + metricDimMap := map[string]cesmodel.MetricsDimension{} + for _, metric := range allMetrics { + for _, dimension := range metric.Dimensions { + metricDimMap[dimension.Value] = dimension + } + } + + services, err := getAllServerFromRMS("obs", "buckets") + if err != nil { + logs.Logger.Error("Get all obs server from RMS failed, error is:", err.Error()) + return resourceInfos, filterMetrics + } + for _, instance := range services { + if _, ok := metricDimMap[instance.Name]; ok { + info := labelInfo{ + Name: []string{"epId"}, + Value: []string{instance.EpId}, + } + keys, values := getTags(instance.Tags) + info.Name = append(info.Name, keys...) + info.Value = append(info.Value, values...) + resourceInfos[metricDimMap[instance.Name].Value] = info + } + } + + userInfoMap := getUserInfoFromIAM() + if userInfoMap != nil { + for _, metric := range allMetrics { + tenantId := getTenantId(metric) + if tenantId == "" { + continue + } + if userName, ok := userInfoMap[tenantId]; ok { + info := labelInfo{ + Name: []string{"username"}, + Value: []string{userName}, + } + resourceInfos[GetResourceKeyFromMetricInfo(metric)] = info + } + } + } + obsServerInfo.LabelInfo = resourceInfos + obsServerInfo.FilterMetrics = allMetrics + obsServerInfo.TTL = time.Now().Add(GetResourceInfoExpirationTime()).Unix() + } + return obsServerInfo.LabelInfo, obsServerInfo.FilterMetrics +} + +func getTenantId(metric cesmodel.MetricInfoList) string { + dimensions := metric.Dimensions + if len(dimensions) == 1 && dimensions[0].Name == "tenant_id" { + return dimensions[0].Value + } + dimName := getDimsNameKey(dimensions) + if DimNameEquals("tenant_id,http_code", dimName) { + for _, dimension := range dimensions { + if dimension.Name == "tenant_id" { + return dimension.Value + } + } + } + return "" +} + +func getUserInfoFromIAM() map[string]string { + userInfoMap := make(map[string]string) + request := &iam.KeystoneListAuthDomainsRequest{} + response, err := GetIAMClient().KeystoneListAuthDomains(request) + if err != nil { + logs.Logger.Errorf("Get user info from IAM failed, error is : %s", err.Error()) + return nil + } + if len(*response.Domains) == 0 { + logs.Logger.Info("Get user info from IAM is empty") + return nil + } + for _, domain := range *response.Domains { + userInfoMap[domain.Id] = domain.Name + } + return userInfoMap +} diff --git a/collector/rms.go b/collector/rms.go index 9821726..786f99a 100644 --- a/collector/rms.go +++ b/collector/rms.go @@ -6,7 +6,6 @@ import ( http_client "github.com/huaweicloud/huaweicloud-sdk-go-v3/core" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" v1 "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/rms/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/rms/v1/model" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/rms/v1/region" @@ -19,7 +18,7 @@ func getRMSClient() *v1.RmsClient { } func getRMSClientBuilder() *http_client.HcHttpClientBuilder { - builder := v1.RmsClientBuilder().WithCredential(global.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithDomainId(conf.DomainID).Build()).WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) + builder := v1.RmsClientBuilder().WithCredential(global.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithDomainId(conf.DomainID).Build()).WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)) if endpoint, ok := endpointConfig["rms"]; ok { builder.WithEndpoint(endpoint) } else { diff --git a/collector/utils.go b/collector/utils.go index 99a7f79..fd61d7b 100644 --- a/collector/utils.go +++ b/collector/utils.go @@ -12,10 +12,11 @@ import ( "github.com/huaweicloud/huaweicloud-sdk-go-v3/core" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" + "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/def" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/impl" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + iam "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/iam/v3" "github.com/huaweicloud/cloudeye-exporter/logs" ) @@ -208,7 +209,7 @@ func buildDimensionMetrics(metricNames []string, namespace string, dimensions [] } func getHcClient(endpoint string) *core.HcHttpClient { - return core.NewHcHttpClient(impl.NewDefaultHttpClient(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify))). + return core.NewHcHttpClient(impl.NewDefaultHttpClient(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify))). WithCredential(basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). WithEndpoints([]string{endpoint}) } @@ -286,3 +287,16 @@ func DimNameEquals(originalDimName, targetDimName string) bool { } return false } + +func GetIAMClient() *iam.IamClient { + return iam.NewIamClient( + iam.IamClientBuilder(). + WithEndpoint(getEndpoint("iam", "v3")). + WithCredential( + global.NewCredentialsBuilder(). + WithAk(conf.AccessKey). + WithSk(conf.SecretKey). + Build()). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + Build()) +} diff --git a/collector/version.go b/collector/version.go index d2c2058..9b083c5 100644 --- a/collector/version.go +++ b/collector/version.go @@ -1,5 +1,5 @@ package collector const ( - Version = "v2.0.11" + Version = "v2.0.12" ) diff --git a/collector/waf.go b/collector/waf.go index e6c899d..6d50e75 100644 --- a/collector/waf.go +++ b/collector/waf.go @@ -5,7 +5,6 @@ import ( "time" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" waf "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/waf/v1" wafModel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/waf/v1/model" @@ -75,7 +74,7 @@ func getAllWafInstancesFromRMS() ([]ResourceBaseInfo, error) { func getWAFClient() *waf.WafClient { return waf.NewWafClient(waf.WafClientBuilder().WithCredential( basic.NewCredentialsBuilder().WithAk(conf.AccessKey).WithSk(conf.SecretKey).WithProjectId(conf.ProjectID).Build()). - WithHttpConfig(config.DefaultHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). + WithHttpConfig(GetHttpConfig().WithIgnoreSSLVerification(CloudConf.Global.IgnoreSSLVerify)). WithEndpoint(getEndpoint("waf", "v1")).Build()) } diff --git a/collector/wan_monitor.go b/collector/wan_monitor.go index b6ff595..4e38983 100644 --- a/collector/wan_monitor.go +++ b/collector/wan_monitor.go @@ -6,8 +6,9 @@ import ( "strconv" "time" - "github.com/huaweicloud/cloudeye-exporter/logs" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/ces/v1/model" + + "github.com/huaweicloud/cloudeye-exporter/logs" ) const namespace = "SYS.WANQMonitor" @@ -90,8 +91,11 @@ func (getter WanMonitorInfo) GetResourceInfo() (map[string]labelInfo, []model.Me getTaskIdOperatorDimInfo(metrics, &filterMetrics, resourceInfos, taskMap, probeMap) getTaskIdProbeIdDimInfo(metrics, &filterMetrics, resourceInfos, taskMap, probeMap) getTaskIdOperatorCityDimInfo(metrics, &filterMetrics, resourceInfos, taskMap, probeMap) + + wanMonitorInfo.LabelInfo = resourceInfos + wanMonitorInfo.FilterMetrics = filterMetrics } - return resourceInfos, filterMetrics + return wanMonitorInfo.LabelInfo, wanMonitorInfo.FilterMetrics } func getAllMonitorTask() map[string]Task { diff --git a/go.sum b/go.sum index d95adcd..bf3a4b5 100644 --- a/go.sum +++ b/go.sum @@ -1,34 +1,55 @@ -github.com/agiledragon/gomonkey/v2 v2.10.1 h1:FPJJNykD1957cZlGhr9X0zjr291/lbazoZ/dmc4mS4c= -github.com/agiledragon/gomonkey/v2 v2.10.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/agiledragon/gomonkey/v2 v2.11.0 h1:5oxSgA+tC1xuGsrIorR+sYiziYltmJyEZ9qA25b6l5U= +github.com/agiledragon/gomonkey/v2 v2.11.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.36 h1:duJye/Nev/l36qHNN64hZVzchdPqFSO8xU+3YMgYH+k= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.36/go.mod h1:BXgkXeyM6erEASLPHYWjtGHHN1GhWSsvJYWyJp8jEG8= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.92 h1:jw2XYq/eryxqOFvzw5DnU188nhQJYxAbmiWslAaZcK0= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.92/go.mod h1:j8hJuz4uvsxnzkYmEDO7lB6Jj3TY09KY/DxLUPcO6a8= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -37,12 +58,12 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= @@ -53,20 +74,22 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= +github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.11.2 h1:+1v2rDQUWNcGW7/7E0Jvdz51V38XXxJfhzbV17aNHCw= -go.mongodb.org/mongo-driver v1.11.2/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= +go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= @@ -76,14 +99,22 @@ go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -93,27 +124,49 @@ golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/grafana_dashboard/templates/anc_dashboard_template.json b/grafana_dashboard/templates/anc_dashboard_template.json index 476126e..65918e2 100644 --- a/grafana_dashboard/templates/anc_dashboard_template.json +++ b/grafana_dashboard/templates/anc_dashboard_template.json @@ -54,7 +54,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -114,7 +114,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_network_incoming_bits_rate{epId=\"$EPS\"}", + "expr": "huaweicloud_sys_anc_network_incoming_bits_rate{}", "instant": false, "legendFormat": "anc资源名:{{name}}", "range": true, @@ -150,7 +150,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -210,7 +210,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_network_outgoing_bits_rate{epId=\"$EPS\"}", + "expr": "huaweicloud_sys_anc_network_outgoing_bits_rate{}", "instant": false, "legendFormat": "anc资源名:{{name}}", "range": true, @@ -246,7 +246,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -306,7 +306,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_network_incoming_packets_rate{epId=\"$EPS\"}", + "expr": "huaweicloud_sys_anc_network_incoming_packets_rate{}", "instant": false, "legendFormat": "anc资源名:{{name}}", "range": true, @@ -342,7 +342,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -402,7 +402,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_network_outgoing_packets_rate{epId=\"$EPS\"}", + "expr": "huaweicloud_sys_anc_network_outgoing_packets_rate{}", "instant": false, "legendFormat": "anc资源名:{{name}}", "range": true, @@ -451,7 +451,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -510,7 +510,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_service_inbound_traffic{epId=~\"$EPS\", anc_service_id=~\".+\", anc_serviceregion_id!~\".+\"}", + "expr": "huaweicloud_sys_anc_service_inbound_traffic{anc_service_id=~\".+\", anc_serviceregion_id!~\".+\"}", "instant": false, "legendFormat": "服务名称:{{name}}", "range": true, @@ -546,7 +546,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -605,7 +605,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_service_outbound_traffic{epId=~\"$EPS\", anc_service_id=~\".+\", anc_serviceregion_id!~\".+\"}", + "expr": "huaweicloud_sys_anc_service_outbound_traffic{anc_service_id=~\".+\", anc_serviceregion_id!~\".+\"}", "instant": false, "legendFormat": "服务名称:{{name}}", "range": true, @@ -654,7 +654,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -713,7 +713,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_total_server_count{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_anc_total_server_count{}", "instant": false, "legendFormat": "成员组名:{{name}}", "range": true, @@ -749,7 +749,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -808,7 +808,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_healthy_server_count{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_anc_healthy_server_count{}", "instant": false, "legendFormat": "成员组名:{{name}}", "range": true, @@ -844,7 +844,7 @@ "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 5, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, @@ -903,7 +903,7 @@ { "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "expr": "huaweicloud_sys_anc_unhealthy_server_count{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_anc_unhealthy_server_count{}", "instant": false, "legendFormat": "成员组名:{{name}}", "range": true, @@ -917,29 +917,7 @@ "schemaVersion": 39, "tags": [], "templating": { - "list": [ - { - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "definition": "huaweicloud_epinfo", - "hide": 0, - "includeAll": false, - "label": "企业项目", - "multi": false, - "name": "EPS", - "options": [], - "query": { - "qryType": 4, - "query": "huaweicloud_epinfo", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] + "list": [] }, "time": { "from": "now-30m", diff --git a/grafana_dashboard/templates/cc_dashboard_template.json b/grafana_dashboard/templates/cc_dashboard_template.json index 8be0f8a..4c5a499 100644 --- a/grafana_dashboard/templates/cc_dashboard_template.json +++ b/grafana_dashboard/templates/cc_dashboard_template.json @@ -907,204 +907,6 @@ "align": false, "alignLevel": null } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "时延-云连接:云连接域间时延", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 36 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "exemplar": true, - "expr": "huaweicloud_sys_cc_latency{connectionEpId=~\"$EPS\"}", - "interval": "", - "legendFormat": "连接名称:{{connectionName}};带宽包名:{{packageName}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "时延", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:198", - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:199", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "丢包率-云连接:云连接域间丢包率", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 45 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "exemplar": true, - "expr": "huaweicloud_sys_cc_packet_loss_rate{connectionEpId=~\"$EPS\"}", - "interval": "", - "legendFormat": "连接名称:{{connectionName}};带宽包名:{{packageName}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "丢包率", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:198", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:199", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } } ], "schemaVersion": 27, diff --git a/grafana_dashboard/templates/cloudtable_dashboard_template.json b/grafana_dashboard/templates/cloudtable_dashboard_template.json new file mode 100644 index 0000000..f2ba7f7 --- /dev/null +++ b/grafana_dashboard/templates/cloudtable_dashboard_template.json @@ -0,0 +1,635 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "统计测量对象的CPU使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_cmdProcessCPU{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU使用率(节点)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "统计测量对象的内存使用率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_cmdProcessMem{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "内存使用率(节点)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "统计测量对象所在集群的已用存储空间大小占总配额的比率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_cmdForUsedStorageRate{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "已用存储空间比率(节点)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "统计测量对象所在集群的已用存储空间大小占总配额的比率", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_cmdForUsedStorageRate{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "已用存储空间比率(节点)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "磁盘读取吞吐速率。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_disk_throughput_read_rate{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "磁盘吞吐读速率(节点)", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "磁盘写入吞吐速率。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_cloudtable_disk_throughput_write_rate{clusterName=~\"$ClusterName\"}", + "instant": false, + "legendFormat": "集群名称:{{clusterName}};节点名称:{{instance_name}}", + "range": true, + "refId": "A" + } + ], + "title": "磁盘吞吐写速率(节点)", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(clusterName)", + "hide": 0, + "includeAll": false, + "label": "集群名称", + "multi": false, + "name": "ClusterName", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(clusterName)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "表格存储服务(CloudTable)", + "uid": "c8e4c35d-d418-41f1-b931-785c5dcb5f66", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/dcaas_dashboard_template.json b/grafana_dashboard/templates/dcaas_dashboard_template.json index 40cecc7..17d4fb3 100644 --- a/grafana_dashboard/templates/dcaas_dashboard_template.json +++ b/grafana_dashboard/templates/dcaas_dashboard_template.json @@ -1,1165 +1,907 @@ { "__inputs": [ { - "name": "prometheus-cloudeye-exporter", - "label": "prometheus-cloudeye-exporter", - "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", "type": "datasource", "pluginId": "prometheus", - "pluginName": "prometheus" + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, "description": "【华为云DCASS支持的监控指标】https://support.huaweicloud.com/usermanual-dc/dc_04_0802.html", "editable": true, "fiscalYearStartMonth": 0, - "gnetId": 8919, "graphTooltip": 0, - "id": 27, - "iteration": 1652182368763, - "links": [ - { - "$$hashKey": "object:2302", - "asDropdown": true, - "icon": "external link", - "tags": [], - "targetBlank": true, - "title": "", - "type": "dashboards" - } - ], + "id": null, + "links": [], "liveNow": false, "panels": [ { - "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, - "id": 187, - "panels": [], - "title": "资源总览-华为云专线", + "id": 2, + "title": "资源总览-华为云专线 企业项目:$EPS", "type": "row" }, { - "columns": [], - "description": "", - "fontSize": "80%", + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "网络流入带宽" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400000 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流出带宽" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400000 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流入流量" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + { + "id": "unit", + "value": "bits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流出流量" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + { + "id": "unit", + "value": "bits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流入包速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + { + "id": "unit", + "value": "pps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流出包速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + { + "id": "unit", + "value": "pps" + } + ] + } + ] + }, "gridPos": { - "h": 5, + "h": 13, "w": 24, "x": 0, "y": 1 }, - "id": 185, - "showHeader": true, - "sort": { - "col": 14, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:1808", - "alias": "设备IP", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 1, - "link": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "device_id", - "thresholds": [], - "type": "string", - "unit": "bytes" - }, - { - "$$hashKey": "object:1809", - "alias": "虚拟接口", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "name", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:1810", - "alias": "时延", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "mappingType": 1, - "pattern": "Value #A", - "thresholds": [ - "5", - "10" - ], - "type": "number", - "unit": "ms" - }, - { - "$$hashKey": "object:1814", - "alias": "丢包率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #B", - "thresholds": [ - "70", - "85" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1815", - "alias": "网络流入带宽", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #C", - "thresholds": [ - "" - ], - "type": "number", - "unit": "binbps" - }, - { - "$$hashKey": "object:1816", - "alias": "网络流出带宽", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #D", - "thresholds": [ - "" - ], - "type": "number", - "unit": "binbps" - }, - { - "$$hashKey": "object:1817", - "alias": "网络流入流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #E", - "thresholds": [ - "" - ], - "type": "number", - "unit": "bytes" - }, - { - "$$hashKey": "object:1818", - "alias": "网络流出流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #F", - "thresholds": [ - "" - ], - "type": "number", - "unit": "bytes" - }, - { - "$$hashKey": "object:1819", - "alias": "网络流入包速率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #G", - "thresholds": [ - "30485760", - "104857600" - ], - "type": "number", - "unit": "none" - }, - { - "$$hashKey": "object:1820", - "alias": "网络流出包速率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #H", - "thresholds": [], - "type": "number", - "unit": "none" + "show": false }, - { - "$$hashKey": "object:1823", - "alias": "", - "align": "right", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "hidden", - "unit": "short" - } - ], - "datasource": "${prometheus-cloudeye-exporter}", + "showHeader": true + }, + "pluginVersion": "10.2.0", "targets": [ { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{} - 0", + "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{epId=~\"$EPS\"} - 0", "format": "table", - "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流入带宽", - "refId": "C" + "legendFormat": "__auto", + "range": false, + "refId": "A" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcaas_network_outgoing_bits_rate{} - 0", + "expr": "huaweicloud_sys_dcaas_network_outgoing_bits_rate{epId=~\"$EPS\"} - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流出带宽", - "refId": "D" + "legendFormat": "__auto", + "range": false, + "refId": "B" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_network_incoming_bytes{}) by (name) - 0", + "expr": "avg(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\"}) by (name) - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流入流量", - "refId": "E" + "legendFormat": "__auto", + "range": false, + "refId": "C" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_bytes{}) by (name) - 0", + "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_bytes{epId=~\"$EPS\"}) by (name) - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流出流量", - "refId": "F" + "legendFormat": "__auto", + "range": false, + "refId": "D" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_network_incoming_packets_rate{}) by (name) - 0", + "expr": "avg(huaweicloud_sys_dcaas_network_incoming_packets_rate{epId=~\"$EPS\"}) by (name) - 0", "format": "table", + "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流入包速率", - "refId": "G" + "legendFormat": "__auto", + "range": false, + "refId": "E" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_packets_rate{}) by (name) - 0", + "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_packets_rate{epId=~\"$EPS\"}) by (name) - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流出包速率", - "refId": "H" + "legendFormat": "__auto", + "range": false, + "refId": "F" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_latency{}) by (name) - 0", + "expr": "avg(huaweicloud_sys_dcaas_latency{epId=~\"$EPS\"}) by (name) - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "时延", - "refId": "A" + "legendFormat": "__auto", + "range": false, + "refId": "G" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_dcaas_packet_loss_rate{}) by (name) -0", + "expr": "avg(huaweicloud_sys_dcaas_packet_loss_rate{epId=~\"$EPS\"}) by (name) -0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "丢包率", - "refId": "B" + "legendFormat": "__auto", + "range": false, + "refId": "H" } ], "title": "云专线资源总览表", - "transform": "table", - "type": "table-old" + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "device_id", + "name", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A": "网络流入带宽", + "Value #B": "网络流出带宽", + "Value #C": "网络流入流量", + "Value #D": "网络流出流量", + "Value #E": "网络流入包速率", + "Value #F": "网络流出包速率", + "device_id": "设备IP", + "name": "虚拟接口" + } + } + } + ], + "type": "table" }, { "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 6 + "y": 14 }, - "id": 189, + "id": 7, "panels": [], "title": "资源明细:【$EPS】【$hostIP】【$hostname】", "type": "row" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "网络流入带宽(+)/网络流出带宽(-)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 10, "w": 12, "x": 0, - "y": 7 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:1605", - "alias": "/.*总使用率/", - "color": "#C4162A", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_latency{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-时延", - "refId": "A", - "step": 20 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "时延", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "ms", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 7 + "y": 15 }, - "height": "300", - "hiddenSeries": false, - "id": 156, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 3, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:154", - "alias": "", - "color": "rgb(0, 209, 255)", - "lines": false, - "pointradius": 1, - "points": true, - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_packet_loss_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-丢包率", - "refId": "A", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "丢包率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "decimals": 2, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "max": "100", - "min": "0", - "show": false + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 17 - }, - "height": "300", - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:129", - "alias": "", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-网络流入带宽", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流入带宽)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bits_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bits_rate{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "hide": false, - "interval": "", - "legendFormat": "{{device_id}}({{name}})-网络流出带宽", + "instant": false, + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流出带宽)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "网络(流入/流出)带宽", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "format": "binbps", - "label": "网络流入带宽(+)/网络流出带宽(-)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", - "editable": true, - "error": false, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "网络流入带宽(+)/网络流出带宽(-)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbits" }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, "gridPos": { "h": 10, "w": 12, "x": 12, - "y": 17 + "y": 15 }, - "height": "300", - "hiddenSeries": false, - "id": 190, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", + "id": 4, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:129", - "alias": "", - "color": "#C4162A" + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_network_incoming_bytes{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-网络流入流量", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流入流量)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bytes{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "hide": false, - "interval": "", - "legendFormat": "{{device_id}}({{name}})-网络流出流量", + "instant": false, + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流出流量)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "网络(流入/流出)流量", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "format": "bytes", - "label": "网络流入流量(+)/网络流出流量(-)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", - "editable": true, - "error": false, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "网络流入包速率(+)/网络流出包速率(-)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "pps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, "gridPos": { "h": 10, "w": 12, "x": 0, - "y": 27 - }, - "height": "300", - "hiddenSeries": false, - "id": 191, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 25 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", + "id": 5, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:129", - "alias": "", - "color": "#C4162A" + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_network_incoming_packets_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_dcaas_network_incoming_packets_rate{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-网络流入包速率", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流入包速率)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets_rate{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "hide": false, - "interval": "", - "legendFormat": "{{device_id}}({{name}})-网络流出包速率", + "instant": false, + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流出包速率)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "网络(流入/流出)包速率", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "format": "cps", - "label": "网络流入包速率(+)/网络流出包速率(-)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", - "editable": true, - "error": false, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "网络流入包量(+)/网络流出包量(-)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, "gridPos": { "h": 10, "w": 12, "x": 12, - "y": 27 - }, - "height": "300", - "hiddenSeries": false, - "id": 192, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 25 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", + "id": 6, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:129", - "alias": "", - "color": "#C4162A" + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_dcaas_network_incoming_packets{device_id=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_dcaas_network_incoming_packets{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{device_id}}({{name}})-网络流入包量", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流入包量)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets{epId=~\"$EPS\",device_id=~\"$hostIP\",name=~\"$hostname\"}", "hide": false, - "interval": "", - "legendFormat": "{{device_id}}({{name}})-网络流出包量", + "instant": false, + "legendFormat": "专线IP:{{device_id}},专线名称:({{name}}(网络流出包量)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "网络(流入/流出)包量", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "format": "none", - "label": "网络流入包量(+)/网络流出包量(-)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "refresh": "", - "schemaVersion": 34, - "style": "dark", - "tags": [ - "Prometheus" - ], + "schemaVersion": 38, + "tags": [], "templating": { "list": [ { - "current": { - "selected": true, - "text": [ - "default" - ], - "value": [ - "0" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "huaweicloud_epinfo", "hide": 0, "includeAll": true, @@ -1168,8 +910,9 @@ "name": "EPS", "options": [], "query": { + "qryType": 4, "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", @@ -1178,16 +921,8 @@ "type": "query" }, { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\"},device_id)", "hide": 0, "includeAll": true, @@ -1196,23 +931,20 @@ "name": "hostIP", "options": [], "query": { + "qryType": 1, "query": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\"},device_id)", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, + "sort": 0, "type": "query" }, { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "${prometheus-cloudeye-exporter}", - "definition": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\"},name)", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\", device_id=~\"$hostIP\"},name)", "hide": 0, "includeAll": true, "label": "专线名称", @@ -1220,13 +952,14 @@ "name": "hostname", "options": [], "query": { - "query": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\"},name)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\", device_id=~\"$hostIP\"},name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, + "sort": 0, "type": "query" } ] @@ -1235,32 +968,10 @@ "from": "now-1h", "to": "now" }, - "timepicker": { - "hidden": false, - "now": true, - "refresh_intervals": [ - "15s", - "30s", - "1m", - "5m", - "15m", - "30m" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "云专线(DCAAS)", - "uid": "9CWBz0bi6", - "version": 22, + "timepicker": {}, + "timezone": "", + "title": "云专线(DCAAS)", + "uid": "ecb22732-9c7d-41b2-a9cd-408a62798288", + "version": 1, "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/templates/dcs_dashboard_template.json b/grafana_dashboard/templates/dcs_dashboard_template.json index 802e61c..8c97d9b 100644 --- a/grafana_dashboard/templates/dcs_dashboard_template.json +++ b/grafana_dashboard/templates/dcs_dashboard_template.json @@ -1,55 +1,82 @@ { "__inputs": [ { - "name": "DS_3VI-GAUSS-TEST-PROMETHEUS", - "label": "3vi-gauss-test-prometheus", + "name": "DS_PROMETHEUS", + "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" } ], - "description": "【华为云DCS支持的监控指标】https://support.huaweicloud.com/usermanual-dcs/dcs-ug-0713011.html", - "editable": true, - "gnetId": 8919, - "graphTooltip": 0, - "id": null, - "iteration": 1723167509451, - "links": [ + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, { - "$$hashKey": "object:2302", - "asDropdown": true, - "icon": "external link", - "tags": [], - "targetBlank": true, - "title": "", - "type": "dashboards" + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "【分布式缓存服务监控指标说明】https://support.huaweicloud.com/usermanual-dcs/dcs-ug-0713011.html", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, "panels": [ { "collapsed": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, - "id": 187, + "id": 4, "panels": [], "repeat": "EPS", - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "refId": "A" - } - ], + "repeatDirection": "h", "title": "资源总览(企业项目)企业项目:$EPS,当前选中主机:$hostname", "type": "row" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "description": "", "fieldConfig": { "defaults": { @@ -58,7 +85,11 @@ }, "custom": { "align": "right", - "filterable": false + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "decimals": 2, "displayName": "", @@ -156,21 +187,17 @@ { "id": "custom.align" }, - { - "id": "custom.displayMode", - "value": "color-background" - }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { - "color": "dark-green", + "color": "green", "value": null }, { - "color": "orange", + "color": "semi-dark-orange", "value": 70 }, { @@ -179,6 +206,13 @@ } ] } + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -224,8 +258,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -271,8 +308,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -318,8 +358,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -365,8 +408,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -412,8 +458,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -455,8 +504,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -482,6 +534,75 @@ "id": "custom.align" } ] + }, + { + "matcher": { + "id": "byName", + "options": "node_type" + }, + "properties": [ + { + "id": "displayName", + "value": "节点类型" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "private_ip" + }, + "properties": [ + { + "id": "displayName", + "value": "节点IP" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "group_name" + }, + "properties": [ + { + "id": "displayName", + "value": "分片名称" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] } ] }, @@ -491,7 +612,7 @@ "x": 0, "y": 1 }, - "id": 196, + "id": 3, "options": { "cellHeight": "sm", "footer": { @@ -504,13 +625,25 @@ }, "showHeader": true }, - "pluginVersion": "7.5.17", + "pluginVersion": "10.2.0", "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"} -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU使用率", + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -519,10 +652,10 @@ "refId": "B" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -531,10 +664,10 @@ "refId": "C" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -543,10 +676,10 @@ "refId": "D" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -555,10 +688,10 @@ "refId": "E" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -567,10 +700,10 @@ "refId": "F" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", node_type!~\".+\"}", + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", "format": "table", "instant": true, "interval": "", @@ -578,36 +711,40 @@ "refId": "G" } ], - "title": "服务器资源总览表(主机实例)【企业项目:$EPS,实例总数:$total_instance】", + "title": "服务器资源总览表(数据节点)【企业项目:$EPS,节点总数:$total_node】", "transformations": [ { "id": "filterFieldsByName", "options": { "include": { "names": [ - "ip", + "cache_mode", + "group_name", "name", + "node_type", + "private_ip", "Value #A", "Value #B", "Value #C", "Value #D", "Value #E", "Value #F", - "Value #G", - "cache_mode" + "Value #G" ] } } }, { "id": "merge", - "options": {} + "options": { + "reducers": [] + } } ], "type": "table" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "description": "", "fieldConfig": { "defaults": { @@ -616,7 +753,11 @@ }, "custom": { "align": "right", - "filterable": false + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "decimals": 2, "displayName": "", @@ -714,17 +855,24 @@ { "id": "custom.align" }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "dark-green", "value": null }, { - "color": "semi-dark-orange", + "color": "orange", "value": 70 }, { @@ -733,10 +881,6 @@ } ] } - }, - { - "id": "custom.displayMode", - "value": "color-background" } ] }, @@ -782,8 +926,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -829,8 +976,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -876,8 +1026,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -923,8 +1076,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -970,8 +1126,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -1013,8 +1172,11 @@ } }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } } ] }, @@ -1040,75 +1202,6 @@ "id": "custom.align" } ] - }, - { - "matcher": { - "id": "byName", - "options": "node_type" - }, - "properties": [ - { - "id": "displayName", - "value": "节点类型" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "private_ip" - }, - "properties": [ - { - "id": "displayName", - "value": "节点IP" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "group_name" - }, - "properties": [ - { - "id": "displayName", - "value": "分片名称" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] } ] }, @@ -1118,7 +1211,7 @@ "x": 0, "y": 11 }, - "id": 185, + "id": 2, "options": { "cellHeight": "sm", "footer": { @@ -1131,37 +1224,25 @@ }, "showHeader": true }, - "pluginVersion": "7.5.17", + "pluginVersion": "10.2.0", "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"} -0", + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "hide": false, "instant": true, "interval": "", - "legendFormat": "CPU使用率", - "refId": "A" + "legendFormat": "内存使用率", + "refId": "B" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "内存使用率", - "refId": "B" - }, - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "editorMode": "code", - "exemplar": false, - "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -1170,10 +1251,10 @@ "refId": "C" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -1182,10 +1263,10 @@ "refId": "D" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -1194,10 +1275,10 @@ "refId": "E" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "hide": false, "instant": true, @@ -1206,10 +1287,10 @@ "refId": "F" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", node_type!~\".+\"}", "format": "table", "instant": true, "interval": "", @@ -1217,2390 +1298,1902 @@ "refId": "G" } ], - "title": "服务器资源总览表(数据节点)【企业项目:$EPS,节点总数:$total_node】", + "title": "服务器资源总览表(主机实例)【企业项目:$EPS,实例总数:$total_instance】", "transformations": [ { "id": "filterFieldsByName", "options": { "include": { "names": [ - "cache_mode", - "group_name", "ip", "name", - "node_type", - "private_ip", "Value #A", "Value #B", "Value #C", "Value #D", "Value #E", "Value #F", - "Value #G" + "Value #G", + "cache_mode" ] } } }, { "id": "merge", - "options": { - "reducers": [] - } + "options": {} } ], "type": "table" }, { - "collapsed": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 21 }, - "id": 189, + "id": 5, "panels": [], "repeat": "EPS", "repeatDirection": "h", - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "refId": "A" - } - ], "title": "资源明细:企业项目【$EPS】 缓存类型【$cache_mode】 主机名【$hostname】", "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 24, "x": 0, "y": 22 }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 6, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", dcs_cluster_redis_node=~\".+\", name=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "refId": "A", - "step": 20 + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU使用率(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:229", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:230", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 31 }, - "hiddenSeries": false, - "id": 156, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 7, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"} - 0", - "format": "time_series", - "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}", - "refId": "A", - "step": 4 + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "内存使用率(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:323", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:324", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 31 }, - "hiddenSeries": false, - "id": 198, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 8, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"} - 0", - "format": "time_series", - "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "refId": "A", - "step": 4 + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "内存使用率(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "short" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 0, "y": 40 }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 9, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_keys{name=~\"$hostname\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "缓存键总数(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:403", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:404", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "short" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 12, "y": 40 }, - "hiddenSeries": false, - "id": 199, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 10, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_keys{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "缓存键总数(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "percent" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 49 - }, - "hiddenSeries": false, - "id": 192, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "主机名:{{name}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "缓存命中率(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 48 }, - "yaxes": [ - { - "$$hashKey": "object:605", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ { - "$$hashKey": "object:606", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "instant": false, + "legendFormat": "主机名:{{name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "缓存命中率(主机实例)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "percent" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 49 - }, - "hiddenSeries": false, - "id": 200, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 48 + }, + "id": 12, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "缓存命中率(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:675", - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:676", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "Kbits" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "KBs" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 0, - "y": 59 - }, - "hiddenSeries": false, - "id": 161, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 56 + }, + "id": 13, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_instantaneous_input_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"} - 0", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}}-网络瞬时输入流量", "range": true, - "refId": "A", - "step": 10 + "refId": "A" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "0 - huaweicloud_sys_dcs_instantaneous_output_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "hide": false, - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}}--网络瞬时输出流量", "range": true, - "refId": "B", - "step": 10 + "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "网络瞬时(输入/输出)流量(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:755", - "format": "Kbits", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:756", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "Kbits" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "KBs" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 12, - "y": 59 - }, - "hiddenSeries": false, - "id": 201, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 56 + }, + "id": 14, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_instantaneous_input_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"} - 0", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-网络瞬时输入流量", "range": true, - "refId": "A", - "step": 10 + "refId": "A" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "0 - huaweicloud_sys_dcs_instantaneous_output_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "hide": false, - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-网络瞬时输出流量", "range": true, - "refId": "B", - "step": 10 + "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "网络瞬时(输入/输出)流量(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:845", - "format": "Kbits", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:846", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 68 - }, - "hiddenSeries": false, - "id": 194, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_dcs_is_slow_log_exist{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "主机名:{{name}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "是否存在慢日志", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "y": 64 }, - "yaxes": [ - { - "$$hashKey": "object:925", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:926", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 68 - }, - "hiddenSeries": false, - "id": 202, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 15, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_dcs_is_slow_log_exist{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "是否存在慢日志(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1081", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - { - "$$hashKey": "object:1082", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [], - "unit": "ms" - }, - "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 78 - }, - "hiddenSeries": false, - "id": 195, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "命令最大时延(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1253", - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1254", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "ms" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 78 - }, - "hiddenSeries": false, - "id": 203, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 64 + }, + "id": 17, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "命令最大时延(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "legendFormat": "主机名:{{name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "命令最大时延(主机实例)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 88 + "y": 72 }, - "hiddenSeries": false, - "id": 193, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 16, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_expires{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}-有过期时间的键总数", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "0 - huaweicloud_sys_dcs_expired_keys{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", "hide": false, - "interval": "", + "instant": false, "legendFormat": "主机名:{{name}}-已过期的键总数", "range": true, "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "缓存过期键总数(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 88 + "y": 72 }, - "hiddenSeries": false, - "id": 204, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "id": 18, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_expires{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-有过期时间的键总数", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" }, { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "0 - huaweicloud_sys_dcs_expired_keys{epId=~\"$EPS\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "expr": "0 - huaweicloud_sys_dcs_expired_keys{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", "hide": false, - "interval": "", + "instant": false, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-已过期的键总数", "range": true, "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "缓存过期键总数(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 0, - "y": 98 - }, - "hiddenSeries": false, - "id": 190, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 80 + }, + "id": 19, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_instantaneous_ops{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "每秒并发操作数(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 12, - "y": 98 - }, - "hiddenSeries": false, - "id": 205, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 80 + }, + "id": 20, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_instantaneous_ops{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "每秒并发操作数(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 107 - }, - "hiddenSeries": false, - "id": 174, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 88 + }, + "id": 21, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_bandwidth_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "带宽使用率(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 107 - }, - "hiddenSeries": false, - "id": 206, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 88 + }, + "id": 22, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_bandwidth_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", "instant": false, - "interval": "", - "intervalFactor": 1, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "带宽使用率(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 117 - }, - "hiddenSeries": false, - "id": 168, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 96 + }, + "id": 23, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}}", "range": true, - "refId": "A", - "step": 10 + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "流控次数(主机实例)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1751", - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1752", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 117 - }, - "hiddenSeries": false, - "id": 207, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", + "y": 96 + }, + "id": 24, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, + "instant": false, "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", "range": true, - "refId": "A", - "step": 10 + "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "流控次数(数据节点)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1821", - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1822", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], - "refresh": "15s", - "schemaVersion": 27, - "style": "dark", - "tags": [ - "Prometheus" - ], + "refresh": "", + "schemaVersion": 38, + "tags": [], "templating": { "list": [ { - "allValue": null, "current": {}, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "definition": "huaweicloud_epinfo", - "description": null, - "error": null, + "description": "", "hide": 0, "includeAll": false, "label": "企业项目", @@ -3608,53 +3201,41 @@ "name": "EPS", "options": [], "query": { + "qryType": 4, "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, "current": {}, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", - "definition": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\"},cache_mode)", - "description": null, - "error": null, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=\"$EPS\"},cache_mode)", "hide": 0, "includeAll": true, "label": "缓存类型", - "multi": false, + "multi": true, "name": "cache_mode", "options": [], "query": { - "query": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\"},cache_mode)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=\"$EPS\"},cache_mode)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 5, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, "current": {}, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\"},name)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "主机名", @@ -3669,50 +3250,35 @@ "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 0, + "type": "query" }, { - "allValue": null, "current": {}, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "definition": "query_result(count(huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}))", - "description": null, - "error": null, "hide": 2, "includeAll": false, - "label": "", "multi": false, "name": "total_instance", "options": [], "query": { + "qryType": 3, "query": "query_result(count(huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}))", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/{} (.*) .*/", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, "current": {}, - "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "datasource": "${DS_PROMETHEUS}", "definition": "query_result(count(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}))", - "description": null, - "error": null, "hide": 2, "includeAll": false, - "label": null, "multi": false, "name": "total_node", "options": [], @@ -3725,43 +3291,18 @@ "regex": "/{}(.*) .*/", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, "time": { - "from": "now-1h", + "from": "now-6h", "to": "now" }, - "timepicker": { - "hidden": false, - "now": true, - "refresh_intervals": [ - "15s", - "30s", - "1m", - "5m", - "15m", - "30m" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "分布式缓存服务(DCS)", - "uid": "9CWBz0bi8", - "version": 5 + "timepicker": {}, + "timezone": "", + "title": "分布式缓存服务(DCS)", + "uid": "da3c0360-5de1-49f7-9c96-0149f38af83f", + "version": 7, + "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/templates/ddos_dashboard_template.json b/grafana_dashboard/templates/ddos_dashboard_template.json index 090196d..1f71051 100644 --- a/grafana_dashboard/templates/ddos_dashboard_template.json +++ b/grafana_dashboard/templates/ddos_dashboard_template.json @@ -2,56 +2,13 @@ "__inputs": [ { "name": "DS_PROMETHEUS", - "label": "prometheus", + "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" } ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.4.1" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, @@ -73,10 +30,20 @@ "liveNow": false, "panels": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 }, + "id": 15, + "panels": [], + "title": "DDOS-AAD高防实例", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -105,7 +72,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -135,13 +102,18 @@ "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 14, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -152,27 +124,21 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_service_bandwidth_usage{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_service_bandwidth_usage{instance_id=~\".+\"}", "interval": "", "legendFormat": "{{name}}", "range": true, "refId": "A" } ], - "title": "$EPS:业务带宽利用率", + "title": "业务带宽利用率", "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -201,7 +167,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -223,7 +189,8 @@ "value": 80 } ] - } + }, + "unit": "bps" }, "overrides": [] }, @@ -231,13 +198,18 @@ "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 2, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -248,13 +220,10 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_internet_in_rate{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_internet_in_rate{instance_id=~\".+\"}", "hide": false, "instant": false, "interval": "", @@ -262,14 +231,11 @@ "refId": "B" } ], - "title": "$EPS:入带宽", + "title": "入带宽", "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -298,7 +264,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -328,13 +294,18 @@ "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 9 }, "id": 12, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -345,27 +316,21 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_concurrent_connection{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_concurrent_connection{instance_id=~\".+\"}", "interval": "", "legendFormat": "{{name}}", "range": true, "refId": "A" } ], - "title": "$EPS:并发连接数", + "title": "并发连接数", "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -394,7 +359,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -416,7 +381,8 @@ "value": 80 } ] - } + }, + "unit": "bps" }, "overrides": [] }, @@ -424,13 +390,18 @@ "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 9 }, "id": 4, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -441,27 +412,21 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_drop_rate{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_drop_rate{instance_id=~\".+\"}", "instant": false, "interval": "", - "legendFormat": "{{name}} unit: {{unit}}", + "legendFormat": "{{name}}", "refId": "A" } ], - "title": "$EPS:攻击带宽", + "title": "攻击带宽", "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -490,7 +455,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -512,7 +477,8 @@ "value": 80 } ] - } + }, + "unit": "bps" }, "overrides": [] }, @@ -520,13 +486,18 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 17 }, "id": 10, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -537,27 +508,21 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_back_to_source_rate{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_back_to_source_rate{instance_id=~\".+\"}", "interval": "", - "legendFormat": "{{name}} unit: {{unit}}", + "legendFormat": "{{name}}", "range": true, "refId": "A" } ], - "title": "$EPS:回源带宽", + "title": "回源带宽", "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -586,7 +551,7 @@ "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -616,13 +581,126 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 17 }, "id": 8, "options": { "legend": { - "calcs": [], - "displayMode": "list", + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_ddos_instance_new_connection{instance_id=~\".+\"}", + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "新建连接", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 16, + "panels": [], + "title": "DDOS-CNAD防护包", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", "placement": "bottom", "showLegend": true }, @@ -633,61 +711,911 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_ddos_instance_concurrent_connection{package=~\".+\"}", + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "并发连接数", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 6, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, - "expr": "huaweicloud_sys_ddos_instance_new_connection{epId=~\"$EPS\"}", + "expr": "huaweicloud_sys_ddos_instance_internet_in_rate{package=~\".+\"}", + "hide": false, + "instant": false, "interval": "", "legendFormat": "{{name}} unit: {{unit}}", + "refId": "B" + } + ], + "title": "入带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 21, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_ddos_instance_back_to_source_rate{package=~\".+\"}", + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "回源带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 20, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_ddos_instance_drop_rate{package=~\".+\"}", + "instant": false, + "interval": "", + "legendFormat": "{{name}}", + "refId": "A" + } + ], + "title": "攻击带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_ddos_instance_new_connection{package=~\".+\"}", + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "新建连接", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 50 + }, + "id": 23, + "panels": [], + "title": "DDOS-CNAD防护IP", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为高防IP攻击带宽。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 51 + }, + "id": 24, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ddos_ip_drop_rate{package_name=~\".+\"}", + "instant": false, + "legendFormat": "防护包名:{{package_name}},ip:{{ip_address}}", + "range": true, + "refId": "A" + } + ], + "title": "攻击带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为高防IP业务带宽。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 51 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ddos_ip_back_to_source_rate{package_name=~\".+\"}", + "instant": false, + "legendFormat": "防护包名:{{package_name}},ip:{{ip_address}}", + "range": true, + "refId": "A" + } + ], + "title": "业务带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为高防IP入带宽。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "KBs" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 59 + }, + "id": 26, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ddos_ip_internet_in_rate{package_name=~\".+\"}", + "instant": false, + "legendFormat": "防护包名:{{package_name}},ip:{{ip_address}}", + "range": true, + "refId": "A" + } + ], + "title": "入带宽", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为高防IP新建连接数。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 59 + }, + "id": 27, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ddos_ip_new_connection{package_name=~\".+\"}", + "instant": false, + "legendFormat": "防护包名:{{package_name}},ip:{{ip_address}}", + "range": true, + "refId": "A" + } + ], + "title": "新建连接", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为高防IP并发连接数。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 67 + }, + "id": 28, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ddos_ip_concurrent_connection{package_name=~\".+\"}", + "instant": false, + "legendFormat": "防护包名:{{package_name}},ip:{{ip_address}}", "range": true, "refId": "A" } ], - "title": "$EPS:新建连接", + "title": "并发连接", "type": "timeseries" } ], - "refresh": false, - "schemaVersion": 39, + "refresh": "", + "schemaVersion": 38, "tags": [], "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "huaweicloud_epinfo", - "hide": 0, - "includeAll": false, - "label": "企业项目", - "multi": false, - "name": "EPS", - "options": [], - "query": { - "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] + "list": [] }, "time": { - "from": "now-5m", + "from": "now-1h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "DDOS高防", "uid": "CKR6ZzJSk", - "version": 7, + "version": 2, "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/templates/dns_dashboard_template.json b/grafana_dashboard/templates/dns_dashboard_template.json new file mode 100644 index 0000000..bda7d8b --- /dev/null +++ b/grafana_dashboard/templates/dns_dashboard_template.json @@ -0,0 +1,455 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.1.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_dns_recordset_noerror_count", + "instant": false, + "legendFormat": "{{dns_recordset_id}}", + "range": true, + "refId": "A" + } + ], + "title": "记录集NOERROR解析次数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_dns_zone_noerror_count{name!=\"\"}", + "instant": false, + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "解析成功请求量统计", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_dns_zone_nxdomain_count{name!=\"\"}", + "instant": false, + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "解析不存在请求量统计", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_dns_zone_servfail_count{name!=\"\"}", + "instant": false, + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "解析失败请求量统计", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "云解析服务 DNS", + "uid": "edxv7jb9ed2ioa", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/ecs_dashboard_template.json b/grafana_dashboard/templates/ecs_dashboard_template.json index 022a59f..9beaa5a 100644 --- a/grafana_dashboard/templates/ecs_dashboard_template.json +++ b/grafana_dashboard/templates/ecs_dashboard_template.json @@ -1,1153 +1,1729 @@ { "__inputs": [ { - "name": "prometheus-cloudeye-exporter", - "label": "prometheus-cloudeye-exporter", - "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", "type": "datasource", "pluginId": "prometheus", - "pluginName": "prometheus" + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, "description": "【华为云ECS支持的监控指标】https://support.huaweicloud.com/usermanual-ecs/ecs_03_1002.html", "editable": true, "fiscalYearStartMonth": 0, - "gnetId": 8919, "graphTooltip": 0, - "id": 1, - "iteration": 1651715271451, + "id": null, "links": [], "liveNow": false, "panels": [ { "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, - "id": 187, + "id": 15, "panels": [], "repeat": "EPS", + "repeatDirection": "h", "title": "资源总览(企业项目)企业项目:$EPS,当前选中主机:$hostname", "type": "row" }, { - "columns": [], + "datasource": "${DS_PROMETHEUS}", "description": "分区使用率、磁盘读取、磁盘写入、下载带宽、上传带宽,如果有多个网卡或者多个分区,是采集的使用率最高的网卡或者分区的数值。\n\n连接数:CurrEstab - 当前状态为 ESTABLISHED 或 CLOSE-WAIT 的 TCP 连接数。", - "fontSize": "80%", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CPU使用率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "内存使用率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "磁盘使用率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "TCP连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 1000 + }, + { + "color": "dark-red", + "value": 1500 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "下载带宽" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 30485760 + }, + { + "color": "dark-red", + "value": 104857600 + } + ] + } + }, + { + "id": "unit", + "value": "bps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "上传带宽" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 30485760 + }, + { + "color": "dark-red", + "value": 104857600 + } + ] + } + }, + { + "id": "unit", + "value": "bps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "5min负载" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "IP" + }, + "properties": [ + { + "id": "custom.width", + "value": 437 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "主机名" + }, + "properties": [ + { + "id": "custom.width", + "value": 379 + } + ] + } + ] + }, "gridPos": { - "h": 10, + "h": 8, "w": 24, "x": 0, "y": 1 }, - "id": 185, - "showHeader": true, - "sort": { - "col": 14, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:1808", - "alias": "主机名", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 1, - "link": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "hostname", - "thresholds": [], - "type": "string", - "unit": "bytes" - }, - { - "$$hashKey": "object:1809", - "alias": "IP", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "hostIP", - "thresholds": [], - "type": "number", - "unit": "short" - }, - { - "$$hashKey": "object:1810", - "alias": "磁盘使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "mappingType": 1, - "pattern": "Value #B", - "thresholds": [], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1814", - "alias": "CPU使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #F", - "thresholds": [ - "70", - "85" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1815", - "alias": "内存使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #G", - "thresholds": [ - "70", - "85" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1816", - "alias": "磁盘读取*", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #H", - "thresholds": [ - "10485760", - "20485760" - ], - "type": "number", - "unit": "Bps" - }, - { - "$$hashKey": "object:1817", - "alias": "磁盘写入*", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #I", - "thresholds": [ - "10485760", - "20485760" - ], - "type": "number", - "unit": "Bps" - }, - { - "$$hashKey": "object:1818", - "alias": "下载带宽*", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #J", - "thresholds": [ - "30485760", - "104857600" - ], - "type": "number", - "unit": "bps" - }, - { - "$$hashKey": "object:1819", - "alias": "上传带宽*", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #K", - "thresholds": [ - "30485760", - "104857600" - ], - "type": "number", - "unit": "bps" - }, - { - "$$hashKey": "object:1820", - "alias": "5min负载", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #L", - "thresholds": [], - "type": "number", - "unit": "short" - }, - { - "$$hashKey": "object:1821", - "alias": "连接数", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #M", - "thresholds": [ - "1000", - "1500" - ], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:1822", - "alias": "TCP_tw", - "align": "center", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "mappingType": 1, - "pattern": "Value #N", - "thresholds": [ - "5000", - "20000" + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "number", - "unit": "short" + "show": false }, - { - "$$hashKey": "object:1823", - "alias": "", - "align": "right", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "hidden", - "unit": "short" - } - ], - "datasource": "${prometheus-cloudeye-exporter}", + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "CPU使用率" + } + ] + }, + "pluginVersion": "10.2.0", "targets": [ { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"} -0", + "expr": "avg(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"}) by (hostname,hostIP)", "format": "table", - "hide": false, "instant": true, - "interval": "", - "legendFormat": "CPU使用率", - "refId": "F" + "legendFormat": "__auto", + "range": false, + "refId": "A" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"} -0", + "expr": "avg(huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"}) by (hostname,hostIP)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "内存使用率", - "refId": "G" + "legendFormat": "__auto", + "range": false, + "refId": "B" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_agt_ecs_SlAsH_disk_usedPercent{epId=~\"$EPS\"} - 0", + "expr": "avg(huaweicloud_agt_ecs_disk_usedPercent{epId=~\"$EPS\"}) by (hostname,hostIP)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "磁盘使用率", - "refId": "B" + "legendFormat": "__auto", + "range": false, + "refId": "C" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_agt_ecs_net_tcp_total{epId=~'$EPS'} ", + "expr": "avg(huaweicloud_agt_ecs_net_tcp_total{epId=~'$EPS'}) by (hostname,hostIP)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "连接数", - "refId": "M" + "legendFormat": "__auto", + "range": false, + "refId": "D" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_agt_ecs_net_bitSent{epId=~'$EPS'}) by (hostIP)", + "expr": "avg(huaweicloud_agt_ecs_net_bitSent{epId=~'$EPS'}) by (hostname,hostIP)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "下载带宽", - "refId": "J" + "legendFormat": "__auto", + "range": false, + "refId": "E" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_agt_ecs_net_bitRecv{epId=~'$EPS'}) by (hostIP)", + "expr": "avg(huaweicloud_agt_ecs_net_bitRecv{epId=~'$EPS'}) by (hostname,hostIP)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "上传带宽", - "refId": "K" + "legendFormat": "__auto", + "range": false, + "refId": "F" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) by (hostIP)", + "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) by (hostname,hostIP)", "format": "table", + "hide": false, "instant": true, - "interval": "", - "legendFormat": "5分钟负载", - "refId": "L" + "legendFormat": "__auto", + "range": false, + "refId": "G" } ], "title": "服务器资源总览表【企业项目:$EPS,主机总数:$total】", - "transform": "table", - "type": "table-old" - }, - { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 11 - }, - "hiddenSeries": false, - "id": 191, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:421", - "alias": "总平均使用率", - "lines": false, - "pointradius": 1, - "points": true, - "yaxis": 2 - }, - { - "$$hashKey": "object:422", - "alias": "总负载", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) * 100", - "format": "time_series", - "hide": false, - "interval": "5m", - "intervalFactor": 1, - "legendFormat": "总5分钟负载", - "refId": "A", - "step": 240 + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "hostIP", + "hostname", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "Value #G" + ] + } + } }, { - "exemplar": true, - "expr": "avg((huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"}))", - "format": "time_series", - "hide": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "总平均使用率", - "refId": "F", - "step": 240 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "$EPS:整体总负载与整体平均CPU使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:8791", - "format": "short", - "label": "总负载", - "logBase": 1, - "show": true + "id": "merge", + "options": {} }, { - "$$hashKey": "object:8792", - "decimals": 0, - "format": "percent", - "label": "平均使用率", - "logBase": 1, - "show": true + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A": "CPU使用率", + "Value #B": "内存使用率", + "Value #C": "磁盘使用率", + "Value #D": "TCP连接数", + "Value #E": "下载带宽", + "Value #F": "上传带宽", + "Value #G": "5min负载", + "hostIP": "IP", + "hostname": "主机名", + "instance_id": "实例ID" + } + } } ], - "yaxis": { - "align": false - } + "type": "table" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 1, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 11 - }, - "height": "300", - "hiddenSeries": false, - "id": 195, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:495", - "alias": "总平均使用率" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "avg(huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"})", - "format": "time_series", - "hide": false, - "interval": "3m", - "intervalFactor": 1, - "legendFormat": "总平均使用率", - "refId": "H" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "$EPS:整体平均内存使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:8938", - "format": "percent", - "label": "内存使用率", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:8939", - "format": "percent", - "label": "平均使用率", - "logBase": 1, - "show": false + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "5分钟整体负载" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "left" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.axisLabel", + "value": "5分钟整体负载" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "总平均CPU使用率" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "custom.axisLabel", + "value": "总平均CPU使用率" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 9 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) * 100", + "instant": false, + "legendFormat": "5分钟整体负载", + "range": true, + "refId": "A" + }, + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "avg((huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"}))", + "hide": false, + "instant": false, + "legendFormat": "总平均CPU使用率", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "$EPS:整体总负载与整体平均CPU使用率", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 1, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { - "h": 7, + "h": 9, "w": 8, - "x": 16, - "y": 11 - }, - "hiddenSeries": false, - "id": 197, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "x": 8, + "y": 9 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 3, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ + "targets": [ { - "$$hashKey": "object:569", - "alias": "总平均使用率", - "lines": false, - "pointradius": 1, - "points": true, - "yaxis": 2 + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "avg(huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"})", + "instant": false, + "legendFormat": "总平均内存使用率", + "range": true, + "refId": "A" } ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", + "title": "$EPS:整体平均内存使用率", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, "targets": [ { - "exemplar": true, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "expr": "avg(huaweicloud_agt_ecs_disk_usedPercent + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util*0)", - "format": "time_series", "instant": false, - "interval": "3m", - "intervalFactor": 1, "legendFormat": "系统磁盘总使用率", - "refId": "E" + "range": true, + "refId": "A" + } + ], + "title": "$EPS:整体平均磁盘使用率", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 16, + "panels": [], + "repeat": "EPS", + "repeatDirection": "h", + "title": "资源明细:【$EPS】【$hostIP】", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_cpu_usage{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU使用率", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_mem_usedPercent{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}}", + "range": true, + "refId": "A" + } + ], + "title": "内存使用率", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_load_average5{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}}", + "range": true, + "refId": "A" + } + ], + "title": "系统5分钟平均负载", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 27 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_disk_usedPercent{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}}", + "range": true, + "refId": "A" + } + ], + "title": "磁盘使用率", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "thresholds": [], - "timeRegions": [], - "title": "$EPS:整体平均磁盘使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] }, - "yaxes": [ + "targets": [ { - "$$hashKey": "object:8990", - "decimals": 1, - "format": "percent", - "label": "磁盘使用率", - "logBase": 1, - "min": "0", - "show": true + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ecs_disk_read_requests_rate{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}} - 磁盘读IOPS", + "range": true, + "refId": "A" }, { - "$$hashKey": "object:8991", - "format": "percent", - "label": "平均使用率", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ecs_disk_write_requests_rate{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "hide": false, + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}} - 磁盘写IOPS", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } - }, - { - "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 189, - "panels": [], - "repeat": "EPS", - "title": "资源明细:【$EPS】【$hostIP】", - "type": "row" + "title": "磁盘读写速率(IOPS)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "iops" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "x": 12, + "y": 35 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 10, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:1605", - "alias": "", - "color": "#C4162A", - "fill": 0 + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_cpu_usage{hostIP=~\"$hostIP\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_disk_ioUtils{disk=~\".+\",epId=~\"$EPS\",hostIP=~\"$hostIP\",hostname=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-CPU使用率", - "refId": "A", - "step": 20 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "show": true + "legendFormat": "主机IP: {{hostIP}},主机名:{{hostname}},盘符:{{disk}} (磁盘I/O使用率)", + "range": true, + "refId": "A" }, { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_disk_ioUtils{mount_point=~\".+\",epId=~\"$EPS\",hostIP=~\"$hostIP\",hostname=~\"$hostname\"}", + "hide": false, + "instant": false, + "legendFormat": "主机IP: {{hostIP}},主机名:{{hostname}},挂载点:{{mount_point}} (挂载点I/O使用率)", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "磁盘/挂载点 I/O使用率", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "读取(-)/写入(+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, - "x": 12, - "y": 19 - }, - "height": "300", - "hiddenSeries": false, - "id": 156, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "x": 0, + "y": 43 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 11, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:154", - "alias": "", - "color": "rgb(0, 209, 255)", - "lines": false, - "pointradius": 1, - "points": true, - "yaxis": 2 + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_mem_usedPercent{hostIP=~\"$hostIP\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0- huaweicloud_sys_ecs_disk_read_bytes_rate{epId=~'$EPS', hostname=~\"$hostname\",hostIP=~'$hostIP'}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})内存使用率", - "refId": "A", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "内存使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}} - 磁盘读操作速率", + "range": true, + "refId": "A" }, { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "max": "100", - "min": "0", - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_ecs_disk_write_bytes_rate{hostIP=~\"$hostIP\",epId=~\"$EPS\",hostname=~\"$hostname\"}", + "hide": false, + "instant": false, + "legendFormat": "主机名:{{hostname}},主机IP:{{hostIP}} - 磁盘写操作速率", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "磁盘读写速率(IOPS)", + "type": "timeseries" }, { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "editable": true, - "error": false, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, "gridPos": { - "h": 10, + "h": 8, "w": 12, - "x": 0, - "y": 29 - }, - "height": "300", - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "x": 12, + "y": 43 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", + "id": 12, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:129", - "alias": "", - "color": "#C4162A" + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", + }, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_load_average5{hostIP=~\"$hostIP\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_disk_inodesUsedPercent{epId=~\"$EPS\",hostIP=~\"$hostIP\",hostname=~\"$hostname\",mount_point=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-5分钟负载", - "metric": "", - "refId": "A", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "系统平均负载", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "format": "short", - "logBase": 1, - "show": true + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}},挂载点:{{mount_point}}(挂载点iNode使用率)", + "range": true, + "refId": "A" }, { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": true + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_disk_inodesUsedPercent{epId=~\"$EPS\",hostIP=~\"$hostIP\",hostname=~\"$hostname\",disk=~\".+\"}", + "hide": false, + "instant": false, + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}},盘符:{{disk}}(磁盘iNode使用率)", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "磁盘iNode使用率", + "type": "timeseries" }, { - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisLabel": "", + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "出网(-)/入网(+)", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -1158,14 +1734,15 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, + "lineWidth": 1, + "pointSize": 2, "scaleDistribution": { "type": "linear" }, - "showPoints": "never", - "spanNulls": true, + "showPoints": "auto", + "spanNulls": false, "stacking": { "group": "A", "mode": "none" @@ -1174,10 +1751,8 @@ "mode": "off" } }, - "links": [], + "decimals": 2, "mappings": [], - "max": 100, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -1191,770 +1766,172 @@ } ] }, - "unit": "percent" + "unit": "bps" }, "overrides": [] }, "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 29 + "h": 13, + "w": 24, + "x": 0, + "y": 51 }, - "id": 174, - "links": [], + "id": 13, "options": { "legend": { "calcs": [ - "mean", "lastNotNull", + "min", "max", - "min" + "mean" ], "displayMode": "table", - "placement": "bottom" + "placement": "right", + "showLegend": true }, "tooltip": { - "mode": "multi", + "mode": "single", "sort": "none" } }, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_disk_usedPercent + on (instance_id) group_left (EPS,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_net_bitRecv{epId=~\"$EPS\",hostIP=~'$hostIP',hostname=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}_{{hostname}}_{{mount_point}}-磁盘使用率", + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}}(入网带宽)", + "range": true, "refId": "A" - } - ], - "title": "磁盘使用率", - "type": "timeseries" - }, - { - "aliasColors": { - "vda_write": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Read Requests: 每个磁盘分区每秒读完成次数\n\nWrite Requests: 每个磁盘分区每秒写完成次数", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 39 - }, - "height": "300", - "hiddenSeries": false, - "id": 161, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:545", - "alias": "/.*_读取$/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_ecs_disk_read_requests_rate{hostIP=~'$hostIP'}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-磁盘读IOPS", - "refId": "A", - "step": 10 - }, - { - "exemplar": true, - "expr": "huaweicloud_sys_ecs_disk_write_requests_rate{hostIP=~'$hostIP'}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-磁盘写IOPS", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "磁盘读写速率(IOPS)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:566", - "format": "iops", - "label": "读取(-)/写入(+)I/O ops/sec", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:567", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 39 - }, - "hiddenSeries": false, - "id": 175, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_disk_ioUtils + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0 ", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": " {{hostIP}}_{{hostname}}_{{disk}}-磁盘I/O使用率", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "磁盘I/O使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:997", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:998", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "vda_write": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Read bytes 每个磁盘分区每秒读取的比特数\nWritten bytes 每个磁盘分区每秒写入的比特数", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 1, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 49 - }, - "height": "300", - "hiddenSeries": false, - "id": 168, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "max", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:4199", - "alias": "/.*_读取$/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_ecs_disk_read_bytes_rate{hostIP=~'$hostIP'}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-磁盘读操作速率", - "refId": "A", - "step": 10 - }, - { - "exemplar": true, - "expr": "huaweicloud_sys_ecs_disk_write_bytes_rate{hostIP=~'$hostIP'}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-磁盘写操作速率", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "磁盘读写容量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:137", - "format": "Bps", - "label": "读取(-)/写入(+)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:138", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "vda": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", - "fieldConfig": { - "defaults": { - "links": [] }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 1, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 49 - }, - "height": "300", - "hiddenSeries": false, - "id": 160, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:3772", - "alias": "/,*_读取$/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_disk_inodesUsedPercent + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0 ", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_net_bitSent{epId=~\"$EPS\",hostIP=~'$hostIP',hostname=~\"$hostname\"} * -1", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}_{{hostname}}_{{mount_point}}-磁盘iNode使用率(/)", + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}}(出网带宽)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "磁盘iNode使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:316", - "format": "percent", - "label": "", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:317", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.10.227:9100_em1_in下载": "super-light-green", - "192.168.10.227:9100_em1_out上传": "dark-blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 13, "w": 24, "x": 0, - "y": 59 + "y": 64 }, - "height": "300", - "hiddenSeries": false, - "id": 157, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sideWidth": 650, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 14, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_net_bitRecv{hostIP=~'$hostIP'}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-入网带宽", - "refId": "A", - "step": 4 - }, - { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_net_bitSent{hostIP=~'$hostIP'} * -1", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-出网带宽", - "refId": "B", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "网络带宽使用", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:315", - "format": "bps", - "label": "出网(-)/入网(+)", - "logBase": 1, - "show": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "$$hashKey": "object:316", - "format": "short", - "logBase": 1, - "show": false + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": { - "192.168.200.241:9100_TCP_alloc": "semi-dark-blue", - "TCP": "#6ED0E0", - "TCP_alloc": "blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "net_tcp_total - 统计测量对象网卡所有状态的TCP连接数总和\n\nnet_tcp_established - 统计测量对象网卡处于ESTABLISHED状态的TCP连接数量\n", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 68 - }, - "height": "300", - "hiddenSeries": false, - "id": 158, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 650, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true }, - "percentage": false, - "pluginVersion": "8.4.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:4470", - "alias": "", - "color": "#E02F44", - "lines": false, - "pointradius": 1, - "points": true, - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_net_tcp_total{hostIP=~'$hostIP'}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_net_tcp_total{epId=~\"$EPS\",hostIP=~'$hostIP',hostname=~\"$hostname\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{hostIP}}({{hostname}})-TCP连接数总和", - "refId": "A", - "step": 20 + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}}(TCP连接数总和)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "huaweicloud_agt_ecs_net_tcp_established{hostIP=~'$hostIP'}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\",hostIP=~'$hostIP',hostname=~\"$hostname\"}", "hide": false, - "interval": "", - "legendFormat": "{{hostIP}}({{hostname}})-ESTABLISHED状态的TCP连接数量", + "instant": false, + "legendFormat": "主机IP:{{hostIP}},主机名:{{hostname}}(ESTABLISHED状态的TCP连接数量)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "网络连接信息", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "transformations": [], - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:4485", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:4486", - "format": "short", - "label": "", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], - "refresh": false, - "schemaVersion": 35, - "style": "dark", - "tags": [ - "Prometheus" - ], + "refresh": "", + "schemaVersion": 38, + "tags": [], "templating": { "list": [ { - "current": { - "selected": false, - "text": "default", - "value": "0" - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "huaweicloud_epinfo", "hide": 0, "includeAll": false, @@ -1963,8 +1940,9 @@ "name": "EPS", "options": [], "query": { + "qryType": 4, "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", @@ -1973,16 +1951,8 @@ "type": "query" }, { - "current": { - "selected": false, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"},hostIP)", "hide": 0, "includeAll": true, @@ -1991,32 +1961,30 @@ "name": "hostIP", "options": [], "query": { + "qryType": 1, "query": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"},hostIP)", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, + "sort": 0, "type": "query" }, { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "${prometheus-cloudeye-exporter}", - "definition": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\",hostIP=~\"$hostIP\"},hostname)", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\", hostIP=~\"$hostIP\"},hostname)", "hide": 0, "includeAll": true, "label": "主机名", - "multi": false, + "multi": true, "name": "hostname", "options": [], "query": { - "query": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\",hostIP=~\"$hostIP\"},hostname)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\", hostIP=~\"$hostIP\"},hostname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", @@ -2025,22 +1993,18 @@ "type": "query" }, { - "current": { - "selected": false, - "text": "15", - "value": "15" - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", "hide": 2, "includeAll": false, - "label": "", "multi": false, "name": "total", "options": [], "query": { + "qryType": 3, "query": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/{} (.*) .*/", @@ -2051,35 +2015,13 @@ ] }, "time": { - "from": "now-5m", + "from": "now-6h", "to": "now" }, - "timepicker": { - "hidden": false, - "now": true, - "refresh_intervals": [ - "15s", - "30s", - "1m", - "5m", - "15m", - "30m" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "弹性云服务器(ECS)", - "uid": "9CWBz0bi2", - "version": 11, + "timepicker": {}, + "timezone": "", + "title": "弹性云服务器(ECS)", + "uid": "acc5fc8b-9cc5-4b79-be09-5f499c29c718", + "version": 12, "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/templates/eg_dashboard_template.json b/grafana_dashboard/templates/eg_dashboard_template.json new file mode 100644 index 0000000..3d710f7 --- /dev/null +++ b/grafana_dashboard/templates/eg_dashboard_template.json @@ -0,0 +1,865 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 9, + "panels": [], + "title": "事件源 (企业项目:$EPS)", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间处理该类型事件源事件数", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_event_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "事件源名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "事件源事件数", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 10, + "panels": [], + "title": "事件通道(企业项目:$EPS)", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间通道接入事件数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_pub_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "事件通道名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "通道接入事件数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间通道接入失败数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 10 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_pub_failed_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "事件通道名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "通道接入事件失败数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间通道接入事件成功数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_pub_success_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "事件通道名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "通道接入事件成功数量", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 11, + "panels": [], + "title": "事件订阅(企业项目:$EPS)", + "type": "row" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间订阅投递事件数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_sub_num{epId=~\"$EPS\", subscription_name!~\".+\"}", + "instant": false, + "legendFormat": "事件订阅名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "投递事件数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间订阅投递事件成功数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 27 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_sub_success_num{epId=~\"$EPS\", subscription_name!~\".+\"}", + "instant": false, + "legendFormat": "事件订阅名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "投递事件成功数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间订阅投递事件失败数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_sub_failed_num{epId=~\"$EPS\", subscription_name!~\".+\"}", + "instant": false, + "legendFormat": "事件订阅名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "投递事件失败数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标为单位时间订阅投递事件重试数量", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource":"${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_eg_sub_retry_num{epId=~\"$EPS\", subscription_name!~\".+\"}", + "instant": false, + "legendFormat": "事件订阅名称:{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "投递事件重试数量", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "huaweicloud_epinfo", + "hide": 0, + "includeAll": false, + "label": "企业项目", + "multi": false, + "name": "EPS", + "options": [], + "query": { + "qryType": 4, + "query": "huaweicloud_epinfo", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "事件网格(EG)", + "uid": "f0c3f829-0646-4405-8e97-346ecf8dab25", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/elb_dashboard_template.json b/grafana_dashboard/templates/elb_dashboard_template.json index 747deaa..bcff618 100644 --- a/grafana_dashboard/templates/elb_dashboard_template.json +++ b/grafana_dashboard/templates/elb_dashboard_template.json @@ -1,1837 +1,2362 @@ { "__inputs": [ { - "name": "prometheus-cloudeye-exporter", - "label": "prometheus-cloudeye-exporter", - "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", "type": "datasource", "pluginId": "prometheus", - "pluginName": "prometheus" + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.4.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, "description": "【华为云ELB监控指标说明】https://support.huaweicloud.com/usermanual-elb/elb_ug_jk_0001.html", "editable": true, "fiscalYearStartMonth": 0, - "gnetId": 8919, "graphTooltip": 0, - "id": 24, - "iteration": 1652275324173, - "links": [ - { - "$$hashKey": "object:2302", - "asDropdown": true, - "icon": "external link", - "tags": [], - "targetBlank": true, - "title": "", - "type": "dashboards" - } - ], - "liveNow": false, + "id": null, + "links": [], "panels": [ { "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, - "id": 187, + "id": 2, "panels": [], "repeat": "EPS", - "title": "资源总览(企业项目)企业项目:$EPS", + "repeatDirection": "h", + "title": "资源总览 企业项目:$EPS", "type": "row" }, { - "columns": [], - "description": "", - "fontSize": "80%", + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "并发连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 2000 + }, + { + "color": "dark-red", + "value": 3000 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "活跃连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 2000 + }, + { + "color": "dark-red", + "value": 3000 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "非活跃连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "新建连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 100 + }, + { + "color": "dark-red", + "value": 200 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流入速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400000 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流出速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400100 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "七层后端返回码(4xx)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "dark-red", + "value": 1 + } + ] + } + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "七层后端返回码(5xx)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "dark-red", + "value": 1 + } + ] + } + }, + { + "id": "unit", + "value": "short" + } + ] + } + ] + }, "gridPos": { - "h": 10, + "h": 9, "w": 24, "x": 0, "y": 1 }, - "id": 185, - "showHeader": true, - "sort": { - "col": 14, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:1808", - "alias": "负载均衡器(ELB)", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 1, - "link": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "name", - "thresholds": [], - "type": "string", - "unit": "bytes" + "show": false }, + "showHeader": true + }, + "pluginVersion": "10.4.1", + "targets": [ { - "$$hashKey": "object:1809", - "alias": "私有IP", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "浏览主机明细", - "linkUrl": "", - "mappingType": 1, - "pattern": "vip_address", - "thresholds": [], - "type": "number", - "unit": "short" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m1_cps{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"} -0", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" }, { - "$$hashKey": "object:1810", - "alias": "并发连接数", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "link": false, - "mappingType": 1, - "pattern": "Value #A", - "thresholds": [ - "2000", - "3000" - ], - "type": "number", - "unit": "none" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" }, { - "$$hashKey": "object:1814", - "alias": "活跃连接数", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "Value #B", - "thresholds": [ - "2000", - "3000" - ], - "type": "number", - "unit": "none" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m3_inact_conn{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" }, { - "$$hashKey": "object:1815", - "alias": "非活跃连接数", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "Value #C", - "thresholds": [ - "70", - "85" - ], - "type": "number", - "unit": "none" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m4_ncps{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" }, { - "$$hashKey": "object:1816", - "alias": "新建连接数", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "Value #D", - "thresholds": [ - "100", - "200" - ], - "type": "number", - "unit": "none" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m7_in_Bps{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "E" }, { - "$$hashKey": "object:1817", - "alias": "网络流入速率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #E", - "thresholds": [ - "10240000", - "102400000" - ], - "type": "number", - "unit": "binBps" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m8_out_Bps{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "F" }, { - "$$hashKey": "object:844", - "alias": "监听器名称", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "listener_name", - "thresholds": [], - "type": "number", - "unit": "short" + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m15_l7_upstream_4xx{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "G" }, { - "$$hashKey": "object:3937", - "alias": "网络流出速率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #F", - "thresholds": [ - "10240000", - "1024000000" - ], - "type": "number", - "unit": "binBps" - }, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_elb_m16_l7_upstream_5xx{epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "H" + } + ], + "title": "ELB资源(实例)总览表【企业项目:$EPS】", + "transformations": [ { - "$$hashKey": "object:489", - "alias": "7层后端返回码(4XX)", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #G", - "thresholds": [ - "0", - "1" - ], - "type": "number", - "unit": "short" + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "vip_address", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "Value #G", + "Value #H" + ] + } + } }, { - "$$hashKey": "object:721", - "alias": "7层后端返回码(5XX)", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #H", - "thresholds": [ - "0", - "1" - ], - "type": "number", - "unit": "short" + "id": "merge", + "options": {} }, { - "$$hashKey": "object:1823", - "alias": "", - "align": "right", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "hidden", - "unit": "short" + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A": "并发连接数", + "Value #B": "活跃连接数", + "Value #C": "非活跃连接数", + "Value #D": "新建连接数", + "Value #E": "网络流入速率", + "Value #F": "网络流出速率", + "Value #G": "七层后端返回码(4xx)", + "Value #H": "七层后端返回码(5xx)", + "name": "负载均衡器名称", + "vip_address": "私有IP" + } + } } ], - "datasource": "${prometheus-cloudeye-exporter}", + "type": "table" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "并发连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 2000 + }, + { + "color": "dark-red", + "value": 3000 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "活跃连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 2000 + }, + { + "color": "dark-red", + "value": 3000 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "非活跃连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "新建连接数" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 100 + }, + { + "color": "dark-red", + "value": 200 + } + ] + } + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流入速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400000 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "网络流出速率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10240000 + }, + { + "color": "dark-red", + "value": 102400100 + } + ] + } + }, + { + "id": "unit", + "value": "binbps" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "七层后端返回码(4xx)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "dark-red", + "value": 1 + } + ] + } + }, + { + "id": "unit", + "value": "short" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "七层后端返回码(5xx)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "green", + "value": 0 + }, + { + "color": "dark-red", + "value": 1 + } + ] + } + }, + { + "id": "unit", + "value": "short" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 3, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_elb_m1_cps{epId=~\"$EPS\"} -0", + "expr": "huaweicloud_sys_elb_m1_cps{epId=~\"$EPS\", lbaas_listener_id=~\".+\"} -0", "format": "table", - "hide": false, "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "并发连接数", + "legendFormat": "__auto", + "range": false, "refId": "A" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"} - 0", + "expr": "huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\", lbaas_listener_id=~\".+\"} - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "活跃连接数", + "legendFormat": "__auto", + "range": false, "refId": "B" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_elb_m3_inact_conn{epId=~\"$EPS\"} - 0", + "expr": "huaweicloud_sys_elb_m3_inact_conn{epId=~\"$EPS\", lbaas_listener_id=~\".+\"} - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "非活跃连接数", + "legendFormat": "__auto", + "range": false, "refId": "C" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "huaweicloud_sys_elb_m4_ncps{epId=~\"$EPS\"} - 0", + "expr": "huaweicloud_sys_elb_m4_ncps{epId=~\"$EPS\", lbaas_listener_id=~\".+\"} - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "新建连接数", + "legendFormat": "__auto", + "range": false, "refId": "D" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_elb_m7_in_Bps{epId=~\"$EPS\"}) by (listener_name)", + "expr": "huaweicloud_sys_elb_m7_in_Bps{epId=~\"$EPS\", lbaas_listener_id=~\".+\"} - 0", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流入速率", + "legendFormat": "__auto", + "range": false, "refId": "E" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_elb_m8_out_Bps{epId=~\"$EPS\"}) by (listener_name)", + "expr": "huaweicloud_sys_elb_m8_out_Bps{epId=~\"$EPS\", lbaas_listener_id=~\".+\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "网络流出速率", + "legendFormat": "__auto", + "range": false, "refId": "F" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_elb_m15_l7_upstream_4xx{epId=~\"$EPS\"}) by (listener_name)", + "expr": "huaweicloud_sys_elb_m15_l7_upstream_4xx{epId=~\"$EPS\", lbaas_listener_id=~\".+\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "7层后端返回码(4XX)", + "legendFormat": "__auto", + "range": false, "refId": "G" }, { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_elb_m16_l7_upstream_5xx{epId=~\"$EPS\"}) by (listener_name)", + "expr": "huaweicloud_sys_elb_m16_l7_upstream_5xx{epId=~\"$EPS\", lbaas_listener_id=~\".+\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "7层后端返回码(5XX)", + "legendFormat": "__auto", + "range": false, "refId": "H" } ], - "title": "ELB资源总览表【企业项目:$EPS】", - "transform": "table", - "type": "table-old" + "title": "ELB资源(监听器)总览表【企业项目:$EPS】", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "name", + "vip_address", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "Value #G", + "Value #H", + "listener_name" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "Value #A": 3, + "Value #B": 4, + "Value #C": 5, + "Value #D": 6, + "Value #E": 7, + "Value #F": 8, + "Value #G": 9, + "Value #H": 10, + "listener_name": 2, + "name": 0, + "vip_address": 1 + }, + "renameByName": { + "Value #A": "并发连接数", + "Value #B": "活跃连接数", + "Value #C": "非活跃连接数", + "Value #D": "新建连接数", + "Value #E": "网络流入速率", + "Value #F": "网络流出速率", + "Value #G": "七层后端返回码(4xx)", + "Value #H": "七层后端返回码(5xx)", + "listener_name": "监听器名称", + "name": "负载均衡器名称", + "vip_address": "私有IP" + } + } + } + ], + "type": "table" }, { "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 11 + "y": 19 }, - "id": 189, + "id": 4, "panels": [], "repeat": "EPS", + "repeatDirection": "h", "title": "资源明细:【$EPS】【$hostIP】【$hostname】【$listener】", "type": "row" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 12 + "y": 20 }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 5, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m2_act_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m2_act_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-活跃连接数", - "refId": "A", - "step": 20 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "活跃连接数", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "活跃连接数(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 12 - }, - "hiddenSeries": false, - "id": 190, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 20 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 6, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m3_inact_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m3_inact_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-非活跃连接数", - "refId": "A", - "step": 20 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "非活跃连接数", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "非活跃连接数(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 22 - }, - "height": "300", - "hiddenSeries": false, - "id": 156, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 28 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 7, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m1_cps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m1_cps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-并发连接数", - "refId": "A", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "并发连接数", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "并发连接数(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 22 - }, - "height": "300", - "hiddenSeries": false, - "id": 192, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 28 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 8, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l4_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l4_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_L4并发连接数", - "refId": "A", - "step": 4 + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}} (L4并发连接使用率)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l7_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l7_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "hide": false, - "interval": "", - "legendFormat": "{{vip_address}}_{{name}}_L7并发连接数", + "instant": false, + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}} (L7并发连接使用率)", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "并发连接使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "decimals": 2, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "max": "100", - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false - } + "title": "并发连接使用率(弹性负载均衡器实例)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 32 + "y": 36 }, - "height": "300", - "hiddenSeries": false, - "id": 191, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 9, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m4_ncps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m4_ncps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-新建连接数", - "refId": "A", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "新建连接数", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "新建连接数(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_总内存": "dark-red", - "使用率": "yellow", - "内存_Avaliable": "#6ED0E0", - "内存_Cached": "#EF843C", - "内存_Free": "#629E51", - "内存_Total": "#6d1f62", - "内存_Used": "#eab839", - "可用": "#9ac48a", - "总内存": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 32 + "y": 36 }, - "height": "300", - "hiddenSeries": false, - "id": 193, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 10, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l4_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "hide": false, + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l4_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_L4新建连接数", - "refId": "A", - "step": 4 + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(L4新建连接使用率)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l7_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l7_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_L7新建连接数", - "refId": "B", - "step": 4 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "新建连接使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:183", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:184", - "format": "percent", - "label": "", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(L7新建连接使用率)", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "新建连接使用率(弹性负载均衡器实例)", + "type": "timeseries" }, { - "aliasColors": { - "15分钟": "#6ED0E0", - "1分钟": "#BF1B00", - "5分钟": "#CCA300" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 0, - "editable": true, - "error": false, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "流出(-)/流入(+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binbps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, - "grid": {}, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 42 - }, - "height": "300", - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 44 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null as zero", + "id": 11, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m7_in_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m7_in_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-网络流入速率", - "metric": "", - "refId": "A", - "step": 20, - "target": "" + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}(网络流入速率)", + "range": true, + "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_elb_m8_out_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_elb_m8_out_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-网络流出速率", - "metric": "", - "refId": "B", - "step": 20, - "target": "" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "网络流入/流出速率", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:136", - "decimals": 2, - "format": "binBps", - "label": "", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:137", - "format": "short", - "logBase": 1, - "show": false + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}(网络流出速率)", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false - } + "title": "网络流入/流出速率(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 0, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "出带宽使用率(+) / 入带宽使用率(-)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 42 - }, - "hiddenSeries": false, - "id": 174, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "min", - "sortDesc": false, - "total": false, - "values": true + "y": 44 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 12, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l4_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l4_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_4层入带宽使用率", + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(4层入带宽使用率)", + "range": true, "refId": "A" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_elb_l4_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_elb_l4_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_4层出带宽使用率", + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(4层出带宽使用率)", + "range": true, "refId": "B" }, { - "exemplar": true, - "expr": "huaweicloud_sys_elb_l7_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_l7_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_7层入带宽使用率", + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(7层入带宽使用率)", + "range": true, "refId": "C" }, { - "exemplar": true, - "expr": "0 - huaweicloud_sys_elb_l7_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "0 - huaweicloud_sys_elb_l7_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", "hide": false, "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}_{{name}}_7层出带宽使用率", + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(7层出带宽使用率)", + "range": true, "refId": "D" } ], - "thresholds": [], - "timeRegions": [], - "title": "网络流入/流出带宽使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:227", - "decimals": 2, - "format": "percent", - "label": "入带宽使用率(+)/出带宽使用率(-)", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:228", - "decimals": 2, - "format": "percentunit", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "title": "网络流入流出带宽使用率(弹性负载均衡器实例)", + "type": "timeseries" }, { - "aliasColors": { - "vda_write": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, - "description": "\n\nWrite Requests: 每个磁盘分区每秒写完成次数", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "none" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, "y": 52 }, - "height": "300", - "hiddenSeries": false, - "id": 161, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 13, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_elb_ma_normal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{pool_name}})-正常主机数", - "refId": "A", - "step": 10 + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "thresholds": [], - "timeRegions": [], - "title": "正常主机数量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] }, - "yaxes": [ - { - "$$hashKey": "object:566", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, + "targets": [ { - "$$hashKey": "object:567", - "format": "short", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_ma_normal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", + "instant": false, + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(正常主机数)", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "正常主机数量(弹性负载均衡器实例)", + "type": "timeseries" }, { - "aliasColors": { - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, "y": 52 }, - "hiddenSeries": false, - "id": 175, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 14, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m9_abnormal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{pool_name}})-异常主机数", - "refId": "C" + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "thresholds": [], - "timeRegions": [], - "title": "异常主机数量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] }, - "yaxes": [ - { - "$$hashKey": "object:997", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, + "targets": [ { - "$$hashKey": "object:998", - "format": "short", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m9_abnormal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\",epId=~\"$EPS\", lbaas_listener_id!~\".+\", available_zone!~\".+\", lbaas_pool_id!~\".+\"}", + "instant": false, + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}}(异常主机数)", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "异常主机数量(弹性负载均衡器实例)", + "type": "timeseries" }, { - "aliasColors": { - "vda_write": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, + "datasource": "${DS_PROMETHEUS}", "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 0, - "y": 62 - }, - "height": "300", - "hiddenSeries": false, - "id": 168, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 60 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 15, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m15_l7_upstream_4xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-7层后端返回码(4XX)", - "refId": "A", - "step": 10 + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "thresholds": [], - "timeRegions": [], - "title": "后端返回码4XX", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:137", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, + "targets": [ { - "$$hashKey": "object:138", - "format": "short", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m15_l7_upstream_4xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", + "instant": false, + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "后端返回码4xx(负载均衡监听器)", + "type": "timeseries" }, { - "aliasColors": { - "vda": "#6ED0E0" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, + "datasource": "${DS_PROMETHEUS}", "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 2, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 1, "gridPos": { - "h": 10, + "h": 8, "w": 12, "x": 12, - "y": 62 - }, - "height": "300", - "hiddenSeries": false, - "id": 160, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 60 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", + "id": 16, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "datasource": "${prometheus-cloudeye-exporter}", - "targets": [ - { - "exemplar": true, - "expr": "huaweicloud_sys_elb_m16_l7_upstream_5xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-7层后端返回码(5XX)", - "refId": "A", - "step": 10 + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" } - ], - "thresholds": [], - "timeRegions": [], - "title": "后端返回码5XX", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] }, - "yaxes": [ - { - "$$hashKey": "object:316", - "decimals": 0, - "format": "none", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, + "targets": [ { - "$$hashKey": "object:317", - "format": "short", - "logBase": 1, - "show": false + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_elb_m16_l7_upstream_5xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\",lbaas_listener_id=~\".+\"}", + "instant": false, + "legendFormat": "私有IP:{{vip_address}},实例名:{{name}},监听器名称:{{listener_name}}", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "后端返回码5xx(负载均衡监听器)", + "type": "timeseries" } ], - "refresh": false, - "schemaVersion": 34, - "style": "dark", - "tags": [ - "Prometheus" - ], + "schemaVersion": 39, + "tags": [], "templating": { "list": [ { - "current": { - "selected": false, - "text": "基础架构部-运维组", - "value": "0d6fdb17-8e8d-411c-a072-cca611ee664b" - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "huaweicloud_epinfo", "hide": 0, "includeAll": false, @@ -1840,8 +2365,9 @@ "name": "EPS", "options": [], "query": { + "qryType": 4, "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", @@ -1850,17 +2376,9 @@ "type": "query" }, { - "current": { - "selected": false, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", - "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"},vip_address)", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=\"$EPS\"},vip_address)", "hide": 0, "includeAll": true, "label": "ELB-IP", @@ -1868,27 +2386,20 @@ "name": "hostIP", "options": [], "query": { - "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"},vip_address)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=\"$EPS\"},vip_address)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, + "sort": 0, "type": "query" }, { - "current": { - "selected": false, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", - "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\",vip_address=~\"$hostIP\"},name)", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=\"$EPS\"},name)", "hide": 0, "includeAll": true, "label": "实例名", @@ -1896,32 +2407,29 @@ "name": "hostname", "options": [], "query": { - "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\",vip_address=~\"$hostIP\"},name)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=\"$EPS\"},name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 5, + "sort": 0, "type": "query" }, { - "current": { - "selected": false, - "text": "108", - "value": "108" - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", "hide": 2, "includeAll": false, - "label": "", "multi": false, "name": "total", "options": [], "query": { + "qryType": 3, "query": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/{} (.*) .*/", @@ -1930,16 +2438,8 @@ "type": "query" }, { - "current": { - "selected": false, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{name=~\"$hostname\", vip_address=~\"$hostIP\"},listener_name)", "hide": 0, "includeAll": true, @@ -1948,8 +2448,9 @@ "name": "listener", "options": [], "query": { + "qryType": 1, "query": "label_values(huaweicloud_sys_elb_m2_act_conn{name=~\"$hostname\", vip_address=~\"$hostIP\"},listener_name)", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", @@ -1960,35 +2461,13 @@ ] }, "time": { - "from": "now-1h", + "from": "now-6h", "to": "now" }, - "timepicker": { - "hidden": false, - "now": true, - "refresh_intervals": [ - "15s", - "30s", - "1m", - "5m", - "15m", - "30m" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, + "timepicker": {}, "timezone": "browser", - "title": "弹性负载均衡(ELB)", - "uid": "9CWBz0bi3", - "version": 39, + "title": "弹性负载均衡(ELB)", + "uid": "adyxtb2y2aqrke", + "version": 6, "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/templates/hss_dashboard_template.json b/grafana_dashboard/templates/hss_dashboard_template.json new file mode 100644 index 0000000..ca5d569 --- /dev/null +++ b/grafana_dashboard/templates/hss_dashboard_template.json @@ -0,0 +1,440 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "description": "【华为云HSS支持的监控指标】https://support.huaweicloud.com/usermanual-hss2.0/hss_01_0527.html", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标用于统计服务器总数。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_hss_host_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "企业项目名称:{{epName}}", + "range": true, + "refId": "A" + } + ], + "title": "服务器总数", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标用于统计经检测判定存在风险的服务器的数量。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_hss_risky_host_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "企业项目名称:{{epName}}", + "range": true, + "refId": "A" + } + ], + "title": "有风险服务器数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标用于统计未开启防护的服务器数量。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_hss_unprotected_host_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "企业项目名称:{{epName}}", + "range": true, + "refId": "A" + } + ], + "title": "未开启防护服务器数量", + "type": "timeseries" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "该指标用于统计未安装agent或者状态为离线的agent的数量。", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "expr": "huaweicloud_sys_hss_uninstalled_or_offline_agent_num{epId=~\"$EPS\"}", + "instant": false, + "legendFormat": "企业项目名称:{{epName}}", + "range": true, + "refId": "A" + } + ], + "title": "未安装/已离线agent数量", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "definition": "huaweicloud_epinfo", + "hide": 0, + "includeAll": true, + "label": "企业项目", + "multi": true, + "name": "EPS", + "options": [], + "query": { + "qryType": 4, + "query": "huaweicloud_epinfo", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "主机安全服务(HSS)", + "uid": "b2864bf0-3ecf-415e-81bb-33101ea62a0d", + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/live_dashboard_template.json b/grafana_dashboard/templates/live_dashboard_template.json new file mode 100644 index 0000000..2b6e1f9 --- /dev/null +++ b/grafana_dashboard/templates/live_dashboard_template.json @@ -0,0 +1,849 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.4.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_http_5xx_proportion", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "5xx状态码占比", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_online", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "拉流并发数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_http_4xx_proportion", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "4xx状态码占比", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_bandwidth", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "拉流带宽", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_qps", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "每秒访问次数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_inject_concurrency_number", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "推流并发数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_play_traffic", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "播放流量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_live_inject_bandwidth", + "instant": false, + "legendFormat": "{{domain}}", + "range": true, + "refId": "A" + } + ], + "title": "推流带宽", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "视频直播(LIVE)", + "uid": "adxdnck159p1cd", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/lts_dashboard_template.json b/grafana_dashboard/templates/lts_dashboard_template.json new file mode 100644 index 0000000..d14dda5 --- /dev/null +++ b/grafana_dashboard/templates/lts_dashboard_template.json @@ -0,0 +1,1255 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.4.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 7, + "panels": [], + "title": "日志分组指标", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rowsps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_written_rows{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "写入行数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_write_traffic{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "写入流量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_used_storage{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "存储量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_indexing_traffic{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "索引流量", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 17 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_number_of_reads{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "读取次数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 17 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_read_traffic{log_stream_id=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}", + "range": true, + "refId": "A" + } + ], + "title": "读取流量(字节)", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 8, + "panels": [], + "title": "日志流指标", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rowsps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_written_rows{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "写入行数(日志流)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_write_traffic{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "写入流量(日志流)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_used_storage{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "存储量(日志流)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_indexing_traffic{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "索引流量(日志流)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_number_of_reads{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "读取次数(日志流)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_lts_read_traffic{log_stream_id!=\"\"}", + "instant": false, + "legendFormat": "{{log_group_name}}>{{log_stream_name}}", + "range": true, + "refId": "A" + } + ], + "title": "读取流量(日志流)", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "云日志服务(LTS)", + "uid": "cdxdrwju69hq8d", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/obs_dashboard_template.json b/grafana_dashboard/templates/obs_dashboard_template.json new file mode 100644 index 0000000..7f8777f --- /dev/null +++ b/grafana_dashboard/templates/obs_dashboard_template.json @@ -0,0 +1,1270 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "11.1.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 7, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_get_per_second{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "GET类请求TPS", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_put_per_second{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A" + } + ], + "title": "PUT类请求TPS", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_success_rate{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A" + } + ], + "title": "请求成功率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_monitor_2XX{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A" + } + ], + "title": "2xx状态码个数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 17 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_upload_bytes{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A" + } + ], + "title": "总上传带宽", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 17 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_download_bytes{tenant_id=\"\",api_name=\"\",domain_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{bucket_name}}", + "range": true, + "refId": "A" + } + ], + "title": "总下载带宽", + "type": "timeseries" + } + ], + "title": "桶名称", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 8, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_get_per_second{bucket_name=\"\",http_code=\"\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "GET类请求TPS", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_put_per_second{bucket_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A" + } + ], + "title": "PUT类请求TPS", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_success_rate{bucket_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A" + } + ], + "title": "请求成功率", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 10 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_request_count_monitor_2XX{bucket_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A" + } + ], + "title": "2xx状态码个数", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_upload_bytes{bucket_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A" + } + ], + "title": "总上传带宽", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "huaweicloud_sys_obs_download_bytes{bucket_name=\"\",http_code=\"\"}", + "instant": false, + "legendFormat": "{{tenant_id}}", + "range": true, + "refId": "A" + } + ], + "title": "总下载带宽", + "type": "timeseries" + } + ], + "title": "用户", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "对象存储服务 OBS", + "uid": "edxo7lw4e0g74d", + "version": 5, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/old_version/dcaas_dashboard_template.json b/grafana_dashboard/templates/old_version/dcaas_dashboard_template.json new file mode 100644 index 0000000..40cecc7 --- /dev/null +++ b/grafana_dashboard/templates/old_version/dcaas_dashboard_template.json @@ -0,0 +1,1266 @@ +{ + "__inputs": [ + { + "name": "prometheus-cloudeye-exporter", + "label": "prometheus-cloudeye-exporter", + "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "prometheus" + } + ], + "description": "【华为云DCASS支持的监控指标】https://support.huaweicloud.com/usermanual-dc/dc_04_0802.html", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 8919, + "graphTooltip": 0, + "id": 27, + "iteration": 1652182368763, + "links": [ + { + "$$hashKey": "object:2302", + "asDropdown": true, + "icon": "external link", + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 187, + "panels": [], + "title": "资源总览-华为云专线", + "type": "row" + }, + { + "columns": [], + "description": "", + "fontSize": "80%", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 185, + "showHeader": true, + "sort": { + "col": 14, + "desc": true + }, + "styles": [ + { + "$$hashKey": "object:1808", + "alias": "设备IP", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 1, + "link": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "device_id", + "thresholds": [], + "type": "string", + "unit": "bytes" + }, + { + "$$hashKey": "object:1809", + "alias": "虚拟接口", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "name", + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "$$hashKey": "object:1810", + "alias": "时延", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "Value #A", + "thresholds": [ + "5", + "10" + ], + "type": "number", + "unit": "ms" + }, + { + "$$hashKey": "object:1814", + "alias": "丢包率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1815", + "alias": "网络流入带宽", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #C", + "thresholds": [ + "" + ], + "type": "number", + "unit": "binbps" + }, + { + "$$hashKey": "object:1816", + "alias": "网络流出带宽", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #D", + "thresholds": [ + "" + ], + "type": "number", + "unit": "binbps" + }, + { + "$$hashKey": "object:1817", + "alias": "网络流入流量", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #E", + "thresholds": [ + "" + ], + "type": "number", + "unit": "bytes" + }, + { + "$$hashKey": "object:1818", + "alias": "网络流出流量", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #F", + "thresholds": [ + "" + ], + "type": "number", + "unit": "bytes" + }, + { + "$$hashKey": "object:1819", + "alias": "网络流入包速率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #G", + "thresholds": [ + "30485760", + "104857600" + ], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1820", + "alias": "网络流出包速率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #H", + "thresholds": [], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1823", + "alias": "", + "align": "right", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": false, + "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流入带宽", + "refId": "C" + }, + { + "exemplar": false, + "expr": "huaweicloud_sys_dcaas_network_outgoing_bits_rate{} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流出带宽", + "refId": "D" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_network_incoming_bytes{}) by (name) - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流入流量", + "refId": "E" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_bytes{}) by (name) - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流出流量", + "refId": "F" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_network_incoming_packets_rate{}) by (name) - 0", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "网络流入包速率", + "refId": "G" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_network_outgoing_packets_rate{}) by (name) - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流出包速率", + "refId": "H" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_latency{}) by (name) - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "时延", + "refId": "A" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_dcaas_packet_loss_rate{}) by (name) -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "丢包率", + "refId": "B" + } + ], + "title": "云专线资源总览表", + "transform": "table", + "type": "table-old" + }, + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 189, + "panels": [], + "title": "资源明细:【$EPS】【$hostIP】【$hostname】", + "type": "row" + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1605", + "alias": "/.*总使用率/", + "color": "#C4162A", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_latency{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-时延", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "时延", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:11294", + "decimals": 0, + "format": "ms", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:11295", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 7 + }, + "height": "300", + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:154", + "alias": "", + "color": "rgb(0, 209, 255)", + "lines": false, + "pointradius": 1, + "points": true, + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_packet_loss_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-丢包率", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "丢包率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 2, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 17 + }, + "height": "300", + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:129", + "alias": "", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_network_incoming_bits_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-网络流入带宽", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bits_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "hide": false, + "interval": "", + "legendFormat": "{{device_id}}({{name}})-网络流出带宽", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络(流入/流出)带宽", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "format": "binbps", + "label": "网络流入带宽(+)/网络流出带宽(-)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 2, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 17 + }, + "height": "300", + "hiddenSeries": false, + "id": 190, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:129", + "alias": "", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_network_incoming_bytes{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-网络流入流量", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_bytes{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "hide": false, + "interval": "", + "legendFormat": "{{device_id}}({{name}})-网络流出流量", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络(流入/流出)流量", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "format": "bytes", + "label": "网络流入流量(+)/网络流出流量(-)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 2, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 27 + }, + "height": "300", + "hiddenSeries": false, + "id": 191, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:129", + "alias": "", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_network_incoming_packets_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-网络流入包速率", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets_rate{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "hide": false, + "interval": "", + "legendFormat": "{{device_id}}({{name}})-网络流出包速率", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络(流入/流出)包速率", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "format": "cps", + "label": "网络流入包速率(+)/网络流出包速率(-)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 2, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 27 + }, + "height": "300", + "hiddenSeries": false, + "id": 192, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:129", + "alias": "", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_dcaas_network_incoming_packets{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{device_id}}({{name}})-网络流入包量", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcaas_network_outgoing_packets{device_id=~\"$hostIP\",name=~\"$hostname\"}", + "hide": false, + "interval": "", + "legendFormat": "{{device_id}}({{name}})-网络流出包量", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络(流入/流出)包量", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "format": "none", + "label": "网络流入包量(+)/网络流出包量(-)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": "", + "schemaVersion": 34, + "style": "dark", + "tags": [ + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": [ + "default" + ], + "value": [ + "0" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "huaweicloud_epinfo", + "hide": 0, + "includeAll": true, + "label": "企业项目", + "multi": true, + "name": "EPS", + "options": [], + "query": { + "query": "huaweicloud_epinfo", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\"},device_id)", + "hide": 0, + "includeAll": true, + "label": "专线IP", + "multi": true, + "name": "hostIP", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\"},device_id)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\"},name)", + "hide": 0, + "includeAll": true, + "label": "专线名称", + "multi": false, + "name": "hostname", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_dcaas_network_incoming_bytes{epId=~\"$EPS\",device_id=~\"$hostIP\"},name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "hidden": false, + "now": true, + "refresh_intervals": [ + "15s", + "30s", + "1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "云专线(DCAAS)", + "uid": "9CWBz0bi6", + "version": 22, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/old_version/dcs_dashboard_template.json b/grafana_dashboard/templates/old_version/dcs_dashboard_template.json new file mode 100644 index 0000000..802e61c --- /dev/null +++ b/grafana_dashboard/templates/old_version/dcs_dashboard_template.json @@ -0,0 +1,3767 @@ +{ + "__inputs": [ + { + "name": "DS_3VI-GAUSS-TEST-PROMETHEUS", + "label": "3vi-gauss-test-prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "description": "【华为云DCS支持的监控指标】https://support.huaweicloud.com/usermanual-dcs/dcs-ug-0713011.html", + "editable": true, + "gnetId": 8919, + "graphTooltip": 0, + "id": null, + "iteration": 1723167509451, + "links": [ + { + "$$hashKey": "object:2302", + "asDropdown": true, + "icon": "external link", + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "panels": [ + { + "collapsed": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 187, + "panels": [], + "repeat": "EPS", + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "refId": "A" + } + ], + "title": "资源总览(企业项目)企业项目:$EPS,当前选中主机:$hostname", + "type": "row" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "right", + "filterable": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "displayName", + "value": "主机名" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 1 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ip" + }, + "properties": [ + { + "id": "displayName", + "value": "IP" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "", + "url": "" + } + ] + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU使用率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "内存使用率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 85 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "缓存命中率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 85 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "活跃的客户端数量" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 200 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "新建连接数" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 200 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "命令最大时延" + }, + { + "id": "unit", + "value": "ms" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 20 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #G" + }, + "properties": [ + { + "id": "displayName", + "value": "流控次数" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 2 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "cache_mode" + }, + "properties": [ + { + "id": "displayName", + "value": "缓存类型" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 196, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "内存使用率", + "refId": "B" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "缓存命中率", + "refId": "C" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "活跃的客户端数量", + "refId": "D" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "新建连接数", + "refId": "E" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "命令最大时延", + "refId": "F" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", node_type!~\".+\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "流控次数", + "refId": "G" + } + ], + "title": "服务器资源总览表(主机实例)【企业项目:$EPS,实例总数:$total_instance】", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "ip", + "name", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "Value #G", + "cache_mode" + ] + } + } + }, + { + "id": "merge", + "options": {} + } + ], + "type": "table" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "right", + "filterable": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "displayName", + "value": "主机名" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 1 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ip" + }, + "properties": [ + { + "id": "displayName", + "value": "IP" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "", + "url": "" + } + ] + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU使用率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "semi-dark-orange", + "value": 70 + }, + { + "color": "dark-red", + "value": 85 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "内存使用率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 85 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "缓存命中率" + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 70 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 85 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "活跃的客户端数量" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 200 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "新建连接数" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 200 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "命令最大时延" + }, + { + "id": "unit", + "value": "ms" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 20 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #G" + }, + "properties": [ + { + "id": "displayName", + "value": "流控次数" + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.align" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 2 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "color-background" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "cache_mode" + }, + "properties": [ + { + "id": "displayName", + "value": "缓存类型" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "node_type" + }, + "properties": [ + { + "id": "displayName", + "value": "节点类型" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "private_ip" + }, + "properties": [ + { + "id": "displayName", + "value": "节点IP" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "group_name" + }, + "properties": [ + { + "id": "displayName", + "value": "分片名称" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 185, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"} -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU使用率", + "refId": "A" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "内存使用率", + "refId": "B" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "缓存命中率", + "refId": "C" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_connected_clients{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "活跃的客户端数量", + "refId": "D" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_total_connections_received{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "新建连接数", + "refId": "E" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "命令最大时延", + "refId": "F" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": false, + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "流控次数", + "refId": "G" + } + ], + "title": "服务器资源总览表(数据节点)【企业项目:$EPS,节点总数:$total_node】", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "cache_mode", + "group_name", + "ip", + "name", + "node_type", + "private_ip", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "Value #G" + ] + } + } + }, + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 189, + "panels": [], + "repeat": "EPS", + "repeatDirection": "h", + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "refId": "A" + } + ], + "title": "资源明细:企业项目【$EPS】 缓存类型【$cache_mode】 主机名【$hostname】", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 22 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU使用率(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:229", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:230", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 31 + }, + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"} - 0", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "内存使用率(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:323", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:324", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 31 + }, + "hiddenSeries": false, + "id": 198, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"} - 0", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "内存使用率(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 40 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_keys{name=~\"$hostname\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存键总数(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:403", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:404", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 40 + }, + "hiddenSeries": false, + "id": 199, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_keys{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存键总数(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 49 + }, + "hiddenSeries": false, + "id": 192, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存命中率(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:605", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:606", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 49 + }, + "hiddenSeries": false, + "id": 200, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_keyspace_hits_perc{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存命中率(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:675", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:676", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "Kbits" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 59 + }, + "hiddenSeries": false, + "id": 161, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_instantaneous_input_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"} - 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}-网络瞬时输入流量", + "range": true, + "refId": "A", + "step": 10 + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcs_instantaneous_output_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}--网络瞬时输出流量", + "range": true, + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "网络瞬时(输入/输出)流量(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:755", + "format": "Kbits", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:756", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "Kbits" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 59 + }, + "hiddenSeries": false, + "id": 201, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_instantaneous_input_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"} - 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-网络瞬时输入流量", + "range": true, + "refId": "A", + "step": 10 + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcs_instantaneous_output_kbps{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-网络瞬时输出流量", + "range": true, + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "网络瞬时(输入/输出)流量(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:845", + "format": "Kbits", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:846", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 68 + }, + "hiddenSeries": false, + "id": 194, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_is_slow_log_exist{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "是否存在慢日志", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:925", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:926", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 68 + }, + "hiddenSeries": false, + "id": 202, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_is_slow_log_exist{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "是否存在慢日志(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1081", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1082", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "ms" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 78 + }, + "hiddenSeries": false, + "id": 195, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "命令最大时延(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1253", + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1254", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "ms" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 78 + }, + "hiddenSeries": false, + "id": 203, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_command_max_delay{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "命令最大时延(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ms", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 88 + }, + "hiddenSeries": false, + "id": 193, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_expires{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}-有过期时间的键总数", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcs_expired_keys{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "hide": false, + "interval": "", + "legendFormat": "主机名:{{name}}-已过期的键总数", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存过期键总数(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 88 + }, + "hiddenSeries": false, + "id": 204, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_expires{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-有过期时间的键总数", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "0 - huaweicloud_sys_dcs_expired_keys{epId=~\"$EPS\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "hide": false, + "interval": "", + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}-已过期的键总数", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "缓存过期键总数(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 98 + }, + "hiddenSeries": false, + "id": 190, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_instantaneous_ops{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "每秒并发操作数(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 98 + }, + "hiddenSeries": false, + "id": 205, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_instantaneous_ops{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "每秒并发操作数(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 107 + }, + "hiddenSeries": false, + "id": 174, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_bandwidth_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "带宽使用率(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 107 + }, + "hiddenSeries": false, + "id": 206, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_bandwidth_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "带宽使用率(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 117 + }, + "hiddenSeries": false, + "id": 168, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", node_type!~\".+\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "流控次数(主机实例)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1751", + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1752", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 117 + }, + "hiddenSeries": false, + "id": 207, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.17", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "huaweicloud_sys_dcs_rx_controlled{epId=~\"$EPS\", cache_mode=~\"$cache_mode\", name=~\"$hostname\", dcs_cluster_redis_node=~\".+\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "主机名:{{name}},节点IP:{{private_ip}}", + "range": true, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "流控次数(数据节点)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1821", + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:1822", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "15s", + "schemaVersion": 27, + "style": "dark", + "tags": [ + "Prometheus" + ], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "definition": "huaweicloud_epinfo", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "企业项目", + "multi": false, + "name": "EPS", + "options": [], + "query": { + "query": "huaweicloud_epinfo", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\"},cache_mode)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "缓存类型", + "multi": false, + "name": "cache_mode", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\"},cache_mode)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "definition": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\"},name)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "主机名", + "multi": true, + "name": "hostname", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", cache_mode=~\"$cache_mode\"},name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "definition": "query_result(count(huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}))", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": "", + "multi": false, + "name": "total_instance", + "options": [], + "query": { + "query": "query_result(count(huaweicloud_sys_dcs_memory_usage{epId=~\"$EPS\", node_type!~\".+\"}))", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/{} (.*) .*/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_3VI-GAUSS-TEST-PROMETHEUS}", + "definition": "query_result(count(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}))", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "total_node", + "options": [], + "query": { + "qryType": 3, + "query": "query_result(count(huaweicloud_sys_dcs_cpu_usage{epId=~\"$EPS\", dcs_cluster_redis_node=~\".+\"}))", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/{}(.*) .*/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "hidden": false, + "now": true, + "refresh_intervals": [ + "15s", + "30s", + "1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "分布式缓存服务(DCS)", + "uid": "9CWBz0bi8", + "version": 5 +} \ No newline at end of file diff --git a/grafana_dashboard/templates/old_version/ecs_dashboard_template.json b/grafana_dashboard/templates/old_version/ecs_dashboard_template.json new file mode 100644 index 0000000..022a59f --- /dev/null +++ b/grafana_dashboard/templates/old_version/ecs_dashboard_template.json @@ -0,0 +1,2085 @@ +{ + "__inputs": [ + { + "name": "prometheus-cloudeye-exporter", + "label": "prometheus-cloudeye-exporter", + "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "prometheus" + } + ], + "description": "【华为云ECS支持的监控指标】https://support.huaweicloud.com/usermanual-ecs/ecs_03_1002.html", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 8919, + "graphTooltip": 0, + "id": 1, + "iteration": 1651715271451, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 187, + "panels": [], + "repeat": "EPS", + "title": "资源总览(企业项目)企业项目:$EPS,当前选中主机:$hostname", + "type": "row" + }, + { + "columns": [], + "description": "分区使用率、磁盘读取、磁盘写入、下载带宽、上传带宽,如果有多个网卡或者多个分区,是采集的使用率最高的网卡或者分区的数值。\n\n连接数:CurrEstab - 当前状态为 ESTABLISHED 或 CLOSE-WAIT 的 TCP 连接数。", + "fontSize": "80%", + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 185, + "showHeader": true, + "sort": { + "col": 14, + "desc": true + }, + "styles": [ + { + "$$hashKey": "object:1808", + "alias": "主机名", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 1, + "link": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "hostname", + "thresholds": [], + "type": "string", + "unit": "bytes" + }, + { + "$$hashKey": "object:1809", + "alias": "IP", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "hostIP", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1810", + "alias": "磁盘使用率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1814", + "alias": "CPU使用率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #F", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1815", + "alias": "内存使用率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #G", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "percent" + }, + { + "$$hashKey": "object:1816", + "alias": "磁盘读取*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #H", + "thresholds": [ + "10485760", + "20485760" + ], + "type": "number", + "unit": "Bps" + }, + { + "$$hashKey": "object:1817", + "alias": "磁盘写入*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #I", + "thresholds": [ + "10485760", + "20485760" + ], + "type": "number", + "unit": "Bps" + }, + { + "$$hashKey": "object:1818", + "alias": "下载带宽*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #J", + "thresholds": [ + "30485760", + "104857600" + ], + "type": "number", + "unit": "bps" + }, + { + "$$hashKey": "object:1819", + "alias": "上传带宽*", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #K", + "thresholds": [ + "30485760", + "104857600" + ], + "type": "number", + "unit": "bps" + }, + { + "$$hashKey": "object:1820", + "alias": "5min负载", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #L", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1821", + "alias": "连接数", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #M", + "thresholds": [ + "1000", + "1500" + ], + "type": "string", + "unit": "short" + }, + { + "$$hashKey": "object:1822", + "alias": "TCP_tw", + "align": "center", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "mappingType": 1, + "pattern": "Value #N", + "thresholds": [ + "5000", + "20000" + ], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1823", + "alias": "", + "align": "right", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": false, + "expr": "huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"} -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "CPU使用率", + "refId": "F" + }, + { + "exemplar": false, + "expr": "huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"} -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "内存使用率", + "refId": "G" + }, + { + "exemplar": false, + "expr": "huaweicloud_agt_ecs_SlAsH_disk_usedPercent{epId=~\"$EPS\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "磁盘使用率", + "refId": "B" + }, + { + "exemplar": false, + "expr": "huaweicloud_agt_ecs_net_tcp_total{epId=~'$EPS'} ", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "连接数", + "refId": "M" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_agt_ecs_net_bitSent{epId=~'$EPS'}) by (hostIP)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "下载带宽", + "refId": "J" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_agt_ecs_net_bitRecv{epId=~'$EPS'}) by (hostIP)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "上传带宽", + "refId": "K" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) by (hostIP)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "5分钟负载", + "refId": "L" + } + ], + "title": "服务器资源总览表【企业项目:$EPS,主机总数:$total】", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 11 + }, + "hiddenSeries": false, + "id": 191, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:421", + "alias": "总平均使用率", + "lines": false, + "pointradius": 1, + "points": true, + "yaxis": 2 + }, + { + "$$hashKey": "object:422", + "alias": "总负载", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "avg(huaweicloud_agt_ecs_load_average5{epId=~\"$EPS\"}) * 100", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "总5分钟负载", + "refId": "A", + "step": 240 + }, + { + "exemplar": true, + "expr": "avg((huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"}))", + "format": "time_series", + "hide": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "总平均使用率", + "refId": "F", + "step": 240 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "$EPS:整体总负载与整体平均CPU使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:8791", + "format": "short", + "label": "总负载", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:8792", + "decimals": 0, + "format": "percent", + "label": "平均使用率", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 1, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 11 + }, + "height": "300", + "hiddenSeries": false, + "id": 195, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:495", + "alias": "总平均使用率" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "avg(huaweicloud_agt_ecs_mem_usedPercent{epId=~\"$EPS\"})", + "format": "time_series", + "hide": false, + "interval": "3m", + "intervalFactor": 1, + "legendFormat": "总平均使用率", + "refId": "H" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "$EPS:整体平均内存使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:8938", + "format": "percent", + "label": "内存使用率", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:8939", + "format": "percent", + "label": "平均使用率", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 1, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 11 + }, + "hiddenSeries": false, + "id": 197, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:569", + "alias": "总平均使用率", + "lines": false, + "pointradius": 1, + "points": true, + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "avg(huaweicloud_agt_ecs_disk_usedPercent + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util*0)", + "format": "time_series", + "instant": false, + "interval": "3m", + "intervalFactor": 1, + "legendFormat": "系统磁盘总使用率", + "refId": "E" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "$EPS:整体平均磁盘使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:8990", + "decimals": 1, + "format": "percent", + "label": "磁盘使用率", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:8991", + "format": "percent", + "label": "平均使用率", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 189, + "panels": [], + "repeat": "EPS", + "title": "资源明细:【$EPS】【$hostIP】", + "type": "row" + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 19 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1605", + "alias": "", + "color": "#C4162A", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_cpu_usage{hostIP=~\"$hostIP\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-CPU使用率", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:11294", + "decimals": 0, + "format": "percent", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:11295", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 19 + }, + "height": "300", + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:154", + "alias": "", + "color": "rgb(0, 209, 255)", + "lines": false, + "pointradius": 1, + "points": true, + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_mem_usedPercent{hostIP=~\"$hostIP\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})内存使用率", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "内存使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "format": "percent", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 29 + }, + "height": "300", + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:129", + "alias": "", + "color": "#C4162A" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_load_average5{hostIP=~\"$hostIP\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-5分钟负载", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "系统平均负载", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 174, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_disk_usedPercent + on (instance_id) group_left (EPS,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}_{{hostname}}_{{mount_point}}-磁盘使用率", + "refId": "A" + } + ], + "title": "磁盘使用率", + "type": "timeseries" + }, + { + "aliasColors": { + "vda_write": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "Read Requests: 每个磁盘分区每秒读完成次数\n\nWrite Requests: 每个磁盘分区每秒写完成次数", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 39 + }, + "height": "300", + "hiddenSeries": false, + "id": 161, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:545", + "alias": "/.*_读取$/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_ecs_disk_read_requests_rate{hostIP=~'$hostIP'}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-磁盘读IOPS", + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "huaweicloud_sys_ecs_disk_write_requests_rate{hostIP=~'$hostIP'}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-磁盘写IOPS", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "磁盘读写速率(IOPS)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:566", + "format": "iops", + "label": "读取(-)/写入(+)I/O ops/sec", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:567", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 39 + }, + "hiddenSeries": false, + "id": 175, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_disk_ioUtils + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0 ", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": " {{hostIP}}_{{hostname}}_{{disk}}-磁盘I/O使用率", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "磁盘I/O使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:997", + "decimals": 0, + "format": "percent", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:998", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "vda_write": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "Read bytes 每个磁盘分区每秒读取的比特数\nWritten bytes 每个磁盘分区每秒写入的比特数", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 49 + }, + "height": "300", + "hiddenSeries": false, + "id": 168, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "show": true, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:4199", + "alias": "/.*_读取$/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_ecs_disk_read_bytes_rate{hostIP=~'$hostIP'}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-磁盘读操作速率", + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "huaweicloud_sys_ecs_disk_write_bytes_rate{hostIP=~'$hostIP'}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-磁盘写操作速率", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "磁盘读写容量", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:137", + "format": "Bps", + "label": "读取(-)/写入(+)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:138", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "vda": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 49 + }, + "height": "300", + "hiddenSeries": false, + "id": 160, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:3772", + "alias": "/,*_读取$/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_disk_inodesUsedPercent + on (instance_id) group_left (epId,hostIP,hostname) huaweicloud_sys_ecs_cpu_util{epId=~\"$EPS\",hostIP=~\"$hostIP\"}*0 ", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}_{{hostname}}_{{mount_point}}-磁盘iNode使用率(/)", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "磁盘iNode使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:316", + "format": "percent", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:317", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.10.227:9100_em1_in下载": "super-light-green", + "192.168.10.227:9100_em1_out上传": "dark-blue" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 59 + }, + "height": "300", + "hiddenSeries": false, + "id": 157, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sideWidth": 650, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_net_bitRecv{hostIP=~'$hostIP'}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-入网带宽", + "refId": "A", + "step": 4 + }, + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_net_bitSent{hostIP=~'$hostIP'} * -1", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-出网带宽", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络带宽使用", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:315", + "format": "bps", + "label": "出网(-)/入网(+)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:316", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_TCP_alloc": "semi-dark-blue", + "TCP": "#6ED0E0", + "TCP_alloc": "blue" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "net_tcp_total - 统计测量对象网卡所有状态的TCP连接数总和\n\nnet_tcp_established - 统计测量对象网卡处于ESTABLISHED状态的TCP连接数量\n", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 68 + }, + "height": "300", + "hiddenSeries": false, + "id": 158, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 650, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:4470", + "alias": "", + "color": "#E02F44", + "lines": false, + "pointradius": 1, + "points": true, + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_net_tcp_total{hostIP=~'$hostIP'}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{hostIP}}({{hostname}})-TCP连接数总和", + "refId": "A", + "step": 20 + }, + { + "exemplar": true, + "expr": "huaweicloud_agt_ecs_net_tcp_established{hostIP=~'$hostIP'}", + "hide": false, + "interval": "", + "legendFormat": "{{hostIP}}({{hostname}})-ESTABLISHED状态的TCP连接数量", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络连接信息", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:4485", + "decimals": 0, + "format": "short", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:4486", + "format": "short", + "label": "", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": false, + "schemaVersion": 35, + "style": "dark", + "tags": [ + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "default", + "value": "0" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "huaweicloud_epinfo", + "hide": 0, + "includeAll": false, + "label": "企业项目", + "multi": false, + "name": "EPS", + "options": [], + "query": { + "query": "huaweicloud_epinfo", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"},hostIP)", + "hide": 0, + "includeAll": true, + "label": "主机IP", + "multi": true, + "name": "hostIP", + "options": [], + "query": { + "query": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\"},hostIP)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\",hostIP=~\"$hostIP\"},hostname)", + "hide": 0, + "includeAll": true, + "label": "主机名", + "multi": false, + "name": "hostname", + "options": [], + "query": { + "query": "label_values(huaweicloud_agt_ecs_cpu_usage{epId=~\"$EPS\",hostIP=~\"$hostIP\"},hostname)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "15", + "value": "15" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", + "hide": 2, + "includeAll": false, + "label": "", + "multi": false, + "name": "total", + "options": [], + "query": { + "query": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/{} (.*) .*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "hidden": false, + "now": true, + "refresh_intervals": [ + "15s", + "30s", + "1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "弹性云服务器(ECS)", + "uid": "9CWBz0bi2", + "version": 11, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/old_version/elb_dashboard_template.json b/grafana_dashboard/templates/old_version/elb_dashboard_template.json new file mode 100644 index 0000000..747deaa --- /dev/null +++ b/grafana_dashboard/templates/old_version/elb_dashboard_template.json @@ -0,0 +1,1994 @@ +{ + "__inputs": [ + { + "name": "prometheus-cloudeye-exporter", + "label": "prometheus-cloudeye-exporter", + "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "prometheus" + } + ], + "description": "【华为云ELB监控指标说明】https://support.huaweicloud.com/usermanual-elb/elb_ug_jk_0001.html", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 8919, + "graphTooltip": 0, + "id": 24, + "iteration": 1652275324173, + "links": [ + { + "$$hashKey": "object:2302", + "asDropdown": true, + "icon": "external link", + "tags": [], + "targetBlank": true, + "title": "", + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 187, + "panels": [], + "repeat": "EPS", + "title": "资源总览(企业项目)企业项目:$EPS", + "type": "row" + }, + { + "columns": [], + "description": "", + "fontSize": "80%", + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 185, + "showHeader": true, + "sort": { + "col": 14, + "desc": true + }, + "styles": [ + { + "$$hashKey": "object:1808", + "alias": "负载均衡器(ELB)", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 1, + "link": false, + "linkTooltip": "", + "linkUrl": "", + "mappingType": 1, + "pattern": "name", + "thresholds": [], + "type": "string", + "unit": "bytes" + }, + { + "$$hashKey": "object:1809", + "alias": "私有IP", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkTargetBlank": false, + "linkTooltip": "浏览主机明细", + "linkUrl": "", + "mappingType": 1, + "pattern": "vip_address", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1810", + "alias": "并发连接数", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "mappingType": 1, + "pattern": "Value #A", + "thresholds": [ + "2000", + "3000" + ], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1814", + "alias": "活跃连接数", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [ + "2000", + "3000" + ], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1815", + "alias": "非活跃连接数", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "mappingType": 1, + "pattern": "Value #C", + "thresholds": [ + "70", + "85" + ], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1816", + "alias": "新建连接数", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "mappingType": 1, + "pattern": "Value #D", + "thresholds": [ + "100", + "200" + ], + "type": "number", + "unit": "none" + }, + { + "$$hashKey": "object:1817", + "alias": "网络流入速率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #E", + "thresholds": [ + "10240000", + "102400000" + ], + "type": "number", + "unit": "binBps" + }, + { + "$$hashKey": "object:844", + "alias": "监听器名称", + "align": "auto", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "listener_name", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:3937", + "alias": "网络流出速率", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #F", + "thresholds": [ + "10240000", + "1024000000" + ], + "type": "number", + "unit": "binBps" + }, + { + "$$hashKey": "object:489", + "alias": "7层后端返回码(4XX)", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #G", + "thresholds": [ + "0", + "1" + ], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:721", + "alias": "7层后端返回码(5XX)", + "align": "auto", + "colorMode": "cell", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #H", + "thresholds": [ + "0", + "1" + ], + "type": "number", + "unit": "short" + }, + { + "$$hashKey": "object:1823", + "alias": "", + "align": "right", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": false, + "expr": "huaweicloud_sys_elb_m1_cps{epId=~\"$EPS\"} -0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "并发连接数", + "refId": "A" + }, + { + "exemplar": false, + "expr": "huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "活跃连接数", + "refId": "B" + }, + { + "exemplar": false, + "expr": "huaweicloud_sys_elb_m3_inact_conn{epId=~\"$EPS\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "非活跃连接数", + "refId": "C" + }, + { + "exemplar": false, + "expr": "huaweicloud_sys_elb_m4_ncps{epId=~\"$EPS\"} - 0", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "新建连接数", + "refId": "D" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_elb_m7_in_Bps{epId=~\"$EPS\"}) by (listener_name)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流入速率", + "refId": "E" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_elb_m8_out_Bps{epId=~\"$EPS\"}) by (listener_name)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "网络流出速率", + "refId": "F" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_elb_m15_l7_upstream_4xx{epId=~\"$EPS\"}) by (listener_name)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "7层后端返回码(4XX)", + "refId": "G" + }, + { + "exemplar": false, + "expr": "avg(huaweicloud_sys_elb_m16_l7_upstream_5xx{epId=~\"$EPS\"}) by (listener_name)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "7层后端返回码(5XX)", + "refId": "H" + } + ], + "title": "ELB资源总览表【企业项目:$EPS】", + "transform": "table", + "type": "table-old" + }, + { + "collapsed": false, + "datasource": "${prometheus-cloudeye-exporter}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 189, + "panels": [], + "repeat": "EPS", + "title": "资源明细:【$EPS】【$hostIP】【$hostname】【$listener】", + "type": "row" + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 12 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m2_act_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-活跃连接数", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "活跃连接数", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:11294", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:11295", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 12 + }, + "hiddenSeries": false, + "id": 190, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m3_inact_conn{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-非活跃连接数", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "非活跃连接数", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:11294", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:11295", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 22 + }, + "height": "300", + "hiddenSeries": false, + "id": 156, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m1_cps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-并发连接数", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "并发连接数", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 22 + }, + "height": "300", + "hiddenSeries": false, + "id": 192, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l4_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_L4并发连接数", + "refId": "A", + "step": 4 + }, + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l7_con_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "hide": false, + "interval": "", + "legendFormat": "{{vip_address}}_{{name}}_L7并发连接数", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "并发连接使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "decimals": 2, + "format": "percent", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "max": "100", + "min": "0", + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 32 + }, + "height": "300", + "hiddenSeries": false, + "id": 191, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m4_ncps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-新建连接数", + "refId": "A", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "新建连接数", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_总内存": "dark-red", + "使用率": "yellow", + "内存_Avaliable": "#6ED0E0", + "内存_Cached": "#EF843C", + "内存_Free": "#629E51", + "内存_Total": "#6d1f62", + "内存_Used": "#eab839", + "可用": "#9ac48a", + "总内存": "#bf1b00" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 32 + }, + "height": "300", + "hiddenSeries": false, + "id": 193, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l4_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_L4新建连接数", + "refId": "A", + "step": 4 + }, + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l7_ncps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_L7新建连接数", + "refId": "B", + "step": 4 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "新建连接使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:183", + "decimals": 0, + "format": "percent", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:184", + "format": "percent", + "label": "", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "15分钟": "#6ED0E0", + "1分钟": "#BF1B00", + "5分钟": "#CCA300" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 0, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "grid": {}, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 42 + }, + "height": "300", + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m7_in_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-网络流入速率", + "metric": "", + "refId": "A", + "step": 20, + "target": "" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_elb_m8_out_Bps{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-网络流出速率", + "metric": "", + "refId": "B", + "step": 20, + "target": "" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络流入/流出速率", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:136", + "decimals": 2, + "format": "binBps", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:137", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${prometheus-cloudeye-exporter}", + "decimals": 0, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 42 + }, + "hiddenSeries": false, + "id": 174, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "min", + "sortDesc": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l4_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_4层入带宽使用率", + "refId": "A" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_elb_l4_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_4层出带宽使用率", + "refId": "B" + }, + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_l7_in_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_7层入带宽使用率", + "refId": "C" + }, + { + "exemplar": true, + "expr": "0 - huaweicloud_sys_elb_l7_out_bps_usage{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}_{{name}}_7层出带宽使用率", + "refId": "D" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "网络流入/流出带宽使用率", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:227", + "decimals": 2, + "format": "percent", + "label": "入带宽使用率(+)/出带宽使用率(-)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:228", + "decimals": 2, + "format": "percentunit", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "vda_write": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "description": "\n\nWrite Requests: 每个磁盘分区每秒写完成次数", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 52 + }, + "height": "300", + "hiddenSeries": false, + "id": 161, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_ma_normal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{pool_name}})-正常主机数", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "正常主机数量", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:566", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:567", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 52 + }, + "hiddenSeries": false, + "id": 175, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m9_abnormal_servers{vip_address=~\"$hostIP\",name=~\"$hostname\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{pool_name}})-异常主机数", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "异常主机数量", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:997", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:998", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "vda_write": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 62 + }, + "height": "300", + "hiddenSeries": false, + "id": 168, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m15_l7_upstream_4xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-7层后端返回码(4XX)", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "后端返回码4XX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:137", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:138", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "vda": "#6ED0E0" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 0, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 62 + }, + "height": "300", + "hiddenSeries": false, + "id": 160, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.3.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "datasource": "${prometheus-cloudeye-exporter}", + "targets": [ + { + "exemplar": true, + "expr": "huaweicloud_sys_elb_m16_l7_upstream_5xx{vip_address=~\"$hostIP\",name=~\"$hostname\",listener_name=~\"$listener\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{vip_address}}({{name}}---{{listener_name}})-7层后端返回码(5XX)", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "后端返回码5XX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:316", + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:317", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": false, + "schemaVersion": 34, + "style": "dark", + "tags": [ + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "基础架构部-运维组", + "value": "0d6fdb17-8e8d-411c-a072-cca611ee664b" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "huaweicloud_epinfo", + "hide": 0, + "includeAll": false, + "label": "企业项目", + "multi": false, + "name": "EPS", + "options": [], + "query": { + "query": "huaweicloud_epinfo", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"},vip_address)", + "hide": 0, + "includeAll": true, + "label": "ELB-IP", + "multi": true, + "name": "hostIP", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\"},vip_address)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\",vip_address=~\"$hostIP\"},name)", + "hide": 0, + "includeAll": true, + "label": "实例名", + "multi": true, + "name": "hostname", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_elb_m2_act_conn{epId=~\"$EPS\",vip_address=~\"$hostIP\"},name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "108", + "value": "108" + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", + "hide": 2, + "includeAll": false, + "label": "", + "multi": false, + "name": "total", + "options": [], + "query": { + "query": "query_result(count(huaweicloud_agt_ecs_net_tcp_established{epId=~\"$EPS\"}))", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/{} (.*) .*/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${prometheus-cloudeye-exporter}", + "definition": "label_values(huaweicloud_sys_elb_m2_act_conn{name=~\"$hostname\", vip_address=~\"$hostIP\"},listener_name)", + "hide": 0, + "includeAll": true, + "label": "监听器", + "multi": true, + "name": "listener", + "options": [], + "query": { + "query": "label_values(huaweicloud_sys_elb_m2_act_conn{name=~\"$hostname\", vip_address=~\"$hostIP\"},listener_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "hidden": false, + "now": true, + "refresh_intervals": [ + "15s", + "30s", + "1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "弹性负载均衡(ELB)", + "uid": "9CWBz0bi3", + "version": 39, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana_dashboard/templates/vpc_dashboard_template.json b/grafana_dashboard/templates/vpc_dashboard_template.json index 4beb276..4fd28f5 100644 --- a/grafana_dashboard/templates/vpc_dashboard_template.json +++ b/grafana_dashboard/templates/vpc_dashboard_template.json @@ -1,32 +1,63 @@ { "__inputs": [ { - "name": "prometheus-cloudeye-exporter", - "label": "prometheus-cloudeye-exporter", - "description": "prometheus plugin that obtains data from cloudeye exporter for grafana", + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", "type": "datasource", "pluginId": "prometheus", - "pluginName": "prometheus" + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.2.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, "description": "【华为云VPC监控指标说明】https://support.huaweicloud.com/intl/zh-cn/usermanual-vpc/vpc010012.html", "editable": true, "fiscalYearStartMonth": 0, - "gnetId": 8919, "graphTooltip": 0, - "id": 7, - "iteration": 1660535145197, - "links": [ - { - "$$hashKey": "object:2302", - "asDropdown": true, - "icon": "external link", - "tags": [], - "targetBlank": true, - "title": "", - "type": "dashboards" - } - ], + "id": null, + "links": [], "liveNow": false, "panels": [ { @@ -37,292 +68,439 @@ "x": 0, "y": 0 }, - "id": 194, + "id": 2, "panels": [], "repeat": "EPS", - "title": "带宽 资源总览(企业项目)企业项目:$EPS", + "repeatDirection": "h", + "title": "带宽 资源总览 企业项目:$EPS", "type": "row" }, { - "columns": [], - "datasource": "${prometheus-cloudeye-exporter}", - "description": "", - "fontSize": "80%", + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "计费模式" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "bandwidth": { + "index": 0, + "text": "按带宽" + }, + "traffic": { + "index": 1, + "text": "按流量" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "入网带宽" + }, + "properties": [ + { + "id": "unit", + "value": "binbps" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 5242880 + }, + { + "color": "dark-red", + "value": 10485760 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "入网带宽使用率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "入网流量" + }, + "properties": [ + { + "id": "unit", + "value": "bits" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10485760 + }, + { + "color": "dark-red", + "value": 52428800 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网带宽" + }, + "properties": [ + { + "id": "unit", + "value": "binbps" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 5242880 + }, + { + "color": "dark-red", + "value": 10485760 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网带宽使用率" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网流量" + }, + "properties": [ + { + "id": "unit", + "value": "bits" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10485760 + }, + { + "color": "dark-red", + "value": 52428800 + } + ] + } + } + ] + } + ] + }, "gridPos": { - "h": 7, + "h": 8, "w": 24, "x": 0, "y": 1 }, - "id": 185, - "showHeader": true, - "sort": { - "col": 14, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:1808", - "alias": "带宽名称", - "align": "auto", - "colors": [ - "#37872D", - "#FA6400", - "#C4162A" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 1, - "link": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "name", - "thresholds": [ - "" - ], - "type": "string", - "unit": "bytes" - }, - { - "$$hashKey": "object:1809", - "alias": "带宽ID", - "align": "auto", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "浏览主机明细", - "linkUrl": "", - "mappingType": 1, - "pattern": "bandwidth_id", - "thresholds": [ - "" - ], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:1810", - "alias": "入网带宽 ", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "link": false, - "mappingType": 1, - "pattern": "Value #A", - "thresholds": [ - "5242880", - "10485760" - ], - "type": "number", - "unit": "binbps" - }, - { - "$$hashKey": "object:1814", - "alias": "入网带宽使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #B", - "thresholds": [ - "50", - "80" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1815", - "alias": "入网流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "Value #C", - "thresholds": [ - "10485760", - "52428800" - ], - "type": "number", - "unit": "bytes" - }, - { - "$$hashKey": "object:1816", - "alias": "出网带宽", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "Value #D", - "thresholds": [ - "5242880", - "10485760" - ], - "type": "number", - "unit": "binBps" - }, - { - "$$hashKey": "object:1817", - "alias": "出网带宽使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #E", - "thresholds": [ - "50", - "80" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:3937", - "alias": "出网流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #F", - "thresholds": [ - "10485760", - "52428800" + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "number", - "unit": "bytes" + "show": false }, - { - "$$hashKey": "object:750", - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "/.*/", - "thresholds": [], - "type": "hidden", - "unit": "short" - } - ], + "showHeader": true + }, + "pluginVersion": "10.2.0", "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", - "hide": false, "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "入网带宽", + "legendFormat": "__auto", + "range": false, "refId": "A" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "入网使用率", + "legendFormat": "__auto", + "range": false, "refId": "B" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "入网流量", + "legendFormat": "__auto", + "range": false, "refId": "C" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网带宽", + "legendFormat": "__auto", + "range": false, "refId": "D" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网带宽使用率", + "legendFormat": "__auto", + "range": false, "refId": "E" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress=~\"\"}) by (name,bandwidth_id)", + "expr": "huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网流量", + "legendFormat": "__auto", + "range": false, "refId": "F" } ], "title": "带宽资源总览表【企业项目:$EPS】", - "transform": "table", - "type": "table-old" + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "bandwidth_id", + "chargeMode", + "name", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "bandwidthType" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A": "入网带宽", + "Value #B": "入网带宽使用率", + "Value #C": "入网流量", + "Value #D": "出网带宽", + "Value #E": "出网带宽使用率", + "Value #F": "出网流量", + "bandwidthType": "带宽类型", + "bandwidth_id": "带宽ID", + "chargeMode": "计费模式", + "name": "带宽名称" + } + } + } + ], + "type": "table" }, { "collapsed": false, @@ -330,739 +508,584 @@ "h": 1, "w": 24, "x": 0, - "y": 8 + "y": 9 }, - "id": 192, + "id": 3, "panels": [], "repeat": "EPS", - "title": "带宽 资源详情(企业项目)企业项目:$EPS", + "repeatDirection": "h", + "title": "带宽 资源详情 企业项目:$EPS", "type": "row" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "binBps" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binbps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 0, - "y": 9 + "y": 10 }, - "hiddenSeries": false, - "id": 196, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 4, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网带宽", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "binBps", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 8, - "y": 9 + "y": 10 }, - "hiddenSeries": false, - "id": 202, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 5, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网带宽使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "bytes" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bits" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 16, - "y": 9 - }, - "hiddenSeries": false, - "id": 198, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 10 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 6, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网流量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "bytes", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "binbps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 0, - "y": 17 + "y": 19 }, - "hiddenSeries": false, - "id": 200, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 7, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网带宽", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "binbps", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 8, - "y": 17 - }, - "hiddenSeries": false, - "id": 199, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 19 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 8, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网带宽使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "bytes" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bits" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 8, "x": 16, - "y": 17 + "y": 19 }, - "hiddenSeries": false, - "id": 201, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 9, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress=~\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress=~\"\", chargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "带宽名称:{{name}},计费模式:{{chargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网流量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "bytes", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": false, @@ -1070,1046 +1093,1064 @@ "h": 1, "w": 24, "x": 0, - "y": 25 + "y": 28 }, - "id": 190, + "id": 10, "panels": [], "repeat": "EPS", - "title": "弹性公网IP 资源总览(企业项目)企业项目:$EPS", + "repeatDirection": "h", + "title": "弹性公网IP 资源总览 企业项目:$EPS", "type": "row" }, { - "columns": [], - "datasource": "${prometheus-cloudeye-exporter}", - "description": "", - "fontSize": "80%", + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "入网带宽" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "auto" + } + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "unit", + "value": "binbps" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 5242880 + }, + { + "color": "dark-red", + "value": 10485760 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "入网使用率" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "入网流量" + }, + "properties": [ + { + "id": "unit", + "value": "bits" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10485760 + }, + { + "color": "dark-red", + "value": 52428800 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网带宽" + }, + "properties": [ + { + "id": "unit", + "value": "binbps" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 5242880 + }, + { + "color": "dark-red", + "value": 10485760 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网使用率" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 50 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "出网流量" + }, + "properties": [ + { + "id": "unit", + "value": "bits" + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 10485760 + }, + { + "color": "dark-red", + "value": 52428800 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "计费模式" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "bandwidth": { + "index": 0, + "text": "按带宽" + }, + "traffic": { + "index": 1, + "text": "按流量" + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, "gridPos": { - "h": 10, + "h": 8, "w": 24, "x": 0, - "y": 26 - }, - "id": 188, - "showHeader": true, - "sort": { - "col": 3, - "desc": true + "y": 29 }, - "styles": [ - { - "$$hashKey": "object:1808", - "alias": "IP", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 1, - "link": false, - "linkTooltip": "", - "linkUrl": "", - "mappingType": 1, - "pattern": "name", - "thresholds": [], - "type": "string", - "unit": "bytes" - }, - { - "$$hashKey": "object:1809", - "alias": "弹性公网IP ID", - "align": "auto", - "colors": [ - "#37872D", - "#FA6400", - "#C4162A" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "浏览主机明细", - "linkUrl": "", - "mappingType": 1, - "pattern": "publicip_id", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:1810", - "alias": "入网带宽", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "mappingType": 1, - "pattern": "Value #A", - "thresholds": [ - "5242880", - "10485760" - ], - "type": "number", - "unit": "binbps" - }, - { - "$$hashKey": "object:1814", - "alias": "入网使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #B", - "thresholds": [ - "50", - "80" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:1815", - "alias": "入网流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #C", - "thresholds": [ - "10485760", - "52428800" - ], - "type": "number", - "unit": "bytes" - }, - { - "$$hashKey": "object:1816", - "alias": "出网带宽", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #D", - "thresholds": [ - "5242880", - "10485760" - ], - "type": "number", - "unit": "binBps" - }, - { - "$$hashKey": "object:1817", - "alias": "出网带宽使用率", - "align": "auto", - "colorMode": "cell", - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #E", - "thresholds": [ - "50", - "80" - ], - "type": "number", - "unit": "percent" - }, - { - "$$hashKey": "object:3937", - "alias": "出网流量", - "align": "auto", - "colorMode": "cell", - "colors": [ - "#37872D", - "#FA6400", - "#C4162A" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #F", - "thresholds": [ - "10485760", - "52428800" + "id": 11, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "number", - "unit": "bytes" + "show": false }, - { - "$$hashKey": "object:750", - "alias": "", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "/.*/", - "thresholds": [], - "type": "hidden", - "unit": "short" - } - ], + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "出网使用率" + } + ] + }, + "pluginVersion": "10.2.0", "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", - "hide": false, "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "入网带宽", + "legendFormat": "__auto", + "range": false, "refId": "A" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "入网使用率", + "legendFormat": "__auto", + "range": false, "refId": "B" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "入网流量", + "legendFormat": "__auto", + "range": false, "refId": "C" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网带宽", + "legendFormat": "__auto", + "range": false, "refId": "D" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网带宽使用率", + "legendFormat": "__auto", + "range": false, "refId": "E" }, { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": false, - "expr": "avg(huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id)", + "expr": "avg(huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}) by (name,publicip_id,bandwidthChargeMode)", "format": "table", "hide": false, "instant": true, - "interval": "", - "legendFormat": "出网流量", + "legendFormat": "__auto", + "range": false, "refId": "F" } ], "title": "弹性公网IP资源总览表【企业项目:$EPS】", - "transform": "table", - "type": "table-old" + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "bandwidthChargeMode", + "publicip_id", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "Value #F", + "name" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value #A": 3, + "Value #B": 4, + "Value #C": 5, + "Value #D": 6, + "Value #E": 7, + "Value #F": 8, + "bandwidthChargeMode": 1, + "name": 0, + "publicip_id": 2 + }, + "renameByName": { + "Value #A": "入网带宽", + "Value #B": "入网使用率", + "Value #C": "入网流量", + "Value #D": "出网带宽", + "Value #E": "出网使用率", + "Value #F": "出网流量", + "bandwidthChargeMode": "计费模式", + "name": "IP", + "publicip_id": "弹性公网IP ID" + } + } + } + ], + "type": "table" }, { "collapsed": false, - "datasource": "${prometheus-cloudeye-exporter}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 36 + "y": 37 }, - "id": 187, + "id": 12, "panels": [], "repeat": "EPS", - "title": "弹性公网IP 详情 业项目:$EPS", + "repeatDirection": "h", + "title": "弹性公网IP详情 企业项目:$EPS", "type": "row" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "binBps" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binbps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 0, - "y": 37 + "y": 38 }, - "hiddenSeries": false, - "id": 204, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "min", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 13, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_downstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\", bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网带宽", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "binBps", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 8, - "y": 37 - }, - "hiddenSeries": false, - "id": 205, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 38 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 14, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_downstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\",bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网带宽使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "bytes" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bits" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 16, - "y": 37 - }, - "hiddenSeries": false, - "id": 206, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "y": 38 }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 15, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_down_stream{epId=~\"$EPS\",publicIpAddress!=\"\",bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "入网流量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "bytes", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "binBps" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "binbps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 0, "y": 46 }, - "hiddenSeries": false, - "id": 207, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "min", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 16, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_upstream_bandwidth{epId=~\"$EPS\",publicIpAddress!=\"\", bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网带宽", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "binBps", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 8, "y": 46 }, - "hiddenSeries": false, - "id": 208, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 17, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_upstream_bandwidth_usage{epId=~\"$EPS\",publicIpAddress!=\"\",bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网带宽使用率", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "percent", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "192.168.200.241:9100_Total": "dark-red", - "Idle - Waiting for something to happen": "#052B51", - "guest": "#9AC48A", - "idle": "#052B51", - "iowait": "#EAB839", - "irq": "#BF1B00", - "nice": "#C15C17", - "sdb_每秒I/O操作%": "#d683ce", - "softirq": "#E24D42", - "steal": "#FCE2DE", - "system": "#508642", - "user": "#5195CE", - "磁盘花费在I/O操作占比": "#ba43a9" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${prometheus-cloudeye-exporter}", - "decimals": 2, - "description": "", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { - "links": [], - "unit": "bytes" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bits" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 8, "x": 16, "y": 46 }, - "hiddenSeries": false, - "id": 209, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 6, - "nullPointMode": "null", + "id": 18, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "lastNotNull", + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "8.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", - "exemplar": true, - "expr": "huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress!=\"\"}", - "format": "time_series", - "hide": false, + "expr": "huaweicloud_sys_vpc_up_stream{epId=~\"$EPS\",publicIpAddress!=\"\",bandwidthChargeMode=~\"$ChargeMode\"}", "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A", - "step": 20 + "legendFormat": "IP:{{name}},计费模式:{{bandwidthChargeMode}}", + "range": true, + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "出网流量", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:11294", - "decimals": 0, - "format": "bytes", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:11295", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], - "refresh": "15s", - "schemaVersion": 36, - "style": "dark", + "refresh": "", + "schemaVersion": 38, "tags": [], "templating": { "list": [ { - "current": { - "selected": true, - "text": "default", - "value": "0" - }, - "datasource": "${prometheus-cloudeye-exporter}", + "current": {}, + "datasource": "${DS_PROMETHEUS}", "definition": "huaweicloud_epinfo", "hide": 0, "includeAll": false, @@ -2118,47 +2159,63 @@ "name": "EPS", "options": [], "query": { + "qryType": 4, "query": "huaweicloud_epinfo", - "refId": "StandardVariableQuery" + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/epName=\"(?[^\"]+)|epId=\"(?[^\"]+)/g", "skipUrlSync": false, "sort": 0, "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "按带宽" + ], + "value": [ + "bandwidth" + ] + }, + "hide": 0, + "includeAll": true, + "label": "计费模式", + "multi": true, + "name": "ChargeMode", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": true, + "text": "按带宽", + "value": "bandwidth" + }, + { + "selected": false, + "text": "按流量", + "value": "traffic" + } + ], + "query": "按带宽 : bandwidth , 按流量 : traffic", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" } ] }, "time": { - "from": "now-5m", + "from": "now-3h", "to": "now" }, - "timepicker": { - "hidden": false, - "now": true, - "refresh_intervals": [ - "15s", - "30s", - "1m", - "5m", - "15m", - "30m" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", + "timepicker": {}, + "timezone": "", "title": "弹性公网IP和带宽(VPC)", - "uid": "6557F0m4k", - "version": 32, + "uid": "dfa72048-c799-4fdc-adfa-36b472b981a5", + "version": 3, "weekStart": "" } \ No newline at end of file diff --git a/grafana_dashboard/use_grafana_template.md b/grafana_dashboard/use_grafana_template.md index 470c917..5da0247 100644 --- a/grafana_dashboard/use_grafana_template.md +++ b/grafana_dashboard/use_grafana_template.md @@ -62,6 +62,14 @@ + [云数据库 GeminiDB Redis](templates/geminidb(redis)_dashboard_template.json) + [NAT网关 NAT](templates/nat_dashboard_template.json) + [广域网质量监控 WanQMonitor](templates/wanq_monitor_dashboard_template.json) + + [视频直播 LIVE](templates/live_dashboard_template.json) + + [云日志服务 LTS](templates/lts_dashboard_template.json) + + [企业主机安全 HSS](templates/hss_dashboard_template.json) + + [表格存储服务 CloudTable](templates/cloudtable_dashboard_template.json) + + [云原生应用网络 ANC](templates/anc_dashboard_template.json) + + [事件网格 EG](templates/eg_dashboard_template.json) + + [对象存储服务 OBS](templates/obs_dashboard_template.json) + + [云解析服务 DNS](templates/dns_dashboard_template.json) 4. 效果展示: >ECS: > ![img.png](pic/ecs.jpg) diff --git a/metric.yml b/metric.yml index cb41e9a..e74dde7 100644 --- a/metric.yml +++ b/metric.yml @@ -1905,6 +1905,18 @@ SYS.DDOS: - instance_new_connection - instance_concurrent_connection - instance_service_bandwidth_usage + package: + - instance_drop_rate + - instance_back_to_source_rate + - instance_internet_in_rate + - instance_new_connection + - instance_concurrent_connection + package,ip: + - ip_drop_rate + - ip_back_to_source_rate + - ip_internet_in_rate + - ip_new_connection + - ip_concurrent_connection SYS.VPN: dim_metric_name: evpn_connection_id: @@ -2105,8 +2117,6 @@ SYS.CC: - network_outgoing_packets_rate - network_incoming_packets - network_outgoing_packets - - latency - - packet_loss_rate SYS.LakeFormation: resource: "service" dim_metric_name: @@ -2269,6 +2279,327 @@ SYS.WANQMonitor: - response_cost_avg - rtt_avg - download_cost_avg +SYS.OBS: + dim_metric_name: + bucket_name: + - request_get_medium_small_latency + - download_traffic + - qos_bucket_operation_write_bps_max + - capacity_infrequent_access_single_az + - request_count_delete_per_second + - upload_bytes_intranet + - extranet_processed_and_sent_time_pmb + - request_list_object_latency + - small_object_first_byte_latency + - request_size_gt_100MB_latency_p99 + - capacity_infrequent_access_multi_az + - qos_bucket_conn_max + - request_put_size_gt_100MB_latency + - archive_request_upload_bandwidths + - object_num_infrequent_access_total + - capacity_infrequent_access + - intranet_received_time_pmb + - request_size_gt_100MB_latency_p90 + - request_size_between_10MB_100MB_latency_p95 + - object_num_archive_medium_object + - standard_ia_get_object + - request_put_small_latency + - object_num_standard_total + - qos_bucket_operation_total_bps_max + - upload_transfer_rate + - upload_bytes + - standard_upload_request_count + - infrequent_request_download_bandwidths + - capacity_total + - object_num_standard_multi_az + - request_count_multi_delete_per_second + - request_get_small_latency + - download_bytes + - archive_request_delete_bytes + - request_count_per_second + - object_num_infrequent_access_large_object + - request_put_size_between_4MB_10MB_latency + - request_count_monitor_5XX + - capacity_intelligent_tiering_total + - request_head_object_latency + - request_put_size_le_1MB_latency + - object_num_infrequent_access_medium_object + - standard_request_upload_bandwidths + - request_count_monitor_6XX + - download_bytes_extranet + - upload_total_request_latency + - request_count_get_per_second + - extranet_received_and_processed_time_pmb + - qos_bucket_operation_write_bps_threshold + - download_bytes_intranet + - request_count_put_per_second + - request_size_between_10MB_100MB_latency_p99 + - intranet_processed_and_sent_time_pmb + - request_size_le_1MB_latency_p99 + - request_size_le_1MB_latency_p95 + - capacity_deep_archive + - request_get_size_between_1MB_4MB_latency + - upload_bytes_extranet + - download_traffic_extranet + - request_size_between_10MB_100MB_latency_p90 + - qos_bucket_operation_read_bps_avg + - qos_bucket_operation_total_tps_avg + - request_break_rate + - qos_bucket_operation_write_tps_max + - download_traffic_intranet + - request_success_rate + - multi_delete_request_count + - upload_traffic + - capacity_archive + - request_put_medium_latency + - object_num_infrequent_access_single_az + - capacity_intelligent_tiering_infrequent + - upload_traffic_extranet + - object_num_intelligent_tiering_frequent + - request_get_size_between_10MB_100MB_latency + - total_request_latency + - object_num_standard_large_object + - qos_bucket_conn_threshold + - capacity_standard + - download_traffic_infrequent_access + - request_get_medium_latency + - qos_bucket_operation_total_tps_max + - request_count_monitor_7XX + - request_get_huge_latency + - object_num_infrequent_access_small_object + - request_size_between_1MB_4MB_latency_p99 + - medium_object_first_byte_latency + - qos_bucket_operation_list_tps_threshold + - request_size_gt_100MB_latency_p95 + - request_size_between_4MB_10MB_latency_p99 + - request_size_between_1MB_4MB_latency_p90 + - request_count_monitor_2XX + - infrequent_download_request_count + - object_num_intelligent_tiering_infrequent + - qos_bucket_operation_read_tps_avg + - download_server_request_latency + - capacity_standard_single_az + - archive_request_download_bandwidths + - request_put_size_between_10MB_100MB_latency + - object_num_standard_small_object + - capacity_standard_multi_az + - download_total_request_latency + - request_get_large_latency + - object_num_archive_small_object + - qos_bucket_operation_read_tps_threshold + - get_request_count + - put_request_count + - first_byte_latency + - request_count_4xx + - request_count_5xx + - qos_bucket_operation_write_tps_threshold + - qos_bucket_operation_read_tps_max + - capacity_intelligent_tiering_archive + - request_size_between_4MB_10MB_latency_p95 + - request_put_large_latency + - object_num_deep_archive_total + - request_size_between_1MB_4MB_latency_p95 + - infrequent_request_upload_bandwidths + - effective_request_rate + - intranet_sent_time_pmb + - intranet_received_and_processed_time_pmb + - request_get_size_le_1MB_latency + - cdn_bytes + - total_request_callback_latency + - object_num_archive_large_object + - qos_bucket_conn_avg + - qos_bucket_operation_total_bps_avg + - cdn_traffic + - request_rename_object_latency + - object_num_archive_total + - object_num_all + - large_object_first_byte_latency + - request_count_monitor_4XX + - qos_bucket_operation_list_tps_max + - upload_server_request_latency + - object_num_standard_medium_object + - qos_bucket_operation_write_tps_avg + - infrequent_request_delete_bytes + - capacity_intelligent_tiering_frequent + - qos_bucket_operation_read_bps_threshold + - qos_bucket_operation_list_tps_avg + - object_num_standard_single_az + - upload_traffic_intranet + - qos_bucket_operation_total_tps_threshold + - request_get_size_gt_100MB_latency + - extranet_received_time_pmb + - object_num_intelligent_tiering_archive + - request_put_size_between_1MB_4MB_latency + - request_size_le_1MB_latency_p90 + - request_get_size_between_4MB_10MB_latency + - extranet_sent_time_pmb + - qos_bucket_operation_write_bps_avg + - qos_bucket_operation_total_bps_threshold + - object_num_intelligent_tiering_total + - request_count_monitor_3XX + - standard_request_delete_bytes + - archive_download_request_count + - object_num_infrequent_access_multi_az + - download_transfer_rate + - request_put_huge_latency + - archive_upload_request_count + - standard_download_request_count + - qos_bucket_operation_read_bps_max + - request_put_medium_small_latency + - standard_request_download_bandwidths + - infrequent_upload_request_count + - request_size_between_4MB_10MB_latency_p90 + bucket_name,api_name: + - large_object_first_byte_latency + - request_success_rate + - total_request_latency + - request_break_rate + - effective_request_rate + - api_request_count_per_second + - medium_object_first_byte_latency + - small_object_first_byte_latency + bucket_name,domain_name: + - upload_traffic_extranet + - request_count_get_per_second + - request_count_monitor_6XX + - upload_traffic_intranet + - download_traffic_extranet + - download_bytes + - download_traffic + - download_bytes_extranet + - request_count_monitor_2XX + - download_bytes_intranet + - upload_bytes + - request_count_4xx + - request_count_put_per_second + - upload_bytes_intranet + - request_count_5xx + - request_count_per_second + - download_traffic_intranet + - request_success_rate + - request_count_delete_per_second + - upload_traffic + - request_count_monitor_3XX + - upload_bytes_extranet + - request_count_monitor_7XX + bucket_name,api_name,http_code: + - request_code_count + bucket_name,http_code: + - request_code_count + tenant_id: + - object_num_infrequent_access_multi_az + - get_fetch_bandwidths + - object_num_intelligent_tiering_infrequent + - cdn_traffic + - request_count_monitor_7XX + - qos_account_operation_total_tps_max + - request_count_put_per_second + - request_count_get_per_second + - qos_account_operation_total_bps_max + - qos_account_operation_write_tps_avg + - qos_account_operation_write_tps_threshold + - large_object_first_byte_latency + - request_count_per_second + - object_num_infrequent_access_total + - capacity_infrequent_access + - capacity_infrequent_access_single_az + - qos_account_operation_read_tps_max + - request_count_monitor_6XX + - capacity_archive + - standard_ia_get_object + - capacity_intelligent_tiering_frequent + - object_num_intelligent_tiering_frequent + - download_bytes_extranet + - small_object_first_byte_latency + - qos_account_operation_write_bps_avg + - get_fetch_task_concurrency + - qos_account_operation_total_tps_avg + - qos_account_operation_read_bps_threshold + - object_num_standard_single_az + - download_traffic_extranet + - upload_traffic_extranet + - qos_account_operation_list_tps_avg + - qos_account_operation_read_bps_avg + - get_mirror_fetch_bandwidths + - upload_bytes_extranet + - object_num_infrequent_access_single_az + - request_count_monitor_5XX + - qos_account_operation_read_bps_max + - capacity_total + - capacity_infrequent_access_multi_az + - object_num_archive_large_object + - download_bytes_intranet + - object_num_archive_small_object + - object_num_standard_multi_az + - upload_traffic + - cdn_bytes + - qos_account_operation_list_tps_threshold + - effective_request_rate + - upload_bytes + - object_num_standard_large_object + - qos_account_conn_avg + - request_count_delete_per_second + - request_count_5xx + - get_mirror_fetch_task_status + - get_mirror_range_bandwidths + - object_num_infrequent_access_medium_object + - download_traffic_intranet + - qos_account_operation_list_tps_max + - download_traffic_infrequent_access + - capacity_standard_multi_az + - object_num_intelligent_tiering_archive + - qos_account_operation_total_bps_threshold + - medium_object_first_byte_latency + - object_num_infrequent_access_small_object + - upload_traffic_intranet + - object_num_intelligent_tiering_total + - capacity_intelligent_tiering_archive + - object_num_deep_archive_total + - total_request_latency + - qos_account_threshold + - object_num_all + - qos_account_operation_read_tps_threshold + - request_count_monitor_3XX + - qos_account_operation_write_bps_max + - request_break_rate + - qos_account_operation_total_bps_avg + - capacity_intelligent_tiering_infrequent + - request_count_4xx + - qos_account_operation_read_tps_avg + - object_num_infrequent_access_large_object + - object_num_standard_medium_object + - object_num_standard_small_object + - capacity_standard + - qos_account_operation_total_tps_threshold + - object_num_archive_total + - object_num_archive_medium_object + - request_success_rate + - request_latency_account_p90 + - capacity_standard_single_az + - upload_bytes_intranet + - request_latency_account_p95 + - download_bytes + - qos_account_conn_max + - request_count_monitor_2XX + - request_latency_account_p99 + - capacity_intelligent_tiering_total + - get_fetch_task_bps + - request_count_monitor_4XX + - download_traffic + - object_num_standard_total + - capacity_deep_archive + - qos_account_operation_write_bps_threshold + - qos_account_operation_write_tps_max + tenant_id,http_code: + - request_code_count +SYS.DNS: + dim_metric_name: + dns_recordset_id: + - recordset_noerror_count + dns_zone_id: + - zone_noerror_count + - zone_nxdomain_count + - zone_servfail_count SYS.ANC: resource: "rms" dim_metric_name: @@ -2319,4 +2650,77 @@ SYS.ANC: anc_membergroup_id: - total_server_count - healthy_server_count - - unhealthy_server_count \ No newline at end of file + - unhealthy_server_count +SYS.Live: + dim_metric_name: + domain: + - bandwidth + - http_4xx_proportion + - http_5xx_proportion + - inject_bandwidth + - inject_concurrency_number + - online + - play_traffic + - qps +SYS.LTS: + dim_metric_name: + log_group_id: + - indexing_traffic + - number_of_reads + - read_traffic + - used_storage + - write_traffic + - written_rows + log_group_id,log_stream_id: + - indexing_traffic + - number_of_reads + - read_traffic + - used_storage + - write_traffic + - written_rows +SYS.HSS: + dim_metric_name: + hss_enterprise_project_id: + - host_num + - unprotected_host_num + - risky_host_num + - uninstalled_or_offline_agent_num +SYS.EG: + resource: "rms" + dim_metric_name: + source_name: + - event_num + channel_id: + - pub_process_time + - pub_failed_rate + - pub_num,pub_success_num + - pub_failed_num + - pub_success_rate + streaming_id: + - streaming_live_status + - streaming_success_rate + - streaming_process_time + - streaming_process_num + - streaming_failed_num + - streaming_success_num + - streaming_failed_rate + subscription_id: + - sub_num + - sub_success_num + - sub_process_time + - sub_retry_rate + - sub_failed_rate + - event_time + - sub_failed_num + - sub_retry_num + - sub_success_rate + subscription_id,target_id: + - sub_failed_rate + - sub_failed_num + - event_time + - sub_success_rate + - sub_process_time + - sub_num + - sub_retry_rate + - sub_success_num + - sub_retry_num \ No newline at end of file