Not the answer you need?
Register and ask your own question!

Configure Alerts for MongoDB on PMM

gkmgauravgkmgaurav ContributorCurrent User Role Beginner
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
1. mongodb service uptime.
2. Mongodb state change(when primary automatically switches to a different state)
3. max connections threshold.
4. number of delete/update and read queries.

Can someone please provide the queries which I can use to setup Alerts in PMM.

Comments

  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hello, did you fix this issue yet? Some links that might help: Also, have you seen the PMM demos with MongoDB graphs? https://pmmdemo.percona.com/graph/dashboard/db/mongodb-overview?refresh=1m&orgId=1

    If you find something there that you want to emulate, let me know and I will see if I can get more information for you.
  • gkmgauravgkmgaurav Contributor Current User Role Beginner
    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.
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    Hi there, no problem, I will see if I can get someone to provide the guidelines you need. Thanks for trying the links though!
  • gkmgauravgkmgaurav Contributor Current User Role Beginner
    Hi there, no problem, I will see if I can get someone to provide the guidelines you need. Thanks for trying the links though!

    Hi Lorraine, did you found any help for me.
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    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.
    https://pmmdemo.percona.com/
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
    gkmgaurav wrote: »
    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
    1. mongodb service uptime.
    2. Mongodb state change(when primary automatically switches to a different state)
    3. max connections threshold.
    4. number of delete/update and read queries.

    Can someone please provide the queries which I can use to setup Alerts in PMM.

    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):
    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"}
    2. 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"}
    3. mongodb_mongod_connections{cluster="bare-metal",instance="mongors1wt",job="mongodb",state="available"} can be used for max connections
    4. 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"}
    I hope this helps!
  • gkmgauravgkmgaurav Contributor Current User Role Beginner
    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!!
  • lorraine.pocklingtonlorraine.pocklington Percona Community Manager Legacy User Role Patron
    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. :D
This discussion has been closed.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.