From 42559152a81780606ab85edfdbbb6a770aaad759 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Sun, 31 May 2020 23:58:38 -0500 Subject: [PATCH] support graphite exporter custom mappings --- .../docker/graphite/graphite_mapping.conf | 138 ++++++++++++++++++ .../designing_workloads/10_named_scenarios.md | 7 +- 2 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 engine-docker/src/main/resources/docker/graphite/graphite_mapping.conf diff --git a/engine-docker/src/main/resources/docker/graphite/graphite_mapping.conf b/engine-docker/src/main/resources/docker/graphite/graphite_mapping.conf new file mode 100644 index 000000000..5579546f1 --- /dev/null +++ b/engine-docker/src/main/resources/docker/graphite/graphite_mapping.conf @@ -0,0 +1,138 @@ +mappings: +#- match: 'nosqlbench\\.workloads\\.(.+?)_(.+?)?_(.+?)\\.(.+?)\\.(.+?)_rate' +# nosqlbench_workloads_ cqliot_default_schema_tries_stddev{instance="172.17.0.2:9108",job="graphite_import"} + +# meter avg rate +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.m(1|5|15).rate' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "m${5}_rate" + type: avg_rate + avg_of: "${5}m" + +# meter mean_rate +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.mean_rate' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "mean_rate" + type: "avg_rate" + avg_of: "run" + +# histogram p0 +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.(min)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "min" + type: "pctile" + pctile: "0" + +# histogram p100 +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.(max)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "max" + type: "pctile" + pctile: "100" + +# histogram pctile +# nosqlbench_workloads_cqliot_default_rampup_phases_servicetime_p50 +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.p(.+)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "p${5}" + type: "pctile" + pctile: $5 + +# histogram +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.(mean|stddev)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: $5 + type: "pctile_stat" + pctile_stat: $5 + +# error counter +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(errorcounts)\.(.+?)\.(count)' + match_type: regex + name: "${4}_${5}" + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + type: "counter" + error: $5 + property: $6 + +# counter +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+?)\.(count)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + type: "counter" + property: $5 + +# gauge +- match: 'nosqlbench\.workloads\.([0-9a-zA-Z]+)_([0-9a-zA-Z]+)?_([^.]+)\.(.+)' + match_type: regex + name: $4 + labels: + workload: $1 + scenario: $2 + step: $3 + appname: "nosqlbench" + usermode: "named_scenario" + property: "gauge" + type: "gauge" +# + +- match: 'nosqlbench\.(.+)' + match_type: regex + name: "nosqlbench_${1}" + labels: + appname: "nosqlbench" + usermode: "testing_metrics_exporter" + usermode: "named_scenario" + diff --git a/engine-docs/src/main/resources/docs-for-nb/designing_workloads/10_named_scenarios.md b/engine-docs/src/main/resources/docs-for-nb/designing_workloads/10_named_scenarios.md index 302029b13..29b417f36 100644 --- a/engine-docs/src/main/resources/docs-for-nb/designing_workloads/10_named_scenarios.md +++ b/engine-docs/src/main/resources/docs-for-nb/designing_workloads/10_named_scenarios.md @@ -231,7 +231,7 @@ follows: - WORKLOAD - The simple name part of the fully qualified workload name. For example, with a workload (yaml path) of foo/bar/baz.yaml, the WORKLOAD name used here would be `baz`. -- SCENARIO - The name of the scenario as provided ot the command line. +- SCENARIO - The name of the scenario as provided on the command line. - STEP - The name of the step in the named scenario. If you used the list or string forms to provide a command template, then the steps are automatically named as a zero-padded number representing the step in the named scenario, starting @@ -243,8 +243,9 @@ explaining why this is a bad idea. :::info -UNDEF is handled before alias expansion above, so it is possible to force activity naming with `alias===UNDEF`. This is -generally recommended, and will inform users if they try to set the alias in an unsafe way. +UNDEF is handled before alias expansion above, so it is possible to force the default activity naming behavior above +with `alias===UNDEF`. This is generally recommended, and will inform users if they try to set the alias in an unsafe +way. :::