# How PMM node and service match

**URL:** <https://forums.percona.com/t/how-pmm-node-and-service-match/30982>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [June 12, 2024, 4:08am UTC](https://forums.percona.com/t/how-pmm-node-and-service-match/30982 "2024-06-12T04:08:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmmChobo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pmmChobo](https://forums.percona.com/u/pmmChobo)\
**Post date:** [June 12, 2024, 4:08am UTC](https://forums.percona.com/t/how-pmm-node-and-service-match/30982/1 "2024-06-12T04:08:22Z")

</div>

## Description:

[Detailed description of the issue or question]

In PMM, node and service don’t give each other an option to identify, how do they connect to each other?

If there is one node and one service in one server, they identify each other well, but if there are two nodes and two services in one server, I don’t know how to connect each node and service.

## Steps to Reproduce:

[Step-by-step instructions on how to reproduce the issue, including any specific settings or configurations]

## Version:

[Insert the version number of the software]

2.40.1

## Logs:

[If applicable, include any relevant log files or error messages]

node install command

```auto
pmm-agent setup --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml --server-address=[server-address] --server-insecure-tls --server-username=admin --server-password=admin --paths-tempdir=/usr/local/percona/pmm2/tmp --paths-base=/usr/local/percona/pmm2 [LOCAL_IP] generic [PMM_NODE_NAME]

```

service add command

```auto
pmm-admin add mysql --username=pmm --password=pmm --tls-skip-verify --query-source=perfschema --agent-password=pmm --service-name=[PMM_SERVICE_NAME] --host=[LOCAL_IP] --port=3306

```

## Expected Result:

[What the user expected to see or happen before the issue occurred]

## Actual Result:

[What actually happened when the user encountered the issue]

## Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

---

<div class="post-metadata">

**Author:** ![kedarpercona](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kedarpercona/32/809_2.png) [@kedarpercona](https://forums.percona.com/u/kedarpercona)\
**Post date:** [June 12, 2024, 6:44am UTC](https://forums.percona.com/t/how-pmm-node-and-service-match/30982/2 "2024-06-12T06:44:10Z")

</div>

Hi @pmmChobo,

You can identify individual service by assigning them unique name while adding them.  
I see you have noted the command that has --service-name flag.  
I believe on the same line you can add the node names probably two containers on a server?

> **[Percona Monitoring and Management - pmm-admin - PMM Administration Tool](https://docs.percona.com/percona-monitoring-and-management/details/commands/pmm-admin.html#mysql)**
>
> Documentation

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 12, 2024, 10:07pm UTC](https://forums.percona.com/t/how-pmm-node-and-service-match/30982/3 "2024-06-12T22:07:55Z")

</div>

> [@pmmChobo](#):
>
> `pmm-admin add mysql --username=pmm --password=pmm`

```auto
pmm-admin add mysql --username=pmm --password=pmm --service-name=mysql1
pmm-admin add mysql --username=pmm --password=pmm --service-name=mysql2
...
pmm-admin add mysql --username=pmm --password=pmm --service-name=mysqlX

```
