-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compute_vm light metricset and add update cloud instance id #20889
Conversation
Pinging @elastic/integrations-platforms (Team:Platforms) |
} | ||
} | ||
"id": "d5d9444a-1964-4d23-9c62-5463ecb16fe0", | ||
"name": "obslinux" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh, we are missing the rest of the host fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaiyan-sheng , the values used to map those host fields are not retrieved in this event, most likely the next one containing those values will. as you can see only percentage_cpu
is contained in the metrics.
@@ -124,3 +124,24 @@ func (service *MonitorService) GetMetricValues(resourceId string, namespace stri | |||
} | |||
return metrics, interval, nil | |||
} | |||
|
|||
// getResourceNameFormId maps resource group from resource ID | |||
func getResourceNameFromId(path string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these functions could be moved to a utils.go
file since look too generic?
@@ -198,3 +176,12 @@ func ContainsDimension(dimension string, dimensions []insights.LocalizableString | |||
} | |||
return false | |||
} | |||
|
|||
func containsResource(resId string, resources []Resource) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It this actually client's utils or is could be re-organised to a generic utils.go
for the whole azure
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is clients_utils , would like to keep it that way for the moment as it might get too muddy if we add more functionality, once a function is reused at other levels as service etc then it needs rethinking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions/questions mostly about code organization. Not being so familiar with this stuff but I don't see anything blocking this.
…stic#20889) * mofidy doc * rewrite * fix * temp * tests * work * changelog * fit tests * update dashboards (cherry picked from commit f8c2477)
…stic#20889) * mofidy doc * rewrite * fix * temp * tests * work * changelog * fit tests * update dashboards
What does this PR do?
compute_vm
to light metricsetcloud.instance.id
andcloud.instance.name
fields only forcompute_vm
onlyaazure.resource.name
andazure.resource.id
back to all metricsetsWhy is it important?
compute_vm
to light metricsetChecklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
cloud.instance.id
to the vm id in the compute_vm metricset #20754