dd2tf icon indicating copy to clipboard operation
dd2tf copied to clipboard

Datadog Dashboards can have non-numeric IDs, but this isn't supported

Open thundergolfer opened this issue 5 years ago • 2 comments

🐛

ris-aew-hdc is an example. The Datadog docs now show this type of ID as well: https://docs.datadoghq.com/api/?lang=python#get-a-dashboard

Actual Behaviour

./dd2tf dashboards --ids ris-aew-hdc
invalid argument "ris-aew-hdc" for "--ids" flag: strconv.Atoi: parsing "ris-aew-hdc": invalid syntax
Usage of dashboards:
      --all        Export all available elements.
      --debug      Enable debug output.
      --files      Save each element into a separate file.
      --ids ints   IDs of the elements to fetch.
invalid argument "ris-aew-hdc" for "--ids" flag: strconv.Atoi: parsing "ris-aew-hdc": invalid syntax

Expected Behaviour

whatever working looks like 😅

thundergolfer avatar Dec 10 '19 05:12 thundergolfer

Looks like the fix would start here: https://github.com/amnk/dd2tf/blob/master/main.go#L36

go-datadog-api supports string or int at first glance.

Related: https://github.com/zorkian/go-datadog-api/issues/308

matt-canty-dragon avatar Mar 09 '20 14:03 matt-canty-dragon

It seems that https://github.com/zorkian/go-datadog-api/blob/master/boards.go is a new implementation for it

inductor avatar Mar 18 '20 10:03 inductor