About alerting

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 :frowning: 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?

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]
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.

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]) 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?

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.

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

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

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!!!

Ghan, 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!