mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #266] Request: ability to copy all healthchecks from one project to another #198
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#198
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @caleb15 on GitHub (Jul 11, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/266
At https://www.15five.com we currently have two VPC's, each with their own project but all the healthchecks are the same. When I created the second project I manually copied over all ~60 healthchecks to the other project, which was a pain. In the future we will be expanding to more VPC's so it would be awesome if we could automatically copy all the healthchecks from one project to another.
@cuu508 commented on GitHub (Jul 13, 2019):
I think this would be reasonably easy to do using API calls. Here's a quick example, with no error handling, using Python and the requests library:
@ScottBeeson commented on GitHub (Sep 17, 2019):
The other issue was reopened. I have quoted the post below in that issue.
My request (#288) was a bit different than this one. My use case is within the SAME project and applied only to a SINGLE check. But I'm fine with it being here.I would like to be able to clone or duplicate any given check. I suspect it's extremely common that users have many checks on the same schedule or with the same tags. Duplicating these options over and over is tedious and prone to error. A copy, clone or duplicate feature for individual checks (in my case) would be immensely useful. A separate "Copy Project" function might satisfy OPs need.The API call above does not fit my use case.@caleb15 commented on GitHub (Mar 6, 2020):
@cuu508 thanks, that works great :)
@caleb15 commented on GitHub (Mar 9, 2020):
I improved the script so it won't add duplicate healthchecks:
It's possible to further improve the script to update the healthcheck if already present using
check["update_url"]I also made a quick script for renaming the healthchecks in bulk:
@caleb15 commented on GitHub (Mar 15, 2020):
Another possibility is to use https://github.com/kristofferahl/terraform-provider-healthchecksio to describe the healthchecks as code. One could write a terraform module with the desired healthchecks, and then call that for each environment, passing in a different API key each time.
@caleb15 commented on GitHub (Aug 26, 2020):
No longer needed now that we are using https://gist.github.com/caleb15/1a817ef5e58e8a8caf65190cff33806e - closing