zorkian / go-datadog-api

A Go implementation of the Datadog API.
BSD 3-Clause "New" or "Revised" License
183 stars 156 forks source link

Add GetMonitorsByMonitorTags function #273

Closed surminus closed 4 years ago

surminus commented 5 years ago

Previous behaviour was being able to fetch monitors using the custom tags assigned to a monitor which the API calls "monitor_tags".

I think quite rightly this was defined explicitly in the MonitorQueryOpts type, but we lost the function to be able to fetch monitors based upon those tags when this was added in[2].

Add a function back to enable me to fetch these monitors using those custom tags again.

[1] https://docs.datadoghq.com/api/?lang=bash#get-all-monitor-details [2] e0e11313d2bfb4f35f7a2b6f9019a098f9d822b5