# Is there a way to add an Environment tag to nodes?

**URL:** <https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836>\
**Category:** PMM 2.x\
**Tags:** pmm\
**Created:** [July 29, 2020, 3:15pm UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836 "2020-07-29T15:15:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_K](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jeff_k/32/1327_2.png) [@Jeff\_K](https://forums.percona.com/u/Jeff_K)\
**Post date:** [July 29, 2020, 3:15pm UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/1 "2020-07-29T15:15:26Z")

</div>

I see in the current iteration of PMM, at the top of the home dashboard in Grafana, there is an Environment dropdown. How exactly do I assign that tag to my nodes? I’ve done a bit of searching around the PMM2 Client setup documentation and haven’t found anything, but I might have overlooked it. This feature would be extremely helpful for some alerting I’m setting up.

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [July 30, 2020, 2:35am UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/2 "2020-07-30T02:35:04Z")

</div>

Hi Jeff,  
Additional labels can be added during adding a service for monitoring.  
e.g.

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/4f9d4b2239ebc5ee29b5bbf7bdef70b25ab93d85.png "Image: /uploads/percona1/original/1X/4f9d4b2239ebc5ee29b5bbf7bdef70b25ab93d85.png")  
 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/d989a156b4c86ff0316c9a8a6a2cbbca2e125a1a.png "Image: /uploads/percona1/original/1X/d989a156b4c86ff0316c9a8a6a2cbbca2e125a1a.png")

---

<div class="post-metadata">

**Author:** ![Fan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fan/32/40_2.png) [@Fan](https://forums.percona.com/u/Fan)\
**Post date:** [August 3, 2020, 1:35am UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/3 "2020-08-03T01:35:49Z")

</div>

you can add any lables you want&nbsp;through `--custom-labels`  
pmm-admin add mysql --query-source=slowlog --username=pmm --password=xxx --custom-labels=“region=bj,env=prod” ${HOSTNAME}\_3306 127.0.0.1:3306  
 ![]()

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/8f4e87db5895b3851720c64e67ab40d1ca1f4020.png "Image: /uploads/percona1/original/1X/8f4e87db5895b3851720c64e67ab40d1ca1f4020.png")

---

<div class="post-metadata">

**Author:** ![Jeff\_K](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jeff_k/32/1327_2.png) [@Jeff\_K](https://forums.percona.com/u/Jeff_K)\
**Post date:** [August 12, 2020, 1:09pm UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/4 "2020-08-12T13:09:27Z")

</div>

Checking back in with this one, I was finally able to run the --custom-labels command. While it is extremely helpful for alerting, it doesn’t seem to have effected the “Environment” dropdown in Grafana. Was there another way to make that work, or is it non-functional for the time being?

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/7374440e6b6c1355d1427938fdd415c6b004e584.png "Image: /uploads/percona1/original/1X/7374440e6b6c1355d1427938fdd415c6b004e584.png")

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [August 12, 2020, 2:12pm UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/5 "2020-08-12T14:12:20Z")

</div>

for that you need to use the --environment= flag…is that not working for you?

---

<div class="post-metadata">

**Author:** ![Jeff\_K](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jeff_k/32/1327_2.png) [@Jeff\_K](https://forums.percona.com/u/Jeff_K)\
**Post date:** [August 12, 2020, 2:21pm UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/6 "2020-08-12T14:21:18Z")

</div>

I think I figured it out after looking in prometheus, the command was run as&nbsp;–custom-labels=“Environment”, should have been lowercase. do you know if --environment and --custom-labels=“environment” would cause the same result?

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [August 13, 2020, 3:32am UTC](https://forums.percona.com/t/is-there-a-way-to-add-an-environment-tag-to-nodes/7836/7 "2020-08-13T03:32:55Z")

</div>

It should some other reason for the missed environment parameter.  
I can’t reproduced the issue with uppercase/lowercase names.

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/87e563fde0e82ccf01da4d67ba8b7de2fcb0350b.png "Image: /uploads/percona1/original/1X/87e563fde0e82ccf01da4d67ba8b7de2fcb0350b.png")  
 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/616cc24a0a46323330c9f979c05bafdce3174b75.png)
