Hi Team, I am looking for some ways to fetch heal...
# general
c
Hi Team, I am looking for some ways to fetch health and performance metrics using pulumi for all three cloud resources (aws, azure and gcp). Please suggest if any. Thanks!!
p
Hi Team / @quick-house-41860, can someone please help us with this?
q
Did I understand it correctly that you're trying to retrieve the actual metric data? You could do that by leveraging the SDKs of the cloud providers within your pulumi program, but I'm not aware of pulumi resources/functions that do that for you. What are you trying to do with the metrics in your Pulumi program? Drive deployment decisions?
p
Yes, we want to get the actual metric data. So, Pulumi doesn't support this? We came across this https://www.pulumi.com/docs/iac/clouds/aws/guides/cloudwatch/ However, it doesn't fullfill our purpose to get these metrics as a response to any API available in Pulumi.
q
Pulumi supports defining the infrastructure for metrics & logs (e.g. creating a CloudWatch alarm). If you want to pull the metrics in your program you can do that by using the cloud SDK. E.g. using https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html to fetch the metrics. That being said, what are you planning to use the metric data for? Using dynamic data like metrics in your IaC programs can bring many challenges (e.g. the preview might not be what happens during deployment). I'd recommend to decouple the two aspects
p
We want to use it for Monitoring, Troubleshooting, Optimizations etc.
Hey @quick-house-41860, When you mention that we should use cloud SDK, is it true for all the clouds? (Azure, GCP, AWS)
q
That depends on what tools you use for metrics. Of the native metrics tools of the big cloud provider's I've only used AWS CloudWatch. Otherwise third party tools like DataDog so I can't really give a good recommendation there.
p
Go it. Thanks for the update @quick-house-41860