aboutsummaryrefslogtreecommitdiff
path: root/longboat
diff options
context:
space:
mode:
authorNat Lasseter <nat.lasseter@york.ac.uk>2020-03-03 14:25:32 +0000
committerNat Lasseter <nat.lasseter@york.ac.uk>2020-03-03 14:25:32 +0000
commitab6e28417a9195fe03b8355a808a81276d0435ff (patch)
tree3bf903f2dea07ac27b7de2168e76182ce0974a0c /longboat
parent220ebc31c057bbf47eec1cccbbae8b3cf2190d24 (diff)
Added command line config
Diffstat (limited to 'longboat')
-rwxr-xr-xlongboat13
1 files changed, 8 insertions, 5 deletions
diff --git a/longboat b/longboat
index a2d1de5..00e4ce5 100755
--- a/longboat
+++ b/longboat
@@ -3,11 +3,14 @@ $LOAD_PATH << './lib'
require 'longboat'
-collector = Longboat::Collector.new
+# Handle command line options
+config = Longboat::Config.parse!
-jobs = Longboat::Jobs.new
-jobs.load(collector)
+# Start collection
+collector = Longboat::Collector.new
+jobs = Longboat::Jobs.new(collector, config)
+jobs.load!
t = jobs.collect_every
-require 'longboat/server'
-Longboat::Server.serve!(collector)
+# Serve metrics on HTTP
+Longboat::Server.serve!(collector, config)