[dogshell] add pull and push commands for monitor#227
[dogshell] add pull and push commands for monitor#227taraslayshchuk wants to merge 2 commits intoDataDog:masterfrom
Conversation
|
@yannmh, could you please review? |
| return no_punct.replace(" ", "_").replace("-", "_").strip("_") | ||
|
|
||
| format = args.format | ||
| res = api.Monitor.get_all( |
There was a problem hiding this comment.
This won’t work for orgs with lots of monitors as it will auto paginate. At super scale there is also an alternative pagination method, I’ve implemented in a different tool in this PR: airbnb/interferon#58
| if 'id' in monitor_obj: | ||
| # Always convert to int, in case it was originally a string. | ||
| monitor_obj["id"] = int(monitor_obj["id"]) | ||
| res = api.Monitor.update(**monitor_obj) |
There was a problem hiding this comment.
Not a fan of this as it’s not very smart. For example you can’t change a monitor type but this will attempt and fail and leave the user confused.
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
I was wondering why it is missing. It is bunch of manual work.