Compare commits

..

No commits in common. "c10-beta" and "c8" have entirely different histories.
c10-beta ... c8

10 changed files with 251 additions and 105 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
grafana-pcp-5.1.1.tar.gz SOURCES/grafana-pcp-5.1.1.tar.gz
grafana-pcp-vendor-5.1.1-1.tar.xz SOURCES/grafana-pcp-vendor-5.1.1-8.tar.xz
grafana-pcp-webpack-5.1.1-1.tar.gz SOURCES/grafana-pcp-webpack-5.1.1-8.tar.gz

3
.grafana-pcp.metadata Normal file
View File

@ -0,0 +1,3 @@
3b2c6875861e93eade0ab4321a49dfd6c692ca7a SOURCES/grafana-pcp-5.1.1.tar.gz
0da8deb75d3eefa38949925375c8097671174586 SOURCES/grafana-pcp-vendor-5.1.1-8.tar.xz
f09017e8136fae1182ec8df6c76d2bac92733869 SOURCES/grafana-pcp-webpack-5.1.1-8.tar.gz

View File

@ -0,0 +1,197 @@
From e27f6d2954201734d30713a870d279de87fadd2d Mon Sep 17 00:00:00 2001
From: Sam Feifer <sfeifer@redhat.com>
Date: Tue, 2 Jul 2024 12:01:39 -0400
Subject: [PATCH] uwsgi dashboard patch
---
.../pcp-vector-uwsgi-overview.jsonnet | 160 ++++++++++++++++++
src/datasources/vector/plugin.json | 5 +
2 files changed, 165 insertions(+)
create mode 100644 src/datasources/vector/dashboards/pcp-vector-uwsgi-overview.jsonnet
diff --git a/src/datasources/vector/dashboards/pcp-vector-uwsgi-overview.jsonnet b/src/datasources/vector/dashboards/pcp-vector-uwsgi-overview.jsonnet
new file mode 100644
index 0000000..2c9d2a4
--- /dev/null
+++ b/src/datasources/vector/dashboards/pcp-vector-uwsgi-overview.jsonnet
@@ -0,0 +1,160 @@
+local grafana = import 'grafonnet/grafana.libsonnet';
+
+grafana.dashboard.new(
+ 'PCP Vector: UWSGI Overview',
+ tags=['pcp-vector', 'uwsgi'],
+ time_from='now-5m',
+ time_to='now',
+ refresh='5s',
+)
+.addTemplate(
+ grafana.template.datasource(
+ 'datasource',
+ 'performancecopilot-vector-datasource',
+ 'PCP Vector',
+ )
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Total Worker Count',
+ datasource='$datasource',
+ decimals=0,
+ min=0
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_workers', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 0,
+ y: 0,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Pause Worker Count',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_pause_worker_count', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 12,
+ y: 0,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Idle Worker Count',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_idle_worker_count', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 0,
+ y: 8,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Busy Worker Count',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_busy_worker_count', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 12,
+ y: 8,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Harakiri Count',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_harakiri_count', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 0,
+ y: 16,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Total Exceptions',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_exceptions', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 12,
+ y: 16,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Total Workers Acceptions Requests',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_workers_accepting_requests', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 0,
+ y: 24,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Total Requests Served',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.total_requests_served', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 12,
+ y: 24,
+ w: 12,
+ h: 8,
+ }
+)
+.addPanel(
+ grafana.graphPanel.new(
+ 'Average Response Time (msec)',
+ datasource='$datasource',
+ decimals=0,
+ min=0,
+ )
+ .addTargets([
+ { expr: 'uwsgi.summary.avg_response_time_msec', format: 'time_series', legendFormat: '$metric' },
+ ]), gridPos={
+ x: 0,
+ y: 32,
+ w: 12,
+ h: 8,
+ }
+)
\ No newline at end of file
diff --git a/src/datasources/vector/plugin.json b/src/datasources/vector/plugin.json
index a28e3f4..277c8c9 100644
--- a/src/datasources/vector/plugin.json
+++ b/src/datasources/vector/plugin.json
@@ -45,6 +45,11 @@
"type": "dashboard",
"name": "PCP Vector: Microsoft SQL Server",
"path": "dashboards/pcp-vector-mssql-server.json"
+ },
+ {
+ "type": "dashboard",
+ "name": "PCP Vector: UWSGI Overview",
+ "path": "dashboards/pcp-vector-uwsgi-overview.json"
}
]
}
--
2.45.2

View File

@ -26,6 +26,9 @@ go mod vendor
awk '$2 ~ /^v/ && $4 != "indirect" {print "Provides: bundled(golang(" $1 ")) = " substr($2, 2)}' go.mod | \ 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" sed -E 's/=(.*)-(.*)-(.*)/=\1-\2.\3/g' > "../${VENDOR_TAR}.manifest"
# patch in uwsgi dashboard before webpack compilation
patch -p1 --fuzz=0 < ../0002-add-uwsgi-dashboard.patch
# Vendor Node.js dependencies # Vendor Node.js dependencies
patch -p1 --fuzz=0 < ../0001-remove-unused-frontend-crypto.patch patch -p1 --fuzz=0 < ../0001-remove-unused-frontend-crypto.patch
yarn install --frozen-lockfile yarn install --frozen-lockfile

View File

@ -16,20 +16,20 @@ end}
Name: grafana-pcp Name: grafana-pcp
Version: 5.1.1 Version: 5.1.1
Release: 10%{?dist} Release: 9%{?dist}
Summary: Performance Co-Pilot Grafana Plugin Summary: Performance Co-Pilot Grafana Plugin
License: Apache-2.0 License: ASL 2.0
URL: https://github.com/performancecopilot/grafana-pcp URL: https://github.com/performancecopilot/grafana-pcp
Source0: https://github.com/performancecopilot/grafana-pcp/archive/v%{version}/%{name}-%{version}.tar.gz 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}-8.tar.xz
# Note: In case there were no changes to this tarball, the NVR of this tarball # Note: In case there were no changes to this tarball, the NVR of this tarball
# lags behind the NVR of this package. # lags behind the NVR of this package.
%if %{compile_frontend} == 0 %if %{compile_frontend} == 0
# Source2 contains the precompiled frontend and dashboards # Source2 contains the precompiled frontend and dashboards
# Note: In case there were no changes to this tarball, the NVR of this tarball # Note: In case there were no changes to this tarball, the NVR of this tarball
# lags behind the NVR of this package. # lags behind the NVR of this package.
Source2: grafana-pcp-webpack-%{version}-1.tar.gz Source2: grafana-pcp-webpack-%{version}-8.tar.gz
%endif %endif
Source3: create_bundles.sh Source3: create_bundles.sh
Source4: build_frontend.sh Source4: build_frontend.sh
@ -37,31 +37,31 @@ Source5: list_bundled_nodejs_packages.py
Source6: create_bundles_in_container.sh Source6: create_bundles_in_container.sh
Patch1: 0001-remove-unused-frontend-crypto.patch Patch1: 0001-remove-unused-frontend-crypto.patch
Patch2: 0002-add-uwsgi-dashboard.patch
# Intersection of go_arches and nodejs_arches # Intersection of go_arches and nodejs_arches
ExclusiveArch: %{grafanapcp_arches} ExclusiveArch: %{grafanapcp_arches}
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: golang BuildRequires: golang
BuildRequires: go-srpm-macros BuildRequires: go-srpm-macros
%if 0%{?rhel} >= 9
BuildRequires: go-rpm-macros BuildRequires: go-rpm-macros
%endif
%if %{compile_frontend} %if %{compile_frontend}
BuildRequires: make, nodejs >= 1:14, yarnpkg, golang-github-google-jsonnet BuildRequires: make, nodejs >= 1:14, yarnpkg, golang-github-google-jsonnet
%endif %endif
%global plugin_dir %{_sharedstatedir}/grafana/plugins/performancecopilot-pcp-app %global plugin_dir %{_sharedstatedir}/grafana/plugins/performancecopilot-pcp-app
%global install_dir %{_libexecdir}/grafana-pcp %global install_dir %{_datadir}/performancecopilot-pcp-app
# grafana-pcp requires systemd-tmpfiles # grafana-pcp requires systemd-tmpfiles
%{?systemd_requires} %{?systemd_requires}
Requires: grafana >= 9.0.9 Requires: grafana >= 9.0.9
Suggests: pcp >= 5.2.2 Suggests: pcp >= 5.2.2
%if 0%{?rhel} > 9 || 0%{?fedora} > 39
Suggests: valkey
%else
Suggests: redis >= 5.0.0 Suggests: redis >= 5.0.0
%endif
Suggests: bpftrace >= 0.9.2 Suggests: bpftrace >= 0.9.2
# Obsolete old webapps # Obsolete old webapps
@ -135,7 +135,7 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards.
%endif %endif
%patch -P 1 -p1 %patch -P 1 -p1
%patch -P 2 -p1
%build %build
# Build frontend data sources # Build frontend data sources
@ -194,77 +194,36 @@ yarn test
%changelog %changelog
* Tue Jul 2 2024 Joe Orton <jorton@redhat.com> - 5.1.1-10 * Thu Oct 10 2024 Sam Feifer <sfeifer@redhat.com> - 5.1.1-9
- switch Suggests: redis to valkey (RHEL-45646) - Resolves RHEL-61780: CVE-2024-9355
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.1.1-9 * Mon Jul 8 2024 Sam Feifer <sfeifer@redhat.com> - 5.1.1-8
- Bump release for June 2024 mass rebuild - Add a premade uwsgi dashboard for the vector datasource
* Tue Jun 18 2024 Sam Feifer <sfeifer@redhat.com> - 5.1.1-8 * Tue Apr 16 2024 Sam Feifer <sfeifer@redhat.com> 5.1.1-2
- bump release for c10s rebuild - fix CVE-2024-1394
* Sun Feb 11 2024 Maxwell G <maxwell@gtmx.me> - 5.1.1-7 * Thu Apr 20 2023 Stan Cox <scox@redhat.com> 5.1.1-1
- Rebuild for golang 1.22.0
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Sep 13 2023 Sam Feifer <sfeifer@redhat.com> 5.1.1-4
- Move location of plugin from /usr/share/... to /usr/libexec/... because there is a binary executable
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Oct 27 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 5.1.1-1
- update to 5.1.1 tagged upstream community sources, see CHANGELOG - update to 5.1.1 tagged upstream community sources, see CHANGELOG
- resolve CVE-2022-27664 golang: net/http: handle server errors after sending GOAWAY
* Mon Sep 19 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 5.0.0-4 * Tue Nov 01 2022 Stan Cox <scox@redhat.com> 3.2.0-3
- install plugin in /usr/share and create symlink from /var using - resolve CVE-2022-27664 grafana-pcp: golang: net/http: handle server errors after sending GOAWAY
systemd-tmpfiles to work on rpm-ostree based distributions
- drop makefile in favor of create_bundles.sh script
- replace plugin id patch with sed to catch future usages of the new
upstream plugin ids
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-3 * Wed Aug 10 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - resolve CVE-2022-1705 golang: net/http: improper sanitization of Transfer-Encoding header
- resolve CVE-2022-32148 golang: net/http/httputil: NewSingleHostReverseProxy - omit X-Forwarded-For not working
* Fri Jul 08 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 5.0.0-2 - resolve CVE-2022-30631 golang: compress/gzip: stack exhaustion in Reader.Read
- bump required Grafana version to 8.5.6 - resolve CVE-2022-30630 golang: io/fs: stack exhaustion in Glob
- resolve CVE-2022-30632 golang: path/filepath: stack exhaustion in Glob
* Thu Jul 07 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 5.0.0-1 - resolve CVE-2022-30635 golang: encoding/gob: stack exhaustion in Decoder.Decode
- update to 5.0.0 tagged upstream community sources, see CHANGELOG
- reverted the breaking change (change of internal plugin IDs) of upstream v5.0.0,
i.e. there are no breaking changes when performing this upgrade
- enable Go modules in build process
- make vendor and webpack tarballs reproducible
* Sat Jun 18 2022 Robert-André Mauchin <zebob.m@gmail.com> - 3.2.0-3
- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191,
CVE-2022-29526, CVE-2022-30629
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Nov 12 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-1 * Fri Nov 12 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-1
- update to 3.2.0 tagged upstream community sources, see CHANGELOG - update to 3.2.0 tagged upstream community sources, see CHANGELOG
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 25 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.1.0-1 * Fri Jun 25 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.1.0-1
- update to 3.1.0 tagged upstream community sources, see CHANGELOG - update to 3.1.0 tagged upstream community sources, see CHANGELOG
- remove unused cryptographic implementations - remove unused cryptographic implementations
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.0.2-1 * Fri Jan 22 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.0.2-1
- update to 3.0.2 tagged upstream community sources, see CHANGELOG - update to 3.0.2 tagged upstream community sources, see CHANGELOG
@ -275,44 +234,31 @@ yarn test
- update to 3.0.0 tagged upstream community sources, see CHANGELOG - update to 3.0.0 tagged upstream community sources, see CHANGELOG
- bundle golang dependencies and (optionally) node.js dependencies - bundle golang dependencies and (optionally) node.js dependencies
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2 * Fri Aug 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - bpftrace: show process name and PID in flame graphs
* Tue Feb 25 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-1 * Fri Jul 24 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-2
- vector, redis: remove autocompletion cache (PCP metrics can be added and removed dynamically) - vector: do not show all cgroups in the container overview dashboard in case no containers are present on the system
* Thu Feb 20 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.1-1 * Mon May 11 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-1
- support for Grafana 6.6+, drop support for Grafana < 6.6 - update to upstream version 2.0.2, see CHANGELOG
- vector, bpftrace: fix version checks on dashboard load (prevent multiple pmcd.version checks on dashboard load)
- vector, bpftrace: change datasource check box to red if URL is inaccessible
- redis: add tests
- flame graphs: support multidimensional eBPF maps (required to display e.g. the process name)
- dashboards: remove BCC metrics from Vector host overview (because the BCC PMDA is not installed by default)
- misc: update dependencies
- build: fix production build (implement workaround for https://github.com/systemjs/systemjs/issues/2117, https://github.com/grafana/grafana/issues/21785)
* Wed Jan 29 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.7-1 * Tue Jan 28 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-3
- redis: fix timespec (fixes empty graphs for large time ranges) - redis: pass correct timespec to pmproxy (fixes empty graphs for large time ranges)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.6-2 * Tue Jan 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jan 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.6-1
- redis: support wildcards in metric names - redis: support wildcards in metric names
- redis: fix label support - redis: fix legend and label support
- redis: fix legends
- redis: set default sample interval to 60s (fixes empty graph borders)
- build: upgrade copy-webpack-plugin to mitigate XSS vulnerability in the serialize-javascript transitive dependency
- build: remove deprecated uglify-webpack-plugin
* Thu Dec 12 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.4-2 * Mon Dec 16 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-1
- remove node_modules/node-notifier directory from webpack (due to licensing issues) - upgrade to upstream 1.0.5
* Wed Dec 11 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.4-1
- flame graphs: clean flame graph stacks every 5s (reduces CPU load) - flame graphs: clean flame graph stacks every 5s (reduces CPU load)
- general: implement PCP version checks - general: implement PCP version checks
- build: remove weak dependency (doesn't work with Node.js 12) - redis: set default sample interval to 60s (fixes empty graph borders)
- build: upgrade terser-webpack-plugin to mitigate XSS vulnerability in the serialize-javascript transitive dependency
* Mon Dec 16 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.3-2
- remove node_modules/node-notifier directory from webpack (due to licensing issues)
- upgrade copy-webpack-plugin, terser-webpack-plugin and remove uglifyjs-webpack-plugin to mitigate XSS vulnerability in serialize-javascript dependency
* Tue Nov 26 2019 Nathan Scott <nathans@redhat.com> 1.0.3-1 * Tue Nov 26 2019 Nathan Scott <nathans@redhat.com> 1.0.3-1
- fix flame graph dependency (flamegraph.destroy error in javascript console) - fix flame graph dependency (flamegraph.destroy error in javascript console)

View File

@ -1,3 +0,0 @@
SHA512 (grafana-pcp-5.1.1.tar.gz) = 697dfbe1e5cd5d66080197dab2798af0965747a4460d15e62c3497f64674bcc77fc776ac5c95cb7043dcf534e8e0eae47afd7500a5851a0d35ad1062e8d4ac2e
SHA512 (grafana-pcp-vendor-5.1.1-1.tar.xz) = 8a10a72ef9dd3622d02f7418c98b8e34eb1c978bfac9c0e29bd3099a1c1fc80b61375d6947d29a85256614ce4e01021af38a8d0f4f735daf594e6789169a32bf
SHA512 (grafana-pcp-webpack-5.1.1-1.tar.gz) = 0c71a9c1fc87a58273a5b4d06c0482e2e059bd9aee1dfb200f5a1e8c52f82af1394bdccfbf5c25d20b021e58db7c2185d0c14f85d77f00a51926f80dfa0dade5