diff options
author | Olivier Roques <oroques+fdio@cisco.com> | 2020-11-02 08:46:23 +0000 |
---|---|---|
committer | Olivier Roques <oroques+fdio@cisco.com> | 2020-11-02 08:52:42 +0000 |
commit | 76fe994ebedfe58e75771fedfadfd0ea92dffe5d (patch) | |
tree | 300ec95222adc99e4855edd0ee838e6a29d5ae2e /telemetry/vpp-collectd | |
parent | aeac50d248f1f734e5faae90d4695b4dfe70703a (diff) |
[HICN-650] Fix an issue with VPP collectd plugin
We need to init a heap size before being able to retrieve statistics
from VPP. This patch also removes an unused stats pattern.
Signed-off-by: Olivier Roques <oroques+fdio@cisco.com>
Change-Id: Ibf9abb3adfd5eeef8a58c639fe3602cefb6f9ce0
Diffstat (limited to 'telemetry/vpp-collectd')
-rw-r--r-- | telemetry/vpp-collectd/vpp/vpp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/telemetry/vpp-collectd/vpp/vpp.c b/telemetry/vpp-collectd/vpp/vpp.c index 679f8feb4..36a8da86e 100644 --- a/telemetry/vpp-collectd/vpp/vpp.c +++ b/telemetry/vpp-collectd/vpp/vpp.c @@ -274,6 +274,9 @@ static int vpp_config(const char *key, const char *value) { * This function is called once upon startup to initialize the plugin. */ static int vpp_init(void) { + /* Create a heap of 64MB */ + clib_mem_init(0, 64ULL << 20); + u8 *stat_segment_name = (u8 *)STAT_SEGMENT_SOCKET_FILE; int ret = stat_segment_connect((char *)stat_segment_name); @@ -291,7 +294,6 @@ static int vpp_read(void) { char **interfaces = {0}; vec_add1(patterns, (uint8_t *)"^/if"); - vec_add1(patterns, (uint8_t *)"ip4-input"); uint32_t *dir = stat_segment_ls(patterns); stat_segment_data_t *res = stat_segment_dump(dir); |