add monitor subcommands that work from file#322
add monitor subcommands that work from file#322yannmh merged 3 commits intoDataDog:masterfrom Hefeweizen:update_files
Conversation
These subcommands read a filename from the command line, and then use specified file for all values. These features allow a workflow of `dog monitor show <id> > monitor_id.json && dog monitor fupdate monitor_id.json`. This workflow allows version control of all monitors, as well as repo-driven updates.
|
This is very helpful. Thank you @Hefeweizen |
|
@yannmh Thanks; I appreciate the review. I did mvp for my needs and only got this working with monitors. I think it'd be nice if this capability (load from file) were available for all object types (e.g. dashboards, &c). Should I piecemeal this in on each subcommand, or is there something architectural that could be done? |
|
I agree this would also be great for other resources. |
|
@yannmh I chose fupdate/fpost because I just wanted traction on the idea and to get something started without having to build too much argument handling into the existing _post. For better integration, it seems something like this may work: This provides the capability locally, but we'd have to make the changes across every subcommand (monitors, dashboards, &c). Is there anything we can do structurally to provide the capability across all of them in one swoop? |
These subcommands read a filename from the command line, and then use
specified file for all values. These features allow a workflow of
dog monitor show <id> > monitor_id.json && dog monitor fupdate monitor_id.json. This workflow allows version control of all monitors,as well as repo-driven updates.