From cf656734f3901f52fccd0f6991f95e582f3cf7b9 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 29 Apr 2024 09:36:21 +1000 Subject: [PATCH] pcp-dstat: stop using a nested derived metric in time plugins Recent libpcp changes in derived metrics verifications have meant the pcp-dstat kludge using event.missed as time metric expression no longer functions. A simpler approach there is to use constant expressions rather than a metric name, and this workaround solves the problem. --- src/pcp/dstat/pcp-dstat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcp/dstat/pcp-dstat.py b/src/pcp/dstat/pcp-dstat.py index 9ed9a8ca1d..fab131a4a2 100755 --- a/src/pcp/dstat/pcp-dstat.py +++ b/src/pcp/dstat/pcp-dstat.py @@ -647,7 +647,7 @@ def prepare_metrics(self, config): index = self.timeplugins.index(section) plugin = self.timelist[index] name = 'dstat.' + section + '.' + plugin.name # metric name - value = 'event.missed' # a valid metric that always exists + value = '0' # constant expression, always valid as a metric lib.parse_new_verbose_metric(metrics, name, name) lib.parse_verbose_metric_info(metrics, name, 'formula', value) lib.parse_verbose_metric_info(metrics, name, 'label', section)