diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2020-07-27 12:44:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 12:44:48 +0300 |
commit | b0d42a5e61e610c2ef5a6c277bd5908c9c75b771 (patch) | |
tree | a7a36c56bc02bad8ebec0d4d8104df51eb40de52 /database | |
parent | c236e9fa607cc12872ac06c07e88e43f69fa803e (diff) |
Stop mdstat collector from looking up archived charts. (#9583)
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 b01cd28a5e..1817966b4b 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -984,6 +984,14 @@ static inline RRDSET *rrdset_find_active_bytype_localhost(const char *type, cons extern RRDSET *rrdset_find_byname(RRDHOST *host, const char *name); #define rrdset_find_byname_localhost(name) rrdset_find_byname(localhost, name) +/* This will not return charts that are archived */ +static inline RRDSET *rrdset_find_active_byname_localhost(const char *name) +{ + RRDSET *st = rrdset_find_byname_localhost(name); + if (unlikely(st && rrdset_flag_check(st, RRDSET_FLAG_ARCHIVED))) + return NULL; + return st; +} extern void rrdset_next_usec_unfiltered(RRDSET *st, usec_t microseconds); extern void rrdset_next_usec(RRDSET *st, usec_t microseconds); |