Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-5530

mongodb_up does not return value if mongodb is down

    XMLWordPrintable

    Details

    • Type: Admin & Maintenance Task
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      STR:

      • add mongodb instance to monitoring
      • verify that it's connected and provides metrics
        [root@ip-10-178-0-79 ec2-user]# time curl localhost:42002/metrics | grep mongodb_up
        # HELP mongodb_up Whether MongoDB is up.
        # TYPE mongodb_up gauge
        mongodb_up 1
        
        real    0m0.019s
        user    0m0.004s
        sys     0m0.000s
        
      • stop mongodb instance
      • collect metrics
        [root@ip-10-178-0-79 ec2-user]# time curl localhost:42002/metrics | grep mongodb_up
        # HELP mongodb_up Whether MongoDB is up.
        # TYPE mongodb_up gauge
        mongodb_up 0
        
        real    0m30.008s
        user    0m0.004s
        sys     0m0.000s
        

      Given result: Metrics are provided by mongodb_exporter with 30 seconds delay.

       

      Hello 
      I tried to create a alert rule for MongoDB is down similar to the PostgreSQL down mentioned in the blog post.

       
      alert: MongoDBDown

      expr: mongodb_up == 0

      1. does not work either: expr: mongodb_up != 1

      for: 5m
      labels:
      severity: error
      annotations:
      description: |-
      MongoDB instance is down
      VALUE = {{ $value }}
      LABELS: {{ $labels }}
      summary: MongoDB down (instance {{ $labels.service_name }})

      In the GUI -> sidemenu -> Explore -> make two queries:
      pg_up
      mongodb_up
      (with at least 1 mongodb and postgresql monitored of course)
      shut down postgresql -> value will change from 1 -> 0
      shut down mongodb -> value will change from 1 to nothing, even the Value #? column will disappear. 
      As both expr: above fail, I assume "NULL" is written as Value which can not be compared to a number

      The postgres instance summary dashboard has a "conneted" metric generated from pg_up
      The mongodb instance summary does not have such a metric.

       

      I hope filing Jira issues is the correct way to "please give feedback" mentioned in the article about the new feature.

       

      Regards

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              hubi_oediv Hubertus Krogmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 5 hours, 30 minutes
                  5h 30m