From 4879e9c160e66eb888297e0d1bcf0e0a1384332d Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Thu, 7 Mar 2024 12:41:18 +0200 Subject: [PATCH] PMM-12897 Add postgres low resolution queries file to build (#2851) --- build/packages/deb/files | 3 ++- build/packages/deb/install | 3 ++- build/packages/deb/rules | 3 ++- build/packages/rpm/client/pmm2-client.spec | 3 ++- build/scripts/build-client-binary | 3 ++- build/scripts/build-client-packages | 3 ++- build/scripts/install_tarball | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build/packages/deb/files b/build/packages/deb/files index 15052226b3..9d6a488061 100644 --- a/build/packages/deb/files +++ b/build/packages/deb/files @@ -52,4 +52,5 @@ install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/p install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ install -m 0660 queries-postgres-uptime.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ -install -m 0660 queries.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +install -m 0660 queries-mr.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +install -m 0660 queries-lr.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/low-resolution/ diff --git a/build/packages/deb/install b/build/packages/deb/install index 2f02ed6f74..bd2c189087 100644 --- a/build/packages/deb/install +++ b/build/packages/deb/install @@ -23,4 +23,5 @@ example-queries-postgres.yml /usr/local/percona/pmm2/collectors/custom-queries/p example-queries-postgres.yml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ example-queries-postgres.yml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ queries-postgres-uptime.yml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ -queries.yaml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +queries-mr.yaml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +queries-lr.yaml /usr/local/percona/pmm2/collectors/custom-queries/postgresql/low-resolution/ diff --git a/build/packages/deb/rules b/build/packages/deb/rules index 67ed642f6b..022be403d1 100644 --- a/build/packages/deb/rules +++ b/build/packages/deb/rules @@ -62,7 +62,8 @@ override_dh_auto_install: cp -f distro/queries-mysqld-group-replication.yml $(TMP)/queries-mysqld-group-replication.yml cp -f distro/example-queries-postgres.yml $(TMP)/example-queries-postgres.yml cp -f distro/queries-postgres-uptime.yml $(TMP)/queries-postgres-uptime.yml - cp -f distro/queries.yaml $(TMP)/queries.yaml + cp -f distro/queries-mr.yaml $(TMP)/queries-mr.yaml + cp -f distro/queries-lr.yaml $(TMP)/queries-lr.yaml cp -f distro/pt-summary $(TMP)/pt-summary cp -f distro/pt-mysql-summary $(TMP)/pt-mysql-summary cp -f distro/pt-mongodb-summary $(TMP)/pt-mongodb-summary diff --git a/build/packages/rpm/client/pmm2-client.spec b/build/packages/rpm/client/pmm2-client.spec index 3fa8154ee9..a5279dffc4 100644 --- a/build/packages/rpm/client/pmm2-client.spec +++ b/build/packages/rpm/client/pmm2-client.spec @@ -86,7 +86,8 @@ install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/p install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ install -m 0660 example-queries-postgres.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ install -m 0660 queries-postgres-uptime.yml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/high-resolution/ -install -m 0660 queries.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +install -m 0660 queries-mr.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/medium-resolution/ +install -m 0660 queries-lr.yaml $RPM_BUILD_ROOT/usr/local/percona/pmm2/collectors/custom-queries/postgresql/low-resolution/ install -m 0755 -d $RPM_BUILD_ROOT/%{_unitdir} install -m 0644 config/pmm-agent.service %{buildroot}/%{_unitdir}/pmm-agent.service diff --git a/build/scripts/build-client-binary b/build/scripts/build-client-binary index 00d33c1ef0..27e1c2ae86 100755 --- a/build/scripts/build-client-binary +++ b/build/scripts/build-client-binary @@ -119,7 +119,8 @@ main() { copy_component "mysqld_exporter" "queries-mysqld-group-replication.yml" copy_component "postgres_exporter" "example-queries-postgres.yml" copy_component "postgres_exporter" "queries-postgres-uptime.yml" - copy_component "postgres_exporter" "queries.yaml" + copy_component "postgres_exporter" "queries-mr.yaml" + copy_component "postgres_exporter" "queries-lr.yaml" copy_component "percona-toolkit" "bin/pt-summary" copy_component "percona-toolkit" "bin/pt-mysql-summary" diff --git a/build/scripts/build-client-packages b/build/scripts/build-client-packages index 8c8bf5a264..68c2d03bda 100755 --- a/build/scripts/build-client-packages +++ b/build/scripts/build-client-packages @@ -360,7 +360,8 @@ build_source_deb(){ mv queries-mysqld-group-replication.yml ../${NAME}-${VERSION}_all/distro/ mv example-queries-postgres.yml ../${NAME}-${VERSION}_all/distro/ mv queries-postgres-uptime.yml ../${NAME}-${VERSION}_all/distro/ - mv queries.yaml ../${NAME}-${VERSION}_all/distro/ + mv queries-mr.yaml ../${NAME}-${VERSION}_all/distro/ + mv queries-lr.yaml ../${NAME}-${VERSION}_all/distro/ mv debian ../${NAME}-${VERSION}_all/ mv config/pmm-agent.service ../${NAME}-${VERSION}_all/debian/pmm2-client.pmm-agent.service cd ../ diff --git a/build/scripts/install_tarball b/build/scripts/install_tarball index ca38d48f3a..1d46f233e0 100755 --- a/build/scripts/install_tarball +++ b/build/scripts/install_tarball @@ -39,7 +39,8 @@ ${INSTALL_COMMAND} -m 0755 -d "${PMM_DIR}"/collectors/custom-queries/postgresql/ ${INSTALL_COMMAND} -m 0755 -d "${PMM_DIR}"/collectors/custom-queries/postgresql/medium-resolution ${INSTALL_COMMAND} -m 0755 -d "${PMM_DIR}"/collectors/custom-queries/postgresql/high-resolution ${INSTALL_COMMAND} -m 0755 queries-postgres-uptime.yml "${PMM_DIR}"/collectors/custom-queries/postgresql/high-resolution -${INSTALL_COMMAND} -m 0755 queries.yaml "${PMM_DIR}"/collectors/custom-queries/postgresql/medium-resolution +${INSTALL_COMMAND} -m 0755 queries-mr.yaml "${PMM_DIR}"/collectors/custom-queries/postgresql/medium-resolution +${INSTALL_COMMAND} -m 0755 queries-lr.yaml "${PMM_DIR}"/collectors/custom-queries/postgresql/low-resolution ${INSTALL_COMMAND} -m 0755 queries-mysqld-group-replication.yml "${PMM_DIR}"/collectors/custom-queries/mysql/high-resolution for FILE in $( ls ${PWD}/bin ); do