STATS: Add more hierarchy to counters.
Put error counters under node_index.
/err/<node-name>/<error-name>
E.g:
/err/ip4-lookup/Hash table collisions
/err/ip6-rewrite/Buffer allocation error
Error names are not globally unique, and this allows
for walking all errors for a particular node.
Put interface counters under the directory /if.
E.g. /if/rx
Put system counters under the directory /sys.
E.g. /sys/vector_rate
Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vlib/error.c b/src/vlib/error.c
index 3681182..3ea62e5 100644
--- a/src/vlib/error.c
+++ b/src/vlib/error.c
@@ -208,7 +208,7 @@
for (i = 0; i < n_errors; i++)
{
- error_name = format (0, "/err/%s%c", error_strings[i], 0);
+ error_name = format (0, "/err/%s/%s%c", n->name, error_strings[i], 0);
/* Note: error_name consumed by the following call */
vlib_stats_register_error_index (error_name, n->error_heap_index + i);
}