diff options
author | Dave Barach <dave@barachs.net> | 2016-03-31 15:32:54 -0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-04-12 03:44:46 +0000 |
commit | cbed90c8cbf8449ff8ed6da08ec248f1e49a374d (patch) | |
tree | 6f4934bf50a7e5fe3a4d9c53300e0cdd1804e54a /gmod | |
parent | ecec279029a8a507483bc54ace3dca7f623f3fb7 (diff) |
Add a configurable "significant error" metric
Change-Id: Idda59272a029ffcbc029f9bb167508d7bd5e6e21
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'gmod')
-rw-r--r-- | gmod/gmod/mod_vpp.c | 16 | ||||
-rw-r--r-- | gmod/gmod/vpp.conf | 7 |
2 files changed, 21 insertions, 2 deletions
diff --git a/gmod/gmod/mod_vpp.c b/gmod/gmod/mod_vpp.c index c28f1a51c59..4a82ca70f13 100644 --- a/gmod/gmod/mod_vpp.c +++ b/gmod/gmod/mod_vpp.c @@ -70,7 +70,7 @@ static g_val_t vpp_metric_handler (int metric_index) { g_val_t val; pid_t *vpp_pidp; - f64 *vector_ratep, *vpp_rx_ratep; + f64 *vector_ratep, *vpp_rx_ratep, *sig_error_ratep; switch (metric_index) { case 0: @@ -108,6 +108,16 @@ static g_val_t vpp_metric_handler (int metric_index) val.d = 0.0; break; + case 3: + sig_error_ratep = svmdb_local_get_vec_variable + (svmdb_client, "vpp_sig_error_rate", sizeof (*vector_ratep)); + if (sig_error_ratep) { + val.d = *sig_error_ratep; + vec_free (sig_error_ratep); + } else + val.d = 0.0; + break; + default: val.d = 0.0; } @@ -125,6 +135,10 @@ static Ganglia_25metric vpp_metric_info[] = {0, "Input_Rate", 100, GANGLIA_VALUE_DOUBLE, "5 sec RX rate", "both", "%.1f", UDP_HEADER_SIZE+8, "VPP Aggregate RX Rate"}, + {0, "Sig_Error_Rate", 100, GANGLIA_VALUE_DOUBLE, + "5 sec significant error rate", + "both", "%.1f", + UDP_HEADER_SIZE+8, "VPP Significant Error Rate"}, {0, NULL} }; diff --git a/gmod/gmod/vpp.conf b/gmod/gmod/vpp.conf index 6df20ed1dac..353a8ab0244 100644 --- a/gmod/gmod/vpp.conf +++ b/gmod/gmod/vpp.conf @@ -21,6 +21,11 @@ collection_group { metric { name = "Input_Rate" value_threshold = 10000.0 - title = "VPP Aggregate RX rate" + title = "VPP Aggregate RX Rate" + } + metric { + name = "Sig_Error_Rate" + value_threshold = 10.0 + title = "VPP Significant Error Rate" } } |