Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32246

PID file permission on v3.6 make it not monitorable using pid file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.6.2, 3.7.1
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Steps To Reproduce:
      Hide

      Install datadog
      Install mongod
      Configure mongod to setup a pid file
      Configure Datadog to monitor the mongod process using the pid file. This is done in /etc/dd-agent/conf.d/process.conf

      Notice that on 3.4 it works. On 3.6 it no longer works.

      Show
      Install datadog Install mongod Configure mongod to setup a pid file Configure Datadog to monitor the mongod process using the pid file. This is done in /etc/dd-agent/conf.d/process.conf Notice that on 3.4 it works. On 3.6 it no longer works.
    • Sprint:
      Platforms 2017-12-18

      Description

      In v3.4 your server would create a pid file with permissions 644. In v3.6 it creates a PID file with permissions 600. This means that unless my monitoring tool runs as root or as the mongod user I can not use this file to monitor the health of the service. In example this breaks PID file monitoring with datadog.

      Solution is to just check for the existence of a process named 'mongod', but I don't prefer that as much as the pid file (because using a PID file is the way systemd does it). Would it be possible to change the permissions back to 644. There isn't anything really gained by making it 600 as far as I can tell (maybe I'm wrong... pray tell if so). At a minimum please change the permissions to 640 so I can put my monitoring service in the mongod group and then it can monitor the service that way.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: