Skip to content
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
2 changes: 1 addition & 1 deletion src/pmdas/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PYPMDAS = gluster zswap unbound mic haproxy \
libvirt lio openmetrics opentelemetry \
elasticsearch bpftrace mssql netcheck \
rabbitmq openvswitch nfsclient mongodb \
uwsgi rocestat hdb rds
uwsgi rocestat hdb rds chrony

SUBDIRS = $(CPMDAS) $(PLPMDAS) $(PYPMDAS)
LDIRT = pmcd.conf
Expand Down
53 changes: 53 additions & 0 deletions src/pmdas/chrony/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# Copyright (c) 2026 Nutanix, Inc.
#
# 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 = chrony
PYSCRIPT = pmda$(IAM).python
LDIRT = domain.h root pmns $(IAM).log
DOMAIN = CHRONY

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:
endif

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

check:: $(PYSCRIPT)
$(PYLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
27 changes: 27 additions & 0 deletions src/pmdas/chrony/Install
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /bin/sh
#
# Copyright (c) 2026 Nutanix, Inc.
#
# 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.
#
# Install the chrony PMDA
#

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

iam=chrony
python_opt=true
daemon_opt=false

pmdaSetup
pmdaInstall
exit
26 changes: 26 additions & 0 deletions src/pmdas/chrony/Remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /bin/sh
#
# Copyright (c) 2026 Nutanix, Inc.
#
# 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 chrony PMDA
#

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

iam=chrony
python_opt=true

pmdaSetup
pmdaRemove
exit
71 changes: 71 additions & 0 deletions src/pmdas/chrony/pmdachrony.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
'\"macro stdmacro
.\"
.\" Copyright (c) 2014 Red Hat.
.\" Copyright (c) 2026 Nutanix, Inc.
.\"
.\" 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.
.\"
.\"
.TH PMDACHRONY 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdachrony\f1 \- chronyd PMDA
.SH DESCRIPTION
\f3pmdachrony\f1 is a Performance Metrics Domain Agent (PMDA) which exports
metric values from chronyd, as exposed by the
.B chronyc
utility.
.SH INSTALLATION
Install the chrony PMDA by using the Install script as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/chrony
# ./Install
.fi
.ft P
.RE
.sp 1
.PP
To uninstall, do the following as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/chrony
# ./Remove
.fi
.ft P
.RE
.sp 1
\fBpmdachrony\fR is launched by \fIpmcd\fR(1) and should never be executed
directly. The Install and Remove scripts notify \fIpmcd\fR(1) when the
agent is installed or removed.
.SH FILES
.IP "\fB$PCP_PMDAS_DIR/chrony/Install\fR" 4
installation script for the \fBpmdachrony\fR agent
.IP "\fB$PCP_PMDAS_DIR/chrony/Remove\fR" 4
undo installation script for the \fBpmdachrony\fR agent
.IP "\fB$PCP_LOG_DIR/pmcd/chrony.log\fR" 4
default log file for error messages from \fBpmdachrony\fR
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by \fBPCP\fR. On each installation, the
file \fB/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fIpcp.conf\fR(5).
.SH SEE ALSO
.BR PCPIntro (1)
and
.BR pmcd (1).

.\" control lines for scripts/man-spell
.\" +ok+ pmdachrony chrony
Loading