:wave: hey, I am using pulumi (TS) w/ AWS and was ...
# getting-started
e
šŸ‘‹ hey, I am using pulumi (TS) w/ AWS and was hoping to also use it to configure some datadog alerts/monitors etc. Are there any sample projects you might recommend on github or elsewhere?
l
It's just a simple lambda. The instructions are on the Datadog website.
e
A simple lambda? I am hoping to write code to create a bunch of monitors in datadog?
l
The Datadog monitors are usually oneliners. It's the AWS integration with Datadog that's the lambda.
e
Yea, I am not really concerned w/ AWS - my application is emitting datadog metrics to datadog i.e. myApplication.someRoute.POST w/ results OK, latency 150ms
I would like to write a monitor that listens to these metrics and alerts if say the avg latency goes > 500 ms
or error rate is >1% or something
l
e
ok, was hoping there might be a sample app somewhere to look at but šŸ¤·
Copy code
āžœ  datadog  pulumi new datadog
error: template 'datadog' not found
āžœ  datadog
I guess this is not the most common use case just yet
In the past I built this stuff w/ terraform, it was somewhat painful
l
No, I don't think there's a template. I can't see any example code, except the trivial one used in the Pulumi integration test suite: https://github.com/pulumi/pulumi-datadog/tree/master/examples/user
e
cool. thanks
l
But you could look up Terraform examples. It's a bridged provider, so there's a 1:1 mapping from tf code to Pulumi code.
FWIW I use it for one of my clients and it's so vanilla that I've not had to look for examples. The Monitor class maps exactly to the fields they give me for creating monitors, so I guess they're exactly the same as what they're using in the Datadog UI?
e
I would guess so, thanks