From 2d9e6a63f04ebc3f994dcb38da910439a8b6b0e5 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 4 Dec 2024 09:41:22 +0300 Subject: [PATCH] import grafana-pcp-5.2.2-2.el10 --- .gitignore | 4 +- .grafana-pcp.metadata | 4 +- .../0002-remove-faulty-metric-tables.patch | 49 +++++++++++++++++++ SOURCES/create_bundles.sh | 3 ++ SPECS/grafana-pcp.spec | 13 +++-- 5 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 SOURCES/0002-remove-faulty-metric-tables.patch diff --git a/.gitignore b/.gitignore index d8d040f..380a15d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ SOURCES/grafana-pcp-5.2.2.tar.gz -SOURCES/grafana-pcp-vendor-5.2.2-1.tar.xz -SOURCES/grafana-pcp-webpack-5.2.2-1.tar.gz +SOURCES/grafana-pcp-vendor-5.2.2-2.tar.xz +SOURCES/grafana-pcp-webpack-5.2.2-2.tar.gz diff --git a/.grafana-pcp.metadata b/.grafana-pcp.metadata index 423e05a..347772c 100644 --- a/.grafana-pcp.metadata +++ b/.grafana-pcp.metadata @@ -1,3 +1,3 @@ 56170911f29a83a47b4f404f473dc7884c8310b5 SOURCES/grafana-pcp-5.2.2.tar.gz -c16f7729d850844416ebae116d66d1cf5f43ca20 SOURCES/grafana-pcp-vendor-5.2.2-1.tar.xz -f54bd006bbaf016954d69c6d23e8aa6a01792d27 SOURCES/grafana-pcp-webpack-5.2.2-1.tar.gz +8e94b68de6694410fe13dc58b291a9f184df2cbd SOURCES/grafana-pcp-vendor-5.2.2-2.tar.xz +f2529081227b5542900213fd47a2f75bbfb89f09 SOURCES/grafana-pcp-webpack-5.2.2-2.tar.gz diff --git a/SOURCES/0002-remove-faulty-metric-tables.patch b/SOURCES/0002-remove-faulty-metric-tables.patch new file mode 100644 index 0000000..942afe0 --- /dev/null +++ b/SOURCES/0002-remove-faulty-metric-tables.patch @@ -0,0 +1,49 @@ +diff --git a/src/datasources/vector/dashboards/pcp-vector-top-consumers.jsonnet b/src/datasources/vector/dashboards/pcp-vector-top-consumers.jsonnet +index cef1a0e..c9f9f5d 100644 +--- a/src/datasources/vector/dashboards/pcp-vector-top-consumers.jsonnet ++++ b/src/datasources/vector/dashboards/pcp-vector-top-consumers.jsonnet +@@ -18,7 +18,7 @@ grafana.dashboard.new( + grafana.text.new( + 'Configuration Instructions', + mode='markdown', +- content='This dashboard requires [authentication](https://grafana-pcp.readthedocs.io/en/latest/datasources/authentication.html) to be set up for the PCP Vector datasource. The "Top Network Consumers" table requires the [bcc PMDA](https://man7.org/linux/man-pages/man1/pmdabcc.1.html) to be installed and configured with the netproc module.', ++ content='This dashboard requires [authentication](https://grafana-pcp.readthedocs.io/en/latest/datasources/authentication.html) to be set up for the PCP Vector datasource.', + ), gridPos={ + x: 0, + y: 0, +@@ -55,34 +55,4 @@ grafana.dashboard.new( + w: 12, + h: 8, + } +-) +-.addPanel( +- grafana.tablePanel.new( +- 'Top Disk Consumers', +- datasource='$datasource', +- styles=null, +- ) +- .addTargets([ +- { expr: 'proc.hog.disk', format: 'metrics_table', legendFormat: '$metric' }, +- ]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.disk'}]}}, gridPos={ +- x: 0, +- y: 10, +- w: 12, +- h: 8, +- } +-) +-.addPanel( +- grafana.tablePanel.new( +- 'Top Network Consumers', +- datasource='$datasource', +- styles=null, +- ) +- .addTargets([ +- { expr: 'proc.hog.net', format: 'metrics_table', legendFormat: '$metric' }, +- ]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.net'}]}}, gridPos={ +- x: 12, +- y: 10, +- w: 12, +- h: 8, +- } + ) +\ No newline at end of file diff --git a/SOURCES/create_bundles.sh b/SOURCES/create_bundles.sh index 278046b..983835f 100755 --- a/SOURCES/create_bundles.sh +++ b/SOURCES/create_bundles.sh @@ -26,6 +26,9 @@ go mod vendor awk '$2 ~ /^v/ && $4 != "indirect" {print "Provides: bundled(golang(" $1 ")) = " substr($2, 2)}' go.mod | \ sed -E 's/=(.*)-(.*)-(.*)/=\1-\2.\3/g' > "../${VENDOR_TAR}.manifest" +# patch the top consumers dashboard to remove tables visualizing faulty metrics +patch -p1 --fuzz=0 < ../0002-remove-faulty-metric-tables.patch + # Vendor Node.js dependencies patch -p1 --fuzz=0 < ../0001-remove-unused-frontend-crypto.patch yarn install --frozen-lockfile diff --git a/SPECS/grafana-pcp.spec b/SPECS/grafana-pcp.spec index f8927cd..3e3765a 100644 --- a/SPECS/grafana-pcp.spec +++ b/SPECS/grafana-pcp.spec @@ -16,20 +16,20 @@ end} Name: grafana-pcp Version: 5.2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Performance Co-Pilot Grafana Plugin License: Apache-2.0 URL: https://github.com/performancecopilot/grafana-pcp Source0: https://github.com/performancecopilot/grafana-pcp/archive/v%{version}/%{name}-%{version}.tar.gz -Source1: grafana-pcp-vendor-%{version}-1.tar.xz +Source1: grafana-pcp-vendor-%{version}-2.tar.xz # Note: In case there were no changes to this tarball, the NVR of this tarball # lags behind the NVR of this package. %if %{compile_frontend} == 0 # Source2 contains the precompiled frontend and dashboards # Note: In case there were no changes to this tarball, the NVR of this tarball # lags behind the NVR of this package. -Source2: grafana-pcp-webpack-%{version}-1.tar.gz +Source2: grafana-pcp-webpack-%{version}-2.tar.gz %endif Source3: create_bundles.sh Source4: build_frontend.sh @@ -37,6 +37,7 @@ Source5: list_bundled_nodejs_packages.py Source6: create_bundles_in_container.sh Patch1: 0001-remove-unused-frontend-crypto.patch +Patch2: 0002-remove-faulty-metric-tables.patch # Intersection of go_arches and nodejs_arches ExclusiveArch: %{grafanapcp_arches} @@ -134,7 +135,8 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards. %setup -q -T -D -b 2 %endif -%patch -P1 -p1 +%patch -P 1 -p1 +%patch -P 2 -p1 %build @@ -194,6 +196,9 @@ yarn test %changelog +* Tue Dec 3 2024 Sam Feifer - 5.2.2-2 +- Remove visualizations for proc.hog.net and proc.hog.disk while they do not work via pmproxy + * Tue Nov 26 2024 Sam Feifer - 5.2.2-1 - Resolves RHEL-67043: update to 5.2.2 tagged upstream community sources, see CHANGELOG