How to change a service's configuration

Hello,

We deployed a PMM2 (2.34) server and added several PG13 services, and at the time those were configured with “pg_stat_statements”. Recently, we configured “pg_stat_monitor” on our postgresql nodes.

My question: is there a way to modify an existing service for this type of change? Or is the only way to remove and re-add the service again?

Cheers,
Steeve

1 Like

Hi @sboulanger thank you for posting to the Percona forums!

At this time there is no way to change settings in place, what you need to do is first remove the service then add it back with the new options. If you do this quickly enough you should not see more than a few seconds of missed scraping data in your graphs.

# find the service name
pmm-admin list
# remove the service
pmm-admin remove postgresql <service-name>
# add the service back with new --query-source option
pmm-admin add postgresql ... --query-source=pgstatmonitor

Thanks for the feedback Michael.

Cheers,
Steeve

1 Like