From eff2511918ca825721d07faa385f41859a70b24b Mon Sep 17 00:00:00 2001 From: ArnoStiefvater Date: Mon, 14 Jun 2021 16:29:54 +0200 Subject: [PATCH 1/2] Fix gvmcg titles Use `.*` instead of `*`. `*` matches 0 or more. `.*` matches 0 or more of any char. --- ospd/command/command.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ospd/command/command.py b/ospd/command/command.py index e7ac56a5..8b4c7e0e 100644 --- a/ospd/command/command.py +++ b/ospd/command/command.py @@ -162,21 +162,21 @@ def handle_xml(self, xml: Element) -> bytes: GVMCG_TITLES = [ - 'cpu-*', + 'cpu-.*', 'proc', 'mem', 'swap', 'load', - 'df-*', + 'df-.*', 'disk-sd[a-z][0-9]-rw', 'disk-sd[a-z][0-9]-load', 'disk-sd[a-z][0-9]-io-load', - 'interface-eth*-traffic', - 'interface-eth*-err-rate', - 'interface-eth*-err', - 'sensors-*_temperature-*', - 'sensors-*_fanspeed-*', - 'sensors-*_voltage-*', + 'interface-eth.*-traffic', + 'interface-eth.*-err-rate', + 'interface-eth.*-err', + 'sensors-.*_temperature-.*', + 'sensors-.*_fanspeed-.*', + 'sensors-.*_voltage-.*', 'titles', ] # type: List[str] From 836ec7d4c4373fe66594a6a47d16836cec050da3 Mon Sep 17 00:00:00 2001 From: ArnoStiefvater Date: Mon, 14 Jun 2021 16:33:16 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f234c64b..1508d88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Do not start all queued scans simultaneously once available memory is enough. [#401](https://github.com/greenbone/ospd/pull/401) - Remove the pid file if there is no process for the pid or the process name does not match. [#405](https://github.com/greenbone/ospd/pull/405) +- Fix regex of gvmcg titles for get_performance command. [#413](https://github.com/greenbone/ospd/pull/413) [Unreleased]: https://github.com/greenbone/ospd/compare/v20.8.2...HEAD