From 1fd9771e9178f119cddc1e0b68e6dac42dff39b2 Mon Sep 17 00:00:00 2001 From: Patrick Stadler Date: Sun, 22 Mar 2015 13:22:41 +0100 Subject: [PATCH] load custom reporters. update README --- .gitignore | 2 + README.md | 4 +- init.d/metrics.sh | 7 +-- lib/main.sh | 91 ++++++++++++++++++++++----------------- lib/utils/loader.sh | 54 ++++++++++++++++++++--- metrics/custom/.gitkeep | 0 reporters/custom/.gitkeep | 0 7 files changed, 108 insertions(+), 50 deletions(-) create mode 100644 .gitignore create mode 100644 metrics/custom/.gitkeep create mode 100644 reporters/custom/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b27d8d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/metrics/custom/*.sh +/reporters/custom/*.sh \ No newline at end of file diff --git a/README.md b/README.md index 103ea2f..e39faf6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # metrics.sh -metrics.sh is a lightweight metrics collection and fowarding utility implemented in portable POSIX compliant shell scripts. A transparent interface based on hooks enables writing custom metric collectors and reporters in an elegant way. +metrics.sh is a lightweight metrics collection and fowarding utility implemented in portable POSIX compliant shell scripts. A transparent interface based on hooks enables writing custom collectors and reporters in an elegant way. ## Usage @@ -28,7 +28,7 @@ $ git clone git@github.com:pstadler/metrics.sh.git ### Requirements -metrics.sh has been tested on Ubuntu 14.04 and Mac OS X but is supposed to run on most *NIX-like operating systems. Some of the provided metrics require [procfs](http://en.wikipedia.org/wiki/Procfs) to be available. +metrics.sh has been tested on Ubuntu 14.04 and Mac OS X but is supposed to run on most *NIX-like operating systems. Some of the provided metrics require [procfs](http://en.wikipedia.org/wiki/Procfs) to be available when running on *NIX. POSIX compliancy means that metrics.sh works with minimalistic command interpreters such as [dash](http://manpages.ubuntu.com/manpages/trusty/en/man1/dash.1.html). Built-in metrics do **not** require root privileges. ## Metrics diff --git a/init.d/metrics.sh b/init.d/metrics.sh index 1606a1c..ac07194 100644 --- a/init.d/metrics.sh +++ b/init.d/metrics.sh @@ -11,7 +11,8 @@ SCRIPT=