Skip to content

Commit

Permalink
build: add uwsgi PMDA into the build and rpm packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
natoscott committed Apr 2, 2024
1 parent 30b090f commit 4223781
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 6 deletions.
29 changes: 27 additions & 2 deletions build/rpm/pcp.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ Requires: pcp-pmda-hacluster pcp-pmda-sockets pcp-pmda-podman
%if "@have_python@" == "true"
Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic
Requires: pcp-pmda-haproxy pcp-pmda-nfsclient pcp-pmda-lmsensors
Requires: pcp-pmda-netcheck pcp-pmda-rabbitmq pcp-pmda-openvswitch

This comment has been minimized.

Copy link
@SanketE

SanketE Apr 9, 2024

dw, just checking out

Requires: pcp-pmda-netcheck pcp-pmda-rabbitmq pcp-pmda-uwsgi
Requires: pcp-pmda-openvswitch
%endif
%if "@pmda_statsd@" == "true"
Requires: pcp-pmda-statsd
Expand Down Expand Up @@ -1821,6 +1822,24 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting metrics about RabbitMQ message queues.
#end pcp-pmda-rabbitmq

#
# pcp-pmda-uwsgi
#
%package pmda-uwsgi
License: GPL-2.0-or-later
Summary: Performance Co-Pilot (PCP) metrics for uWSGI servers
URL: https://pcp.io
Requires: pcp = @package_version@ pcp-libs = @package_version@
%if "@enable_python3@" == "true"
Requires: python3-pcp
%else
Requires: %{__python2}-pcp
%endif
%description pmda-uwsgi
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting metrics from uWSGI servers.
#end pcp-pmda-uwsgi

%endif

%if "@pmda_libvirt@" == "true"
Expand Down Expand Up @@ -2476,6 +2495,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/summary(/|$)' >pcp-pmda-summary-files
basic_manifest | keep '(etc/pcp|pmdas)/systemd(/|$)' >pcp-pmda-systemd-files
basic_manifest | keep '(etc/pcp|pmdas)/trace(/|$)' >pcp-pmda-trace-files
basic_manifest | keep '(etc/pcp|pmdas)/unbound(/|$)' >pcp-pmda-unbound-files
basic_manifest | keep '(etc/pcp|pmdas)/uwsgi(/|$)' >pcp-pmda-uwsgi-files
basic_manifest | keep '(etc/pcp|pmdas)/weblog(/|$)' >pcp-pmda-weblog-files
basic_manifest | keep '(etc/pcp|pmdas)/zimbra(/|$)' >pcp-pmda-zimbra-files
basic_manifest | keep '(etc/pcp|pmdas)/zswap(/|$)' >pcp-pmda-zswap-files
Expand All @@ -2501,7 +2521,7 @@ for pmda_package in \
rabbitmq redis resctrl roomtemp rsyslog \
samba sendmail shping slurm smart snmp \
sockets statsd summary systemd \
unbound \
unbound uwsgi \
trace \
weblog \
zimbra zswap ; \
Expand Down Expand Up @@ -2912,6 +2932,9 @@ done

%preun pmda-rabbitmq
%{pmda_remove "$1" "rabbitmq"}

%preun pmda-uwsgi
%{pmda_remove "$1" "uwsgi"}
%endif

%preun pmda-apache
Expand Down Expand Up @@ -3225,6 +3248,8 @@ fi

%files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm

%files pmda-uwsgi -f pcp-pmda-uwsgi-files.rpm

%files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm

%files export-pcp2json -f pcp-export-pcp2json-files.rpm
Expand Down
28 changes: 26 additions & 2 deletions build/rpm/redhat.spec
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ Requires: pcp-pmda-bpftrace
%if !%{disable_python2} || !%{disable_python3}
Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic
Requires: pcp-pmda-libvirt pcp-pmda-lio pcp-pmda-openmetrics pcp-pmda-haproxy
Requires: pcp-pmda-lmsensors pcp-pmda-netcheck pcp-pmda-rabbitmq
Requires: pcp-pmda-lmsensors pcp-pmda-netcheck pcp-pmda-rabbitmq pcp-pmda-uwsgi
Requires: pcp-pmda-openvswitch
%endif
%if !%{disable_mongodb}
Expand Down Expand Up @@ -1791,6 +1791,24 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting metrics about RabbitMQ message queues.
#end pcp-pmda-rabbitmq

#
# pcp-pmda-uwsgi
#
%package pmda-uwsgi
License: GPL-2.0-or-later
Summary: Performance Co-Pilot (PCP) metrics from uWSGI servers
URL: https://pcp.io
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
%if !%{disable_python3}
Requires: python3-pcp
%else
Requires: %{__python2}-pcp
%endif
%description pmda-uwsgi
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting metrics from uWSGI servers.
#end pcp-pmda-uwsgi

#
# pcp-pmda-lio
#
Expand Down Expand Up @@ -2650,6 +2668,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/summary(/|$)' >pcp-pmda-summary-files
basic_manifest | keep '(etc/pcp|pmdas)/systemd(/|$)' >pcp-pmda-systemd-files
basic_manifest | keep '(etc/pcp|pmdas)/trace(/|$)' >pcp-pmda-trace-files
basic_manifest | keep '(etc/pcp|pmdas)/unbound(/|$)' >pcp-pmda-unbound-files
basic_manifest | keep '(etc/pcp|pmdas)/uwsgi(/|$)' >pcp-pmda-uwsgi-files
basic_manifest | keep '(etc/pcp|pmdas)/weblog(/|$)' >pcp-pmda-weblog-files
basic_manifest | keep '(etc/pcp|pmdas)/zimbra(/|$)' >pcp-pmda-zimbra-files
basic_manifest | keep '(etc/pcp|pmdas)/zswap(/|$)' >pcp-pmda-zswap-files
Expand All @@ -2675,7 +2694,7 @@ for pmda_package in \
rabbitmq redis resctrl roomtemp rpm rsyslog \
samba sendmail shping slurm smart snmp \
sockets statsd summary systemd \
unbound \
unbound uwsgi \
trace \
weblog \
zimbra zswap ; \
Expand Down Expand Up @@ -2904,6 +2923,9 @@ exit 0
%preun pmda-rabbitmq
%{pmda_remove "$1" "rabbitmq"}

%preun pmda-uwsgi
%{pmda_remove "$1" "uwsgi"}

%if !%{disable_snmp}
%preun pmda-snmp
%{pmda_remove "$1" "snmp"}
Expand Down Expand Up @@ -3379,6 +3401,8 @@ fi

%files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm

%files pmda-uwsgi -f pcp-pmda-uwsgi-files.rpm

%files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm

%files export-pcp2json -f pcp-export-pcp2json-files.rpm
Expand Down
2 changes: 1 addition & 1 deletion src/pmdas/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PLPMDAS = bonding netfilter zimbra postgresql \
PYPMDAS = bcc gluster zswap unbound mic haproxy \
json libvirt lio openmetrics elasticsearch \
bpftrace mssql netcheck rabbitmq openvswitch \
nfsclient mongodb
nfsclient mongodb uwsgi

SUBDIRS = $(CPMDAS) $(PLPMDAS) $(PYPMDAS)
LDIRT = pmcd.conf
Expand Down
2 changes: 1 addition & 1 deletion src/pmdas/uwsgi/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ default_pcp default: build-me

include $(BUILDRULES)

ifeq "$(PMDA_UWSGI)" "true"
ifeq "$(HAVE_PYTHON)" "true"
build-me: check_domain
install_pcp install: default
$(INSTALL) -m 755 -d $(PMDAADMDIR)
Expand Down

0 comments on commit 4223781

Please sign in to comment.