Closed JayChanggithub closed 1 month ago
I seems like to find out the exactly related feature. https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/http_monitor not sure if anything wrong. Thanks.
Hello @JayChanggithub,
The resource dynatrace_http_monitor is exactly what you're looking for.
If you already have configured these health checks via WebUI, then it's pretty easy to find out how the configuration would look like in Terraform HCL syntax. Our Terraform Provider offers export functionality for that.
In short, all you need to do is to configure environment variables for authentication
DYNATRACE_ENV_URL=https://########.live.dynatrace.com
DYNATRACE_API_TOKEN=dt0c01.########.########
In your specific case the API Token needs to have at least the permission Create and read synthetic monitors, locations, and nodes (ExternalSyntheticIntegration)
.
Then you just need to invoke the executable of your Terraform Provider explicitly. The documentation of our export functionality explain where you can find that executable.
In order to export specifically HTTP monitors your command line would have to look like this
./terraform-provider-dynatrace -export dynatrace_http_monitor
That will produce HCL code for all HTTP monitors you currently have configured in your environment.
If you even know the ID of your HTTP Monitor (visible in the WebUI in address line of the browser) you can even be more specific.
./terraform-provider-dynatrace -export dynatrace_http_monitor=HTTP_CHECK-XXXXXXXXXXXXX
@Reinhard-Pilz-Dynatrace
Thank you for your clear and insightful guidance. Just one more question: even though this was previously done manually, is it possible to adopt this approach? if so i will attempt those. thx.
Hi @JayChanggithub
I'm not sure whether I understand the question "to adopt this approach" correctly.
You've execute the Synthetic Monitor us.returns.cloud.sap
manually in the past?
@Reinhard-Pilz-Dynatrace
Sorry caused your misunderstanding. Yes. in the past we do these by manually. Currently we consider to use tf to management. Now I have been successfully to export configuration on my end. Just can closed issue in the meantime. Thanks.
Hi Dynatrace Team,
We would like to use Terraform to implement synthetic monitoring features for checking the health of HTTP requests (healthz). However, after reviewing the documentation, I couldn’t find any relevant modules or resources to accomplish this. If you have any recommendations or suggestions for this implementation, I would greatly appreciate your guidance.
Here's screenshot show up through manually. If anything possible to do that via terraform?