Compare commits

..

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

5 changed files with 244 additions and 69 deletions

4
.gitignore vendored
View File

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

View File

@ -1,3 +1,3 @@
3b2c6875861e93eade0ab4321a49dfd6c692ca7a SOURCES/grafana-pcp-5.1.1.tar.gz
3eabf083226c04c7c5fa031d3b67d060cfc294f7 SOURCES/grafana-pcp-vendor-5.1.1-1.tar.xz
55fa447cbf8ffddc4ba5e50dc81b81e89f0f2fc7 SOURCES/grafana-pcp-webpack-5.1.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 | \
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
patch -p1 --fuzz=0 < ../0001-remove-unused-frontend-crypto.patch
yarn install --frozen-lockfile

View File

@ -16,20 +16,20 @@ end}
Name: grafana-pcp
Version: 5.1.1
Release: 1%{?dist}
Release: 9%{?dist}
Summary: Performance Co-Pilot Grafana Plugin
License: ASL 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}-8.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}-8.tar.gz
%endif
Source3: create_bundles.sh
Source4: build_frontend.sh
@ -37,14 +37,18 @@ Source5: list_bundled_nodejs_packages.py
Source6: create_bundles_in_container.sh
Patch1: 0001-remove-unused-frontend-crypto.patch
Patch2: 0002-add-uwsgi-dashboard.patch
# Intersection of go_arches and nodejs_arches
ExclusiveArch: %{grafanapcp_arches}
BuildRequires: systemd-rpm-macros
BuildRequires: golang
BuildRequires: go-srpm-macros
%if 0%{?rhel} >= 9
BuildRequires: go-rpm-macros
%endif
%if %{compile_frontend}
BuildRequires: make, nodejs >= 1:14, yarnpkg, golang-github-google-jsonnet
@ -130,8 +134,8 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards.
%setup -q -T -D -b 2
%endif
%patch1 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%build
# Build frontend data sources
@ -190,24 +194,22 @@ yarn test
%changelog
* Thu Oct 27 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 5.1.1-1
* Thu Oct 10 2024 Sam Feifer <sfeifer@redhat.com> - 5.1.1-9
- Resolves RHEL-61780: CVE-2024-9355
* Mon Jul 8 2024 Sam Feifer <sfeifer@redhat.com> - 5.1.1-8
- Add a premade uwsgi dashboard for the vector datasource
* Tue Apr 16 2024 Sam Feifer <sfeifer@redhat.com> 5.1.1-2
- fix CVE-2024-1394
* Thu Apr 20 2023 Stan Cox <scox@redhat.com> 5.1.1-1
- 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
- update to 5.0.0 tagged upstream community sources, see CHANGELOG
- install plugin in /usr/share and create symlink from /var using
systemd-tmpfiles to work on rpm-ostree based distributions
- revert 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
- drop makefile in favor of create_bundles.sh script
* Tue Nov 01 2022 Stan Cox <scox@redhat.com> 3.2.0-3
- resolve CVE-2022-27664 grafana-pcp: golang: net/http: handle server errors after sending GOAWAY
* Wed Aug 24 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-3
- bump NVR
* Thu Aug 11 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-2
* Wed Aug 10 2022 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-2
- 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
- resolve CVE-2022-30631 golang: compress/gzip: stack exhaustion in Reader.Read
@ -218,24 +220,10 @@ yarn test
* Fri Nov 12 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-1
- update to 3.2.0 tagged upstream community sources, see CHANGELOG
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.0-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jun 25 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.1.0-1
- update to 3.1.0 tagged upstream community sources, see CHANGELOG
- remove unused cryptographic implementations
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.2-4
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.0.2-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* 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
- update to 3.0.2 tagged upstream community sources, see CHANGELOG
@ -246,44 +234,31 @@ yarn test
- update to 3.0.0 tagged upstream community sources, see CHANGELOG
- bundle golang dependencies and (optionally) node.js dependencies
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Aug 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-3
- bpftrace: show process name and PID in flame graphs
* Tue Feb 25 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-1
- vector, redis: remove autocompletion cache (PCP metrics can be added and removed dynamically)
* Fri Jul 24 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-2
- 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
- support for Grafana 6.6+, drop support for Grafana < 6.6
- 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)
* Mon May 11 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 2.0.2-1
- update to upstream version 2.0.2, see CHANGELOG
* Wed Jan 29 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.7-1
- redis: fix timespec (fixes empty graphs for large time ranges)
* Tue Jan 28 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-3
- 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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jan 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.6-1
* Tue Jan 07 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-2
- redis: support wildcards in metric names
- redis: fix 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
- redis: fix legend and label support
* Thu Dec 12 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.4-2
- remove node_modules/node-notifier directory from webpack (due to licensing issues)
* Wed Dec 11 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.4-1
* Mon Dec 16 2019 Andreas Gerstmayr <agerstmayr@redhat.com> 1.0.5-1
- upgrade to upstream 1.0.5
- flame graphs: clean flame graph stacks every 5s (reduces CPU load)
- general: implement PCP version checks
- build: remove weak dependency (doesn't work with Node.js 12)
- build: upgrade terser-webpack-plugin to mitigate XSS vulnerability in the serialize-javascript transitive dependency
- redis: set default sample interval to 60s (fixes empty graph borders)
* 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
- fix flame graph dependency (flamegraph.destroy error in javascript console)