diff options
Diffstat (limited to '')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 2 | ||||
-rw-r--r-- | collectors/proc.plugin/proc_net_dev.c | 6 | ||||
-rw-r--r-- | collectors/systemd-journal.plugin/systemd-journal.c | 13 |
3 files changed, 13 insertions, 8 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index 68667c785..2e69c7da5 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -1311,7 +1311,7 @@ static inline PARSER_RC pluginsd_clabel_commit(char **words __maybe_unused, size rrdset_flag_set(st, RRDSET_FLAG_METADATA_UPDATE); rrdhost_flag_set(st->rrdhost, RRDHOST_FLAG_METADATA_UPDATE); - + rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED); parser->user.chart_rrdlabels_linked_temporarily = NULL; return PARSER_RC_OK; } diff --git a/collectors/proc.plugin/proc_net_dev.c b/collectors/proc.plugin/proc_net_dev.c index eb2d0e0c0..8539c7725 100644 --- a/collectors/proc.plugin/proc_net_dev.c +++ b/collectors/proc.plugin/proc_net_dev.c @@ -784,13 +784,13 @@ int do_proc_net_dev(int update_every, usec_t dt) { snprintfz(buffer, FILENAME_MAX, path_to_sys_devices_virtual_net, d->name); if (likely(access(buffer, R_OK) == 0)) { d->virtual = 1; - rrdlabels_add(d->chart_labels, "interface_type", "virtual", RRDLABEL_SRC_AUTO|RRDLABEL_FLAG_PERMANENT); + rrdlabels_add(d->chart_labels, "interface_type", "virtual", RRDLABEL_SRC_AUTO); } else { d->virtual = 0; - rrdlabels_add(d->chart_labels, "interface_type", "real", RRDLABEL_SRC_AUTO|RRDLABEL_FLAG_PERMANENT); + rrdlabels_add(d->chart_labels, "interface_type", "real", RRDLABEL_SRC_AUTO); } - rrdlabels_add(d->chart_labels, "device", name, RRDLABEL_SRC_AUTO|RRDLABEL_FLAG_PERMANENT); + rrdlabels_add(d->chart_labels, "device", name, RRDLABEL_SRC_AUTO); if(likely(!d->virtual)) { // set the filename to get the interface speed diff --git a/collectors/systemd-journal.plugin/systemd-journal.c b/collectors/systemd-journal.plugin/systemd-journal.c index c2bd98e7d..877371120 100644 --- a/collectors/systemd-journal.plugin/systemd-journal.c +++ b/collectors/systemd-journal.plugin/systemd-journal.c @@ -647,7 +647,7 @@ static bool netdata_systemd_filtering_by_journal(sd_journal *j, FACETS *facets, size_t failures = 0; size_t filters_added = 0; - SD_JOURNAL_FOREACH_FIELD(j, field) { + SD_JOURNAL_FOREACH_FIELD(j, field) { // for each key bool interesting; if(fqs->data_only) @@ -660,7 +660,7 @@ static bool netdata_systemd_filtering_by_journal(sd_journal *j, FACETS *facets, bool added_this_key = false; size_t added_values = 0; - SD_JOURNAL_FOREACH_UNIQUE(j, data, data_length) { + SD_JOURNAL_FOREACH_UNIQUE(j, data, data_length) { // for each value of the key const char *key, *value; size_t key_length, value_length; @@ -673,19 +673,24 @@ static bool netdata_systemd_filtering_by_journal(sd_journal *j, FACETS *facets, continue; if(added_keys && !added_this_key) { - if(sd_journal_add_conjunction(j) < 0) + if(sd_journal_add_conjunction(j) < 0) // key AND key AND key failures++; added_this_key = true; added_keys++; } else if(added_values) - if(sd_journal_add_disjunction(j) < 0) + if(sd_journal_add_disjunction(j) < 0) // value OR value OR value failures++; if(sd_journal_add_match(j, data, data_length) < 0) failures++; + if(!added_keys) { + added_keys++; + added_this_key = true; + } + added_values++; filters_added++; } |