* 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!
I strangely experienced a crash while saving this initial that corrupted
my local git index and lost the series of commits that brought me to
this state. This feels cleaner than having the functions floating in
main.go but this is the first substantial Go code I've written in
~5 years and I have no idea what I'm doing!