-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dogshell] add pull and push commands for monitor #227
base: master
Are you sure you want to change the base?
[dogshell] add pull and push commands for monitor #227
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.