diff options
author | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-02 14:58:28 +0000 |
---|---|---|
committer | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-02 14:58:28 +0000 |
commit | 8d34ddd0a30acf59d423bac773ac2d63aafc7044 (patch) | |
tree | b9e814523ff194d0b4304ad07eb461bb5548aa98 /Readme.textile | |
parent | 7b83ef5b7078bdb46f45074b5a2f96a1483e8202 (diff) |
Added readme, tidied some things
Diffstat (limited to 'Readme.textile')
-rw-r--r-- | Readme.textile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Readme.textile b/Readme.textile new file mode 100644 index 0000000..aa4750d --- /dev/null +++ b/Readme.textile @@ -0,0 +1,23 @@ +h1. Longboat + +Longboat is a metric collection system. Intended for Viking, but theoretically generic. + +h2. Jobs + +Longboat will pick up all jobs in the lib/jobs directory. Each job consists of: + +* a file with a snake_case name, such as @my_job.rb@ +* containing a single class with a CamelCase name matching the file name, such as @MyJob@ +* with two methods: +** @initialize@, which takes a single argument of the collector to @report!@ the metrics to +** @run@, no arguments, which triggers a job run and metric report + +@Longboat::Collector#report!@ takes as arguments: + +# The name of the metric +# The value of the metric +# Optionally, as a final hash: +#* @help@: The help string for the metric +#* @type@: The Prometheus type of the metric +#* @labels@: A hash containing the metric labels +#* @timestamp@: The timestamp when the metric was collected, defaults to the time @report!@ was called. |