diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2020-08-05 17:31:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-05 17:31:33 +0300 |
commit | 8c093a84b1fdec838313af4a60fc90ff084d2e54 (patch) | |
tree | da68213dd02574a1b534d9af4570c3f62634a8d3 /database | |
parent | 19aac83f4579a5340faff9a3e50783bc11fdfb2f (diff) |
Hide archived chart from mdstat collector. (#9667)
* Hide archived chart from mdstat collector.
* Fix dimension lookups.
Diffstat (limited to 'database')
-rw-r--r-- | database/rrd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/database/rrd.h b/database/rrd.h index 51f71f25b3..405dec3b62 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -965,6 +965,14 @@ extern void rrdset_update_heterogeneous_flag(RRDSET *st); extern RRDSET *rrdset_find(RRDHOST *host, const char *id); #define rrdset_find_localhost(id) rrdset_find(localhost, id) +/* This will not return charts that are archived */ +static inline RRDSET *rrdset_find_active_localhost(const char *id) +{ + RRDSET *st = rrdset_find_localhost(id); + if (unlikely(st && rrdset_flag_check(st, RRDSET_FLAG_ARCHIVED))) + return NULL; + return st; +} extern RRDSET *rrdset_find_bytype(RRDHOST *host, const char *type, const char *id); #define rrdset_find_bytype_localhost(type, id) rrdset_find_bytype(localhost, type, id) |