Skip to content

Commit

Permalink
pcp-dstat: stop using a nested derived metric in time plugins
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
natoscott committed Apr 28, 2024
1 parent e76c858 commit cf65673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pcp/dstat/pcp-dstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cf65673

Please sign in to comment.