# About alerting

**URL:** https://forums.percona.com/t/about-alerting/7466
**Category:** PMM 2.x
**Created:** [March 12, 2020, 9:11am UTC](https://forums.percona.com/t/about-alerting/7466 "2020-03-12T09:11:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)
#### Post date: [March 12, 2020, 9:11am UTC](https://forums.percona.com/t/about-alerting/7466/1 "2020-03-12T09:11:18Z")

</div>

Hello everyone,  
First of all, i love PMM. I am using it for MongoDB monitoring and want to set alerts. But I could not manage to do it ☹ For example, I want to get alert if node state changed (from PRIMARY to SECONDARY for example). Can you please guide me on how to achieve that?

---

<div class="post-metadata">

### Author: ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)
#### Post date: [March 13, 2020, 6:49am UTC](https://forums.percona.com/t/about-alerting/7466/2 "2020-03-13T06:49:43Z")

</div>

Hello ghan, thank you for that, glad to hear you are enjoying the product!  
Can I just check in with you what version of PMM you are using?  
If it’s 2.3.0 did you check out chapter 81 in the downloadable manual? [URL][https://www.percona.com/downloads/pmm2/[/URL]](https://www.percona.com/downloads/pmm2/%5B/URL%5D)  
If you have seen that and it’s not helping, tell us how far you are getting and what’s not working for you, and I’ll see if I can get one of the team to help you through.

---

<div class="post-metadata">

### Author: ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)
#### Post date: [March 15, 2020, 1:33pm UTC](https://forums.percona.com/t/about-alerting/7466/3 "2020-03-15T13:33:26Z")

</div>

Hi there!  
I could successfully monitor MongoDB state, it was my misunderstanding. But right now, i am trying to integrate Elasticsearch to monitor. Im using ([URL][https://github.com/vvanholl/elasticsearch-prometheus-exporter[/URL]](https://github.com/vvanholl/elasticsearch-prometheus-exporter%5B/URL%5D)) exporter to do it, but unable to add it PMM. pmm-admin add external:service command wont work, is it changed with new version of PMM? Can you help me about this?

---

<div class="post-metadata">

### Author: ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)
#### Post date: [March 16, 2020, 6:05am UTC](https://forums.percona.com/t/about-alerting/7466/4 "2020-03-16T06:05:49Z")

</div>

Hi again Ghan  
OK, I checked in on this feature and it seems that it’s not yet available in PMM 2  
For this use case you’d be better hanging in with 1.17 until it’s available.

---

<div class="post-metadata">

### Author: ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)
#### Post date: [March 16, 2020, 7:17am UTC](https://forums.percona.com/t/about-alerting/7466/5 "2020-03-16T07:17:37Z")

</div>

I got your point and thank you for your interest. But unfortunately it is not possible to roll-back to 1.17. There should be a way to integrate external resource to PMM’s prometheus. I tried by the way, I modified prometheus.yml file and added my external resources but after rebooting PMM, these settings rollovered? I could not find why. I think if i can add below lines to prometheus.yml, it will be a solution. do you have any idea?

- job\_name: elasticsearch scrape\_interval: 10s metrics\_path: “/\_prometheus/metrics” static\_configs: - targets: - node1:9200 - node2:9200 - node3:9200

---

<div class="post-metadata">

### Author: ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)
#### Post date: [March 17, 2020, 5:36am UTC](https://forums.percona.com/t/about-alerting/7466/6 "2020-03-17T05:36:05Z")

</div>

I have my exporter running ([URL=“[http://10.41.51.60:9200/\_prometheus/metrics](http://10.41.51.60:9200/_prometheus/metrics)”][http://10.10.10.10:9200/\_prometheus/metrics[/URL]](http://10.10.10.10:9200/_prometheus/metrics%5B/URL%5D)) via ([URL][https://github.com/vvanholl/elasticsearch-prometheus-exporter[/URL]](https://github.com/vvanholl/elasticsearch-prometheus-exporter%5B/URL%5D)), i need to feed PMM with this metrics. Also my dashboard is ready ([URL][https://grafana.com/grafana/dashboards/266[/URL]](https://grafana.com/grafana/dashboards/266%5B/URL%5D)). Can somebody help me about it?

---

<div class="post-metadata">

### Author: ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)
#### Post date: [March 18, 2020, 10:17am UTC](https://forums.percona.com/t/about-alerting/7466/7 "2020-03-18T10:17:48Z")

</div>

Hey Ghan that’s brilliant news. I will share it with the team. They’re working on getting this ready out the box but it’s a few releases away I think. Let me just check in with them to make sure that they don’t think there’s any gotchas here. Thanks!!!

---

<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: [March 20, 2020, 10:57am UTC](https://forums.percona.com/t/about-alerting/7466/8 "2020-03-20T10:57:38Z")

</div>

[Ghan](https://percona.vanillacommunities.com/profile/x/x/43605), thanks for updating on your progress, that’s awesome that you were able to come up something that worked for you! It’s actually a really good solution but just wanted to make you aware of some gotchas that you or others might not be aware of.

Perhaps the most important is that the changes you made inside the container will not persist in either kind of upgrade. If you do an in-place upgrade (using the update tile on the main dashboard) all your data will be there but you’ll lose much of the configuration so get backups of the modified files to make it easier to restore to the next version. If you do a container upgrade (via docker) not only will your configs be lost but also any of the data in the second prometheus instance unless you pointed it’s storage to the persistent volume. May not be a huge deal but just to be aware of!

As of PMM 2.4.0 (released just the other day) we support custom prometheus configs that will survive upgrades so you’ll have less to reconnect. We are actively working on bringing external exporters into PMM2 and expect that in roughly 2-3 releases you’ll be able to connect Elasticsearch and other exporters to PMM with ease!
