Need add more services (external service which the same service) on many target at the same time

Dear Supporters,
My system is running PMM 1.17.4.
I have problem with add external service on many target at the same time. I deployed clickhouse_exporter , and add external service from pmm client. It worked perfectly.
My deploy progress:
1/ Compile clickhouse_exporter with Go lang on this link without change any parameter: GitHub - flant/clickhouse_exporter: Image for Percona-Lab/clickhouse_exporter
2/ Execute exporter on the client : ./clickhouse_exporter -scrape_uri=http://hostname:8123/ &
3/ Add external service: pmm-admin add external:service clickhouse --service-port=9116

After that, i tried to deploy with the same progress on another hosts but i could only add 1 target, the new target replaced old one.
I read this note : Percona Monitoring and Management

I see the part can gather all target which same services into 1 group. But this note for pmm2.x. So I could not apply it.
Could you please support me solve this problem ?

Hi Khue,

Did you specify different service names or it was clickhouse on all hosts?

$ pmm-admin add external:service --service-port=9116 clickhouse
$ pmm-admin add external:service --service-port=9116 clickhouse2

1 Like

Dear Adivinho,
Thank you for your quickly response. I did as your suggestion. It worked

But I really want add many target into only one job name as below. I did it by editing manually the /etc/prometheus.yml . Could you give me the command line (pmm-admin) for adding target without editing like that ?

Thank you for your supporting !

1 Like

Sad to say but there is no such command.

1 Like