diff options
author | Ole Troan <ot@cisco.com> | 2018-10-02 22:00:29 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-02 21:26:28 +0000 |
commit | bf49590c07162be44b21d0e0440e7fb96b2746d5 (patch) | |
tree | 06ba921f8f1540adc096459f30772770811c6a0c /src/vpp-api/client | |
parent | 94495f2a6a68ac2202b7715ce09620f1ba6fe673 (diff) |
Stats: vpp_prometheus_export fixes.
- Crash on /sys/nodes if per-node-counters off
- Require patterns parameters.
Change-Id: If4fddefb17504a92ba462c7af91e373601b66a5c
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/client')
-rw-r--r-- | src/vpp-api/client/stat_client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c index b5aab74de8a..a539fbaa4e6 100644 --- a/src/vpp-api/client/stat_client.c +++ b/src/vpp-api/client/stat_client.c @@ -177,6 +177,8 @@ copy_data (stat_segment_directory_entry_t * ep) break; case STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE: + if (ep->offset == 0) + return result; simple_c = stat_segment_pointer (sm->shared_header, ep->offset); result.simple_counter_vec = vec_dup (simple_c); offset_vector = @@ -190,6 +192,8 @@ copy_data (stat_segment_directory_entry_t * ep) break; case STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED: + if (ep->offset == 0) + return result; combined_c = stat_segment_pointer (sm->shared_header, ep->offset); result.combined_counter_vec = vec_dup (combined_c); offset_vector = |