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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.6.2, 3.7.1
    • Affects Version/s: 3.6.0
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • v3.6
    • 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.
    • Platforms 2017-12-18

      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.

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            stieg Andrew Stiegmann
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: