fix(cloudmon): unified metric id with resource id (#14997)

This commit is contained in:
屈轩
2022-09-19 22:53:41 +08:00
committed by GitHub
parent eaf2294bf7
commit fc563cc540
10 changed files with 10 additions and 0 deletions
+1
View File
@@ -66,6 +66,7 @@ type BucketDetails struct {
func (self BucketDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"brand": self.Brand,
"cloudregion": self.Cloudregion,
"cloudregion_id": self.CloudregionId,
+1
View File
@@ -321,6 +321,7 @@ type CloudaccountDetail struct {
func (self CloudaccountDetail) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"cloudaccount_id": self.Id,
"cloudaccount_name": self.Name,
"brand": self.Brand,
+1
View File
@@ -324,6 +324,7 @@ type DBInstanceDetails struct {
func (self DBInstanceDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"rds_id": self.Id,
"rds_name": self.Name,
"zone": self.Zone1Name,
+1
View File
@@ -40,6 +40,7 @@ type ElasticcacheDetails struct {
func (self ElasticcacheDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"redis_id": self.Id,
"redis_ip": self.PrivateIpAddr,
"redis_name": self.Name,
+1
View File
@@ -248,6 +248,7 @@ type ServerDetails struct {
func (self ServerDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"res_type": "guest",
"is_vm": "true",
"paltform": self.Hypervisor,
+1
View File
@@ -232,6 +232,7 @@ type HostDetails struct {
func (self HostDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"host_id": self.Id,
"host_ip": self.AccessIp,
"host": self.Name,
+1
View File
@@ -53,6 +53,7 @@ type KubeClusterDetails struct {
func (self KubeClusterDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.ExternalClusterId,
"res_type": "kube_cluster",
"cluster_id": self.ExternalClusterId,
"cluster_name": self.Name,
+1
View File
@@ -54,6 +54,7 @@ type ModelartsPoolDetails struct {
func (self ModelartsPoolDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"modelarts_pool_id": self.Id,
"modelarts_pool_name": self.Name,
"status": self.Status,
+1
View File
@@ -152,6 +152,7 @@ type StorageDetails struct {
func (self StorageDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"storage_id": self.Id,
"storage_name": self.Name,
"brand": self.Brand,
+1
View File
@@ -54,6 +54,7 @@ type AlertRecordDetails struct {
func (self AlertRecordDetails) GetMetricTags() map[string]string {
ret := map[string]string{
"id": self.Id,
"alert_id": self.AlertId,
"alert_name": self.AlertName,
"domain_id": self.DomainId,