I am new to PMM.
I have setup a PMM environment on my VM. but it seems to be complicated to setup the Alerts. especially when you want to setup alerts by modifying on the basis of default queries. I need some basic alerts for
mongodb service uptime.
Mongodb state change(when primary automatically switches to a different state)
max connections threshold.
number of delete/update and read queries.
Can someone please provide the queries which I can use to setup Alerts in PMM.
Hi Lorraine,
Thanks for the link, but they are not useful for me.
When setting up Alerts, we have to create a query A for monitoring based on the metrics. The most difficult part is to create this query using the metrics. I need a documentation on the details of the options available to create this query.
Scondly, when I am trying to create a query, I want it to monitor only one particular node, but I am able to see all the nodes metrics in the graph.
I tried following the steps shared by Peter and Barret. But they are mostly related to MySQL. I need something specific to MongoDB.
Once I finish up with testing on Mongo, my testing has to be on PostgreSQL too.
Hello gkmgaurav, I’m sorry to have not come back to you on this…
It’s something that we are hoping to develop further with PMM, but currently we can’t offer any step-by-step approaches to implement alerts.
If there’s a graph on the PMM demo here that you need info on, I can maybe get something about that particular example if it’s not already in the documentation.
[url]https://pmmdemo.percona.com/[/url]
If you are using pmm-client > 1.8.0, you can use the following metric series - remember to change the instance and cluster names for your environment (or leave out cluster): [LIST=1]
[]You can use whether the service is up or not with: mongodb_up{instance=“mongors2wt”} . if you need uptime you can use mongodb_mongod_instance_uptime_seconds{cluster=“bare-metal”,instance=“mongors1rocksdb”,job=“mongodb”}
[]For state you’ll get either 1 or 2 from this metric series: mongodb_mongod_replset_my_state{cluster=“bare-metal”,instance=“mongors1wt”,job=“mongodb”,set=“rs1”}
[]mongodb_mongod_connections{cluster=“bare-metal”,instance=“mongors1wt”,job=“mongodb”,state=“available”} can be used for max connections
[]for deletes, updates, and reads you can use the following metric series and vary the type - mongodb_mongod_op_counters_total{cluster=“bare-metal”,instance=“mongors2mmapv1”,job=“mongodb”,type=“delete”}
[/LIST] I hope this helps!
Many many Thanks Michael. You did a wonderful help for me. The new PMM looks great to me. I had to upgrade my pmm-server and client both to get this fixed. my issue is fixed. I am able to get alerts. Thanks sooo muchhh!!!
I would like to Thanks Lorraine too.
It was Peter Zaitsev who guided me to this forum. Thanks to Peter tooo!!
Thank you gkmgaurav for taking the time to leave this feedback, you’re welcome. We’re really happy that a true ‘Percona Team Effort’ has helped you to get to where you want to be with PMM and we look forward to bringing you more great features going forward.