From a388c1840821dd5c48fc624eeb11c051fa973e1b Mon Sep 17 00:00:00 2001 From: Patrick MARIE Date: Sat, 20 Feb 2021 18:39:24 +0100 Subject: [PATCH] Updating documentation. --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2bfe8de..12ee140 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,11 @@ bgutil-rs USAGE: bgutil-rs -FLAGS: - -h, --help Prints help information - -V, --version Prints version information - SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) info Information about a metric + list List metrics with given pattern + read Read a metric contents ``` ### Info @@ -35,14 +33,71 @@ Information about a metric USAGE: bgutil-rs info -FLAGS: - -h, --help Prints help information - -V, --version Prints version information - ARGS: the metric ``` +Example: + +```sh +$ cargo run -- info observability.testaroo.up +observability.testaroo.up {"aggregator": "average", "retention": "11520*60s:720*3600s:730*86400s", "carbon_xfilesfactor": "0.500000"} +``` + +### Read + +```sh +bgutil-rs-read +Read a metric contents + +USAGE: + bgutil-rs read [OPTIONS] + +OPTIONS: + --stage + --time-end + --time-start + +ARGS: + metric to get values +``` + +Example: + +```sh +$ cargo run -- read observability.testaroo.up --stage "11520*60s" --time-start 1613257200 --time-end 1613343600 +1613319120;0.0 +1613319180;0.0 +1613319240;1.0 +1613319300;1.0 +1613319360;1.0 +1613319420;1.0 +1613319480;1.0 +1613319540;1.0 +... +``` + +### List + +```sh +$ cargo run -- list --help +bgutil-rs-list +List metrics with given pattern + +USAGE: + bgutil-rs list + +ARGS: + +``` + +Example: + +```sh +$ cargo run -- list observability.*.up +d observability.testaroo.up +m observability.testaroo.up {"retention": "11520*60s:720*3600s:730*86400s", "aggregator": "average", "carbon_xfilesfactor": "0.500000"} +``` ## Todo @@ -50,4 +105,5 @@ ARGS: - async - human timestamps * command: list + - Enhance pattern matching (with '{}', 'xxx*' or '*xxx'...) * command: clean