Skip to content

PCP: PMDA: Introduce new PMDA for RDS #2230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion build/rpm/pcp.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -1598,6 +1598,20 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices.
# end pcp-pmda-rocestat

#
# pcp-pmda-rds
#
%package pmda-rds
License: GPL-2.0-or-later
Summary: Performance Co-Pilot (PCP) metrics for RDS protocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be good to expand RDS the acronym here (like PCP is) in the Summary. (same change needed in redhat.spec below)

URL: https://pcp.io
Requires: pcp = @package_version@ pcp-libs = @package_version@
Requires: python3-pcp
%description pmda-rds
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting statistics for RDS connections
# end pcp-pmda-rds

#
# pcp-pmda-openvswitch
#
Expand Down Expand Up @@ -2268,6 +2282,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/podman(/|$)' >pcp-pmda-podman-files
basic_manifest | keep '(etc/pcp|pmdas)/postfix(/|$)' >pcp-pmda-postfix-files
basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-files
basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files
basic_manifest | keep '(etc/pcp|pmdas)/rds(/|$)' >pcp-pmda-rds-files
basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files
basic_manifest | keep '(etc/pcp|pmdas)/resctrl(/|$)|sys-fs-resctrl' >pcp-pmda-resctrl-files
basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files
Expand Down Expand Up @@ -2308,7 +2323,7 @@ for pmda_package in \
nutcracker nvidia \
openmetrics openvswitch oracle \
pdns perfevent podman postfix postgresql \
rabbitmq redis resctrl rocestat roomtemp rsyslog \
rabbitmq rds redis resctrl rocestat roomtemp rsyslog \
samba sendmail shping slurm smart snmp \
sockets statsd summary systemd \
unbound uwsgi \
Expand Down Expand Up @@ -2744,6 +2759,9 @@ done
%preun pmda-rocestat
%{pmda_remove "$1" "rocestat"}

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

%preun pmda-uwsgi
%{pmda_remove "$1" "uwsgi"}
%endif
Expand Down Expand Up @@ -3072,6 +3090,8 @@ fi

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

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

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

%files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm
Expand Down
23 changes: 22 additions & 1 deletion build/rpm/redhat.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,21 @@ collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices.
# end pcp-pmda-rocestat
%endif

#
# pcp-pmda-rds
#
%package pmda-rds
License: GPL-2.0-or-later
Summary: Performance Co-Pilot (PCP) metrics for RDS protocol
URL: https://pcp.io
Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release}
Requires: python3-pcp
%description pmda-rds
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting statistics for RDS connections.
# end pcp-pmda-rds
%endif

%if !%{disable_mongodb}
#
# pcp-pmda-mongodb
Expand Down Expand Up @@ -2478,6 +2493,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/podman(/|$)' >pcp-pmda-podman-files
basic_manifest | keep '(etc/pcp|pmdas)/postfix(/|$)' >pcp-pmda-postfix-files
basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-files
basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files
basic_manifest | keep '(etc/pcp|pmdas)/rds(/|$)' >pcp-pmda-rds-files
basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files
basic_manifest | keep '(etc/pcp|pmdas)/resctrl(/|$)|sys-fs-resctrl' >pcp-pmda-resctrl-files
basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files
Expand Down Expand Up @@ -2519,7 +2535,7 @@ for pmda_package in \
nutcracker nvidia \
openmetrics openvswitch oracle \
pdns perfevent podman postfix postgresql \
rabbitmq redis resctrl rocestat roomtemp rpm rsyslog \
rabbitmq rds redis resctrl rocestat roomtemp rpm rsyslog \
samba sendmail shping slurm smart snmp \
sockets statsd summary systemd \
unbound uwsgi \
Expand Down Expand Up @@ -2913,6 +2929,9 @@ exit 0
%preun pmda-rocestat
%{pmda_remove "$1" "rocestat"}

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

%endif

%preun pmda-apache
Expand Down Expand Up @@ -3263,6 +3282,8 @@ fi

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

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

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

%files export-pcp2graphite -f pcp-export-pcp2graphite-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 uwsgi rocestat hdb
nfsclient mongodb uwsgi rocestat hdb rds

SUBDIRS = $(CPMDAS) $(PLPMDAS) $(PYPMDAS)
LDIRT = pmcd.conf
Expand Down
52 changes: 52 additions & 0 deletions src/pmdas/rds/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# Copyright (c) 2025 Oracle and/or its affiliates.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#

TOPDIR = ../../..
include $(TOPDIR)/src/include/builddefs

IAM = rds
PYSCRIPT = pmda$(IAM).python
LDIRT = domain.h root pmns $(IAM).log
DOMAIN = GLUSTER

PMDAADMDIR = $(PCP_PMDASADM_DIR)/$(IAM)
PMDATMPDIR = $(PCP_PMDAS_DIR)/$(IAM)

MAN_SECTION = 1
MAN_PAGES = pmda$(IAM).$(MAN_SECTION)
MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION)

default_pcp default: build-me

include $(BUILDRULES)

ifeq "$(HAVE_PYTHON)" "true"
build-me: check_domain
install_pcp install: default
$(INSTALL) -m 755 -d $(PMDAADMDIR)
$(INSTALL) -m 755 -d $(PMDATMPDIR)
$(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(PYSCRIPT) $(PMDAADMDIR)
@$(INSTALL_MAN)
else
build-me:
install_pcp install:
@$(INSTALL_MAN)
endif

check_domain: ../../pmns/stdpmid
$(DOMAIN_PYTHONRULE)

check:: $(MAN_PAGES)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a missing 'check' target here to run pylint on all the python code.

$(MANLINT) $^
35 changes: 35 additions & 0 deletions src/pmdas/rds/Install
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright (c) 2025 Oracle and/or its affiliates.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#

. $PCP_DIR/etc/pcp.env
. $PCP_SHARE_DIR/lib/pmdaproc.sh

iam=rds
python_opt=true
daemon_opt=false

# Prepare PMDA Python files (needed for easier packaging)
$PCP_PYTHON_PROG $PCP_PMDAS_DIR/rds/pyprep
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this - see notes later regarding this script.


#
# See pmcd(1) man page. PMDA starts up in the "not ready" state.
# When it has finished starting up, it sends a PM_ERR_PMDAREADY
# error PDU to PMCD to indicate it's ready to start processing
# requests.

ipc_prot="binary notready"
pmdaSetup
pmdaInstall
exit
35 changes: 35 additions & 0 deletions src/pmdas/rds/Remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright (c) 2025 Oracle and/or its affiliates.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# Remove the rds PMDA
#

# source the PCP configuration environment variables
. $PCP_DIR/etc/pcp.env

# Get the common procedures and variable assignments
#
. $PCP_SHARE_DIR/lib/pmdaproc.sh

# The name of the PMDA
#
iam=rds

# Do it
#
pmdaSetup
pmdaRemove


exit
1 change: 1 addition & 0 deletions src/pmdas/rds/domain.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define RDS 256
Loading
Loading