Run supervisord as the mon-agent user, not root
This commit is contained in:
parent
089cd0a3d3
commit
41ba189053
|
@ -291,10 +291,10 @@ def main():
|
|||
else:
|
||||
print "%s is valid" % basename
|
||||
if all_valid:
|
||||
print "All yaml files passed. You can now run the Datadog agent."
|
||||
print "All yaml files passed. You can now run the Monitoring agent."
|
||||
return 0
|
||||
else:
|
||||
print("Fix the invalid yaml files above in order to start the Datadog agent. "
|
||||
print("Fix the invalid yaml files above in order to start the Monitoring agent. "
|
||||
"A useful external tool for yaml parsing can be found at "
|
||||
"http://yaml-online-parser.appspot.com/")
|
||||
return 1
|
||||
|
@ -322,7 +322,6 @@ def main():
|
|||
if not should_run:
|
||||
print "Couldn't find any valid JMX configuration in your conf.d directory: %s" % confd_directory
|
||||
print "Have you enabled any JMX check ?"
|
||||
print "If you think it's not normal please get in touch with Datadog Support"
|
||||
|
||||
|
||||
return 0
|
||||
|
|
|
@ -20,8 +20,8 @@ AGENTUSER="mon-agent"
|
|||
FORWARDERPATH="/usr/local/bin/mon-forwarder"
|
||||
NAME="mon-agent"
|
||||
DESC="Monitoring Agent"
|
||||
AGENT_PID_PATH="/var/run/mon-agent.pid"
|
||||
SUPERVISOR_PIDFILE="/var/run/mon-agent-supervisord.pid"
|
||||
AGENT_PID_PATH="/var/tmp/mon-agent.pid"
|
||||
SUPERVISOR_PIDFILE="/var/tmp/mon-agent-supervisord.pid"
|
||||
SUPERVISOR_FILE="/etc/mon-agent/supervisor.conf"
|
||||
SUPERVISOR_SOCK="/var/tmp/mon-agent-supervisor.sock"
|
||||
SUPERVISORD=$(which supervisord)
|
||||
|
@ -86,7 +86,7 @@ case "$1" in
|
|||
|
||||
|
||||
log_daemon_msg "Starting $DESC (using supervisord)" "$NAME"
|
||||
start-stop-daemon --start --quiet --oknodo --exec $SUPERVISORD -- -c $SUPERVISOR_FILE --pidfile $SUPERVISOR_PIDFILE
|
||||
start-stop-daemon --start --quiet --oknodo --exec $SUPERVISORD -- -c $SUPERVISOR_FILE -u $AGENTUSER --pidfile $SUPERVISOR_PIDFILE
|
||||
if [ $? -ne 0 ]; then
|
||||
log_end_msg 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue