mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
fix(cloudmon): unified metric id with resource id (#14997)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user