-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces a feature to trigger multiple mtr-jobs. One goal is to keep the existing user interface intact while providing the new feature. Added flag: -label <job-label> In order to distinguish multiple running jobs in the resulting Prometheus /metrics response, each job needs a distinct label. Added flag: -jobs <path-to-jobs-file> To define multiple MTR jobs, the concep of a "jobs file" is introduced. It contains, per line, the label for the job (equivalent for -label), the schedule upon which the job is launched (equivalent to -schedule) and the flags for `mtr`. Added flag: -watch-jobs <schedule> The -watch-jobs flag makes `mtr-exporter` to reparse the file given via the -jobs flag at the defined schedule. When change is detected, all previous jobs are stopped and the new jobs are put into effect. If no changes are detected, nothing happens. Note: No INOTIFY or other similar mechanic are used as of now to keep cross-platform nature of `mtr-exporter` in place without introducing new dependencies, build-changes etc.
- Loading branch information
Showing
25 changed files
with
1,244 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= | ||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= | ||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= |
Oops, something went wrong.