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

Add timeout flags to mongodb_exporter

    XMLWordPrintable

    Details

      Description

      @unguiculus commented on Apr 12
      Adds the following flags:

      -mongodb.socket-timeout
      -mongodb.sync-timeout

      I left the defaults as they were, but I think it might be a good idea to change them as well. The MongoDB driver has a default for the sync timeout of 7 seconds (session.go#L1706) and a default value for the socket timeout of one minute (session.go#L1716) whereas the exporter uses a much longer default for the sync timeout of one minute and an extremely short default of 3 seconds for the socket timeout.

      We've found that the default socket timeout is way too short when you have a recovering replica. It may take quite a bit to connect. You want to make sure to get your metrics, so I'd rather set the timeout higher.

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  kamil.dziedzic Kamil Dziedzic (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Time Spent - 55 minutes Remaining Estimate - 3 hours, 40 minutes
                    3h 40m
                    Logged:
                    Time Spent - 55 minutes Remaining Estimate - 3 hours, 40 minutes
                    55m