DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
609 stars 303 forks source link

Dogshell timeboard input format unclear #750

Closed jhmartin closed 1 year ago

jhmartin commented 1 year ago

I am attempting to update a timeboard with dogshell. The command cannnot accept its own 'pull' output, and the docs for the timeboard api have been removed.

I've used dog timeboard pull ... > board.json to fetch a timeboard configuration, and fed it back in via dog timeboard update ... < board.json and get an error "ERROR: The 'graphs' parameter is required to be a list" .

Attempting to determine what format it is looking at I notice https://github.com/DataDog/datadogpy/blob/master/datadog/dogshell/timeboard.py#L282 which brings me to https://docs.datadoghq.com/api/latest/timeboards/ , which does not really help illuminate the problem as the API docs have been removed.

It looks like the dogshell timeboard command needs to be updated to use the new Dashboards API.

To Reproduce

  1. Create a timeboard with at least 1 graph, manually.
  2. Dogshell pull the timeboard down
  3. Dogshell update the timeboard with the same definition
  4. Observe the error about the format of the "graphs" parameter.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Timeboard updates with the definition in the JSON object.

Environment and Versions (please complete the following information):

therve commented 1 year ago

Hi,

dogshell already supports the dashboard API, doesn't that work for you?

jhmartin commented 1 year ago

Ah looks like it does, I didn't see it at https://docs.datadoghq.com/developers/guide/dogshell-quickly-use-datadog-s-api-from-terminal-shell/#dogshell-commands so I was blind to it. I'll send a PR for the docs.