diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2022-10-10 12:44:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 12:44:01 +0300 |
commit | bff1a5c8eabcca1bb4e910704b4b904cceb93a78 (patch) | |
tree | cea87854f5a2e1a5d2f7f7419ec5d7f113d529ae /database/rrdset.c | |
parent | bfe86dcb3c0b9af57c5e0d9c7d45eaa6c2d882eb (diff) |
Initialize st->rrdvars from rrdset insert callback (#13786)
* init st->rrdvars from rrdset callback
* also init rrdfamily and rrdimvar from rrdset
* remove empty line
Diffstat (limited to 'database/rrdset.c')
-rw-r--r-- | database/rrdset.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/database/rrdset.c b/database/rrdset.c index 9b04712afb..6fd4089508 100644 --- a/database/rrdset.c +++ b/database/rrdset.c @@ -181,6 +181,12 @@ static void rrdset_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v // chart variables - we need this for data collection to work (collector given chart variables) - not only health rrdsetvar_index_init(st); + if (host->health_enabled) { + st->rrdfamily = rrdfamily_add_and_acquire(host, rrdset_family(st)); + st->rrdvars = rrdvariables_create(); + rrddimvar_index_init(st); + } + st->rrdlabels = rrdlabels_create(); rrdset_update_permanent_labels(st); |