* fixed token and user, get repositories from workspaces too
* tidied go.mod and go.sum
* don't look up workspaces if token is empty
* add token_file to bitbucket
* adjusted conf.example.yml
* implemented mirror using gickup and not giteas mirror function
* added "mirror" to gogs
* push to gogs
* mirror is now a struct
* move deprecation notice, no need to spam
* added possibility to add date to path
* adds zip functionality
* added keep parameter
* cleanup
* keep parameter creates files with the timestamp in repo name directory
* fixed clone with keep without structured=true
* remove search
* added any module
* update dependencies
* clone local repos too
* fixed the separator and adjusted example config and README.md
* go mod tidy
* ran gofumpt and goimports
* cleaned up a bit and implemented timeformat as environment variable
* feat: add heartbeat metrics
* feat: Support multiple heartbeat URLs
#100 introduced heartbeat support but only supported one URL. This PR was closed, however I've re-introduced this feature and added support for multiple heartbeat URLs as discussed in the #100 discussion.
This also resolves #108 which is a feature request for the heartbeat feature.
* fix: When sending the heartbeat fails, log an error but don't crash the program
This prevents problems with external services from causing the program to quit.
Co-authored-by: Matthew Toohey <contact@mtoohey.com>
Co-authored-by: Jordan Crawford <>
* WIP: Adds InfluxDB2 metrics
* Adds basic Prometheus metrics
It's much easier to implement so I'm switching to focusing on it for
now.
* Add some more counters and gauges
Use some labeled counters for backup destinations
* Extract methods for local repo clone and update
It was a little difficult to understand what was going where, esp. with
Go's verbose logging, so I extracted methods where appropriate. This
should also ease some testing concerns down the road.
* Fixes missing y in yaml
* Refactor next run logging
* Add run start and end log messaging
* Adds prom histogram for job duration
* Adds a prom gauge for number of repos discovered
* Switch prom job duration to a summary
I'm really not sure if it should be a summary or a histogram, but
reading about both, it seems like it would be more valuable with
quantiles and not buckets, so summary it is.
* Drop InfluxDB integration for now
We can revert this if we decide to implement InfluxDB after all.
@cooperspencer prefers Prometheus and frankly it's a lot easier to set
up so I'll use it, too, since I already have it running in my
environment anyways!