Initial remove of datadog branding, rpm support and moved mapping file location.

This commit is contained in:
Tim Kuhlman 2014-04-29 16:42:32 -06:00
parent 0522d322e6
commit 16e9642e73
61 changed files with 53 additions and 582 deletions

View File

@ -1,3 +1,3 @@
include datadog.conf.example
include agent.conf.example
include checks/libs/jmxterm-1.0-alpha-4-uber.jar
include checks/libs/jmxfetch-0.2.0-jar-with-dependencies.jar

View File

@ -307,7 +307,7 @@ def main():
print "You have to specify one of the following command:"
for command, desc in JMX_LIST_COMMANDS.iteritems():
print " - %s [OPTIONAL: LIST OF CHECKS]: %s" % (command, desc)
print "Example: sudo /etc/init.d/datadog-agent jmx list_matching_attributes tomcat jmx solr"
print "Example: sudo /etc/init.d/mon-agent jmx list_matching_attributes tomcat jmx solr"
print "\n"
else:

View File

@ -393,7 +393,7 @@ def set_win32_cert_path():
crt_path = os.path.join(prog_path, 'ca-certificates.crt')
else:
cur_path = os.path.dirname(__file__)
crt_path = os.path.join(cur_path, 'packaging', 'datadog-agent', 'win32',
crt_path = os.path.join(cur_path, 'packaging', 'mon-agent', 'win32',
'install_files', 'ca-certificates.crt')
import tornado.simple_httpclient
log.info("Windows certificate path: %s" % crt_path)

View File

@ -1,4 +1,4 @@
# Builds the datadog agent distributions using fpm.
# Builds the agent distributions using fpm.
#============
@ -28,7 +28,7 @@ FPM_BUILD=fpm --epoch 1 -s dir -e -C $(BUILD) \
clean:
rm -rf $(ROOT)
rm -rf build
rm -f *.deb *.rpm
rm -f *.deb
# Copy the code + static files we want to deploy to our
# root directory.
@ -48,103 +48,39 @@ source:
# Layout all of the files common to both versions of the Agent in
# the build directory.
install_base: source
install_full: source
mkdir -p $(BUILD)
mkdir -p $(BUILD)/usr/share/datadog/agent
mkdir -p $(BUILD)/etc/dd-agent
mkdir -p $(BUILD)/etc/dd-agent/conf.d
mkdir -p $(BUILD)/etc/dd-agent/checks.d
mkdir -p $(BUILD)/usr/share/mon/agent
mkdir -p $(BUILD)/etc/mon-agent
mkdir -p $(BUILD)/etc/mon-agent/conf.d
mkdir -p $(BUILD)/usr/bin
mkdir -p $(BUILD)/var/log/mon-agent
# Install the common source & config.
cp -r $(ROOT)/* $(BUILD)/usr/share/datadog/agent/
cp $(ROOT)/datadog.conf.example $(BUILD)/etc/dd-agent
cp -r $(ROOT)/conf.d/* $(BUILD)/etc/dd-agent/conf.d/
cp -r $(ROOT)/api/mapping.json $(BUILD)/etc/dd-agent/
# Install the source to usr/share
cp -r $(ROOT)/* $(BUILD)/usr/share/mon/agent/
# Install the common executables.
ln -sf ../share/datadog/agent/dogstatsd.py $(BUILD)/usr/bin/dogstatsd
ln -sf ../share/datadog/agent/collector.py $(BUILD)/usr/bin/dd-agent
ln -sf ../share/mon/agent/dogstatsd.py $(BUILD)/usr/bin/dogstatsd
ln -sf ../share/mon/agent/forwarder.py $(BUILD)/usr/bin/mon-forwarder
ln -sf ../share/mon/agent/collector_daemon.py $(BUILD)/usr/bin/mon-collector
chmod 755 $(BUILD)/usr/bin/dogstatsd
chmod 755 $(BUILD)/usr/bin/dd-agent
chmod 755 $(BUILD)/var/log/mon-agent
install_full: source
# Install the forwarder.
mkdir -p $(BUILD)/usr/bin
ln -sf ../share/datadog/agent/forwarder.py $(BUILD)/usr/bin/dd-forwarder
chmod 755 $(BUILD)/usr/bin/dd-forwarder
# =====================
# RPM
# =====================
install_base_rpm: install_base
mkdir -p $(BUILD)/etc/init.d
cp datadog-agent-base-rpm/datadog-agent-redhat $(BUILD)/etc/init.d/mon-agent
chmod 755 $(BUILD)/etc/init.d/mon-agent
install_full_rpm: install_base_rpm install_full
mkdir -p $(BUILD)/etc/dd-agent
mkdir -p $(BUILD)/usr/share/datadog/agent
cp datadog-agent-rpm/supervisor.conf $(BUILD)/etc/dd-agent/supervisor.conf
cp datadog-agent-rpm/setup-supervisor.py $(BUILD)/usr/share/datadog/agent
datadog_agent_base_rpm: clean install_base_rpm
FPM_EDITOR="echo '' >>" \
$(FPM_BUILD) -t rpm \
-n mon-agent-base \
-d "python(abi) >= 2.4" \
-d "python-uuid" \
-d "python-requests" \
-d "sysstat" \
--replaces "datadog-agent-lib < $(VERSION)" \
--pre-install datadog-agent-base-rpm/pre_install \
--post-install datadog-agent-base-rpm/post_install \
--pre-uninstall datadog-agent-base-rpm/pre_uninstall \
--post-uninstall datadog-agent-base-rpm/post_uninstall \
--posttrans datadog-agent-base-rpm/posttrans \
.
datadog_agent_rpm: clean install_full_rpm
FPM_EDITOR="echo ''>>" \
$(FPM_BUILD) -t rpm \
-n "mon-agent" \
-d "python(abi) >= 2.6" \
-d "python-tornado >= 2.2" \
-d "supervisor >= 3.0" \
-d "sysstat" \
-d "python-pycurl" \
-d "python-requests (>= 0.8.2)" \
-d "python-psutil" \
--conflicts "datadog-agent" \
--conflicts "mon-agent < 4.2.0" \
--replaces "datadog-agent-base < 3.4.0" \
--replaces "datadog-agent-lib < $(VERSION)" \
--pre-install datadog-agent-rpm/preinst \
--post-install datadog-agent-rpm/postinst \
--pre-uninstall datadog-agent-rpm/prerm \
--post-uninstall datadog-agent-rpm/postrm \
--posttrans datadog-agent-rpm/posttrans \
--config-files "/etc/dd-agent/supervisor.conf" \
.
chmod 755 $(BUILD)/usr/bin/mon-forwarder
chmod 755 $(BUILD)/var/log/mon-collector
# =====================
# DEBIAN
# =====================
install_deb: install_base install_full
install_deb: install_full
mkdir -p $(BUILD)/etc/init.d
cp datadog-agent-deb/mon-agent.init $(BUILD)/etc/init.d/mon-agent
cp mon-agent-deb/mon-agent.init $(BUILD)/etc/init.d/mon-agent
chmod 755 $(BUILD)/etc/init.d/mon-agent
# Install supervisor config.
cp datadog-agent-deb/supervisor.conf $(BUILD)/etc/dd-agent/supervisor.conf
cp mon-agent-deb/supervisor.conf $(BUILD)/etc/mon-agent/supervisor.conf
# Make the datadog agent debian package that includes supervisor, the forwarder
# Make the mon agent debian package that includes supervisor, the forwarder
# etc.
datadog_agent_deb: clean install_deb
FPM_EDITOR="echo 'Replaces: mon-agent (<= $(VERSION)), datadog-agent, datadog-agent-base (<= $(VERSION)), datadog-agent-lib' >>" \
mon_agent_deb: clean install_deb
FPM_EDITOR="echo 'Replaces: mon-agent (<= $(VERSION)), mon-agent, mon-agent-base (<= $(VERSION)), mon-agent-lib' >>" \
$(FPM_BUILD) -t deb \
-n mon-agent \
-d "python (>= 2.6)" \
@ -158,9 +94,9 @@ $(FPM_BUILD) -t deb \
-d "python-httplib2" \
-d "python-ntplib" \
-d "python-yaml" \
--post-install datadog-agent-deb/postinst \
--post-uninstall datadog-agent-deb/postrm \
--pre-uninstall datadog-agent-deb/prerm \
--post-install mon-agent-deb/postinst \
--post-uninstall mon-agent-deb/postrm \
--pre-uninstall mon-agent-deb/prerm \
.
@ -170,16 +106,9 @@ $(FPM_BUILD) -t deb \
deb:
mkdir -p ../artifacts
make datadog_agent_deb
make mon_agent_deb
cp *.deb ../artifacts
rpm:
mkdir -p ../dist
make datadog_agent_base_rpm
cp *.rpm ../dist
make datadog_agent_rpm
cp *.rpm ../dist
installdeb:
dpkg -i --force-confdef --force-confnew `ls -t ../artifacts/mon-agent_*.deb | head -1`
@ -189,6 +118,5 @@ deb_repo:
tmp:
cp ../artifacts/*.deb /tmp/shared || true
cp ../dist/*.rpm /tmp/shared || true
all: clean deb rpm
all: clean deb

View File

@ -1,228 +0,0 @@
#!/bin/sh
###############################################################################
# datadog-agent
#
# Inspired by Boxed Ice <hello@boxedice.com>
# Forked by Datadog, Inc. <package@datadoghq.com>
#
# Licensed under Simplified BSD License (see LICENSE)
#
###############################################################################
#
# chkconfig: 345 85 15
# description: Datadog Monitoring Agent
### BEGIN INIT INFO
# Provides: datadog-agent
# Short-Description: Start and start datadog-agent
# Description: datadog-agent is the monitoring agent component for Datadog
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
AGENTPATH="/usr/share/datadog/agent/agent.py"
AGENTCONF="/etc/dd-agent/datadog.conf"
DOGSTATSDPATH="/usr/share/datadog/agent/dogstatsd.py"
AGENTUSER="dd-agent"
PIDPATH="/var/run/dd-agent/"
USE_SUPERVISOR="/usr/bin/dd-forwarder"
SUPERVISOR_CONF="/etc/dd-agent/supervisor.conf"
COLLECTOR_PYTHON_PATH="/usr/share/datadog/agent/checks/libs:$PYTHONPATH"
if [ -x "/usr/bin/python2.6" ]; then
PYTHON="/usr/bin/python2.6"
else
PYTHON="/usr/bin/python"
fi
# Source function library.
. /etc/rc.d/init.d/functions
PROG="datadog-agent"
PIDFILE=$PIDPATH/$PROG.pid
SUPERVISOR_PIDFILE=/var/run/datadog-supervisord.pid
LOCKFILE=/var/lock/subsys/$PROG
check_status() {
# run checks to determine if the service is running or use generic status
if [ -f $USE_SUPERVISOR ]; then
# if the sock exists, we can use supervisorctl
if [ -e /var/tmp/datadog-supervisor.sock ]; then
s=`supervisorctl -c $SUPERVISOR_CONF status`
# number of RUNNING supervisord programs (ignoring pup)
p=`echo "$s" | grep -v pup | grep -c RUNNING`
# number of expected running supervisord programs (ignoring pup)
c=`grep -v pup $SUPERVISOR_CONF | grep -c '\[program:'`
if [ "$p" -ne "$c" ]; then
echo "$s"
echo -n "Datadog Agent (supervisor) is NOT running all child processes"; failure; echo
return 1
else
echo -n "Datadog Agent (supervisor) is running all child processes"; success; echo
return 0
fi
else
# if no sock, use the rc status function
status -p $SUPERVISOR_PIDFILE $PROG
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -n "Datadog Agent (supervisor) is running."; success; echo
else
echo -n "Datadog Agent (supervisor) is NOT running."; failure; echo
fi
return $RETVAL
fi
fi
if [ -f "$LOCKFILE" ]; then
echo -n 'Datadog Agent is running'; success; echo
return 0
else
echo -n 'Datadog Agent is NOT running'; failure; echo
return 1
fi
}
grab_status() {
GRABSTATUS=`check_status &>/dev/null`
}
start() {
if [ ! -f $AGENTCONF ]; then
echo "$AGENTCONF not found. Exiting."
exit 3
fi
su $AGENTUSER -c "$AGENTPATH configcheck" > /dev/null
if [ $? -ne 0 ]; then
echo -n $'\n'"Invalid check configuration. Please run sudo /etc/init.d/datadog-agent configtest for more details."
echo -n $'\n'"Resuming starting process."$'\n'
fi
if [ -f $USE_SUPERVISOR ]; then
# no need to test for status before daemon,
# the daemon function does the right thing
echo -n "Starting Datadog Agent (using supervisord):"
daemon --pidfile=$SUPERVISOR_PIDFILE supervisord -c $SUPERVISOR_CONF > /dev/null
# check if the agent is running once per second for 10 seconds
retries=10
while [ $retries -gt 1 ]; do
if grab_status; then
touch $LOCKFILE
success; echo
return 0
else
retries=$(($retries - 1))
sleep 1
fi
done
# after 10 tries the agent didn't start. Report the error and stop
echo; check_status # check status will show us the error and take care of calling `failure`
stop
return 1
else
grab_status
if [ "$?" -eq "0" ]; then
echo -n 'Datadog Agent is already running'; warning; echo
return
fi
echo -n 'Starting Datadog Agent: '
install -d -o $AGENTUSER $PIDPATH
daemon --user $AGENTUSER "env LANG=POSIX env PYTHONPATH=$COLLECTOR_PYTHON_PATH $PYTHON $AGENTPATH start init --clean > /dev/null 2>&1"
RETURNVALUE=$?
daemon --user $AGENTUSER "env LANG=POSIX $PYTHON $DOGSTATSDPATH start > /dev/null 2>&1"
RETURNVALUE=$(($RETURNVALUE || $?))
echo
[ $RETURNVALUE -eq 0 ] && touch $LOCKFILE
return $RETURNVALUE
fi
}
stop() {
if [ -f $USE_SUPERVISOR ]; then
# no need to test for status before killproc,
# it does the right thing. and testing supervisorctl status
# before killproc can lead to states where you cannot stop!
echo -n 'Stopping Datadog Agent (using killproc on supervisord): '
killproc -p $SUPERVISOR_PIDFILE
rm -f $LOCKFILE
echo
else
echo -n 'Stopping Datadog Agent: '
daemon --user $AGENTUSER "env LANG=POSIX $PYTHON $AGENTPATH stop > /dev/null 2>&1"
daemon --user $AGENTUSER "env LANG=POSIX $PYTHON $DOGSTATSDPATH stop > /dev/null 2>&1"
rm -f $LOCKFILE
rm -f $PIDFILE
sleep 5
fi
return 0
}
restart() {
stop
start
}
info() {
shift # Shift 'info' out of the args so we can pass any
# additional options to the real command
# (right now only dd-agent supports additional flags)
FORWARDER_RETURN=0
su $AGENTUSER -c "$AGENTPATH info $@"
COLLECTOR_RETURN=$?
su $AGENTUSER -c "$DOGSTATSDPATH info"
DOGSTATSD_RETURN=$?
if [ -f $USE_SUPERVISOR ]; then
su $AGENTUSER -c "$USE_SUPERVISOR info"
FORWARDER_RETURN=$?
fi
exit $(($FORWARDER_RETURN+$COLLECTOR_RETURN+DOGSTATSD_RETURN))
}
configcheck() {
su $AGENTUSER -c "$AGENTPATH configcheck"
exit $?
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
check_status
;;
info)
info "$@"
;;
configcheck)
configcheck
;;
configtest)
configcheck
;;
jmx)
shift
su $AGENTUSER -c "$AGENTPATH jmx $@"
exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|info|status|configcheck|configtest|jmx}"
exit 2
esac
exit $?

View File

@ -1,17 +0,0 @@
chown -R dd-agent /etc/dd-agent/
chown -R dd-agent /var/log/datadog/
chkconfig --add datadog-agent
/etc/init.d/datadog-agent restart
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
if [ $RETVAL -eq 3 ]; then
# No datadog.conf file is present. The user is probably following
# the step-by-step instructions and will add the config file next.
exit 0
else
exit $RETVAL
fi
fi
exit 0

View File

@ -1,14 +0,0 @@
case "$*" in
0)
# We're uninstalling.
getent passwd dd-agent > /dev/null && userdel dd-agent
getent group dd-agent >/dev/null && groupdel dd-agent
;;
1)
# We're upgrading.
;;
*)
;;
esac
exit 0

View File

@ -1,5 +0,0 @@
getent group dd-agent >/dev/null || groupadd -r dd-agent
getent passwd dd-agent >/dev/null || \
useradd -r -M -g dd-agent -d /usr/share/datadog/agent -s /bin/sh \
-c "Datadog Agent" dd-agent
exit 0

View File

@ -1,5 +0,0 @@
getent group dd-agent >/dev/null || groupadd -r dd-agent
getent passwd dd-agent >/dev/null || \
useradd -r -M -g dd-agent -d /usr/share/datadog/agent -s /bin/sh \
-c "Datadog Agent" dd-agent
exit 0

View File

@ -1,14 +0,0 @@
case "$*" in
0)
# We're uninstalling.
/etc/init.d/datadog-agent stop
;;
1)
# We're upgrading.
/etc/init.d/datadog-agent stop
;;
*)
;;
esac
exit 0

View File

@ -1,18 +0,0 @@
# start
chown -R dd-agent /etc/dd-agent/
chown -R dd-agent /var/log/datadog/
chkconfig --add datadog-agent
/etc/init.d/datadog-agent restart
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
if [ $RETVAL -eq 3 ]; then
# No datadog.conf file is present. The user is probably following
# the step-by-step instructions and will add the config file next.
exit 0
else
exit $RETVAL
fi
fi
exit 0

View File

@ -1,14 +0,0 @@
case "$*" in
0)
# We're uninstalling.
getent passwd dd-agent > /dev/null && userdel dd-agent
getent group dd-agent >/dev/null && groupdel dd-agent
;;
1)
# We're upgrading.
;;
*)
;;
esac
exit 0

View File

@ -1,5 +0,0 @@
getent group dd-agent >/dev/null || groupadd -r dd-agent
getent passwd dd-agent >/dev/null || \
useradd -r -M -g dd-agent -d /usr/share/datadog/agent -s /bin/sh \
-c "Datadog Agent" dd-agent
exit 0

View File

@ -1,21 +0,0 @@
# Just in case there are leftovers from previous installation (we are now using our own
# supervisord)
getent group dd-agent >/dev/null || groupadd -r dd-agent
getent passwd dd-agent >/dev/null || \
useradd -r -M -g dd-agent -d /usr/share/datadog/agent -s /bin/sh \
-c "Datadog Agent" dd-agent
grep -q "datadog" /etc/supervisord.conf
if [ $? -eq 0 ]
then
echo -n "Removing old configuration from system supervisord"
if [ -x "/usr/bin/supervisorctl" ]
then
supervisorctl stop collector
supervisorctl stop forwarder
fi
/usr/share/datadog/agent/setup-supervisor.py /etc/dd-agent/supervisor.conf /etc/supervisord.conf remove
fi
exit 0

View File

@ -1,13 +0,0 @@
case "$*" in
0)
# We're uninstalling.
/etc/init.d/datadog-agent stop
;;
1)
# We're upgrading. Do nothing.
;;
*)
;;
esac
exit 0

View File

@ -1,34 +0,0 @@
#! /usr/bin/python
import sys
import ConfigParser
def main():
if len(sys.argv) < 3 or len(sys.argv) > 4:
return False
source = sys.argv[1]
dest = sys.argv[2]
# Read config files
new_config = ConfigParser.RawConfigParser()
current_config = ConfigParser.RawConfigParser()
new_config.read(source)
current_config.read(dest)
print "Cleaning up supervisord configuration"
# Remove sections from new_config in current_config
for section in new_config.sections():
if current_config.has_section(section):
if section != "supervisorctl" and section != "supervisord":
current_config.remove_section(section)
# Write out config
f = open(dest,'wb')
current_config.write(f)
f.close()
if __name__ == "__main__":
main()

View File

@ -1,61 +0,0 @@
[supervisorctl]
serverurl = unix:///var/tmp/datadog-supervisor.sock
[unix_http_server]
file=/var/tmp/datadog-supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisord]
http_port = /var/tmp/datadog-supervisor.sock
minfds = 1024
minprocs = 200
loglevel = info
logfile = /var/log/supervisor/datadog-supervisord.log
logfile_maxbytes = 50MB
nodaemon = false
pidfile = /var/run/datadog-supervisord.pid
logfile_backups = 10
environment=PYTHONPATH=/usr/share/datadog/agent:/usr/share/datadog/agent/checks,LANG=POSIX
[program:collector]
command=/usr/bin/python2 /usr/share/datadog/agent/agent.py foreground --use-local-forwarder
stdout_logfile=NONE
stderr_logfile=NONE
priority=999
startsecs=5
startretries=3
user=dd-agent
environment=PYTHONPATH='/usr/share/datadog/agent/checks/libs:$PYTHONPATH'
[program:forwarder]
command=/usr/bin/python2 /usr/share/datadog/agent/ddagent.py
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=5
startretries=3
priority=998
user=dd-agent
[program:dogstatsd]
command=/usr/bin/python2 /usr/share/datadog/agent/dogstatsd.py --use-local-forwarder
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=5
startretries=3
priority=998
user=dd-agent
[program:pup]
command=/usr/bin/python2 /usr/share/datadog/agent/pup/pup.py
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=1
startretries=3
priority=998
user=dd-agent
exitcodes=0
[group:datadog-agent]
programs=forwarder,collector,dogstatsd,pup

View File

@ -1,8 +1,6 @@
Datadog Monitoring Agent
The Datadog Monitoring Agent is a lightweight process that monitors system
processes and services, and sends information back to your Datadog account.
Monitoring Agent
The Monitoring Agent is a lightweight process that monitors system
processes and services, and sends information back to your OpenStack monitoring Account.
.
This package installs and runs the advanced Agent daemon, which queues and
forwards metrics from your applications as well as system services.
.
See http://www.datadoghq.com/ for more information

View File

@ -3,7 +3,7 @@
### BEGIN INIT INFO
# Provides: mon-agent
# Short-Description: Start and start mon-agent
# Description: mon-agent is the monitoring Agent component for Datadog
# Description: mon-agent is the monitoring Agent component OpenStack Monitoring
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
@ -13,17 +13,17 @@
. /lib/lsb/init-functions
PATH=$PATH:/sbin # add the location of start-stop-daemon on Debian
AGENTPATH="/usr/bin/dd-agent"
AGENTCONF="/etc/dd-agent/datadog.conf"
AGENTPATH="/usr/bin/mon-collector"
AGENTCONF="/etc/mon-agent/agent.conf"
DOGSTATSDPATH="/usr/bin/dogstatsd"
AGENTUSER="mon-agent"
FORWARDERPATH="/usr/bin/dd-forwarder"
FORWARDERPATH="/usr/bin/mon-forwarder"
NAME="mon-agent"
DESC="Datadog Agent"
DDAGENT_PID_PATH="/var/run/dd-agent"
SUPERVISOR_PIDFILE="/var/run/datadog-supervisord.pid"
SUPERVISOR_FILE="/etc/dd-agent/supervisor.conf"
SUPERVISOR_SOCK="/var/tmp/datadog-supervisor.sock"
DESC="Monitoring Agent"
AGENT_PID_PATH="/var/run/mon-agent.pid"
SUPERVISOR_PIDFILE="/var/run/mon-agent-supervisord.pid"
SUPERVISOR_FILE="/etc/mon-agent/supervisor.conf"
SUPERVISOR_SOCK="/var/tmp/mon-agent-supervisor.sock"
SUPERVISORD=$(which supervisord)
# This script is considered a configuration file and will not be
@ -37,20 +37,20 @@ fi
check_status() {
# If the socket exists, we can use supervisorctl
if [ -e $SUPERVISOR_SOCK ]; then
# If we're using supervisor, check the number of datadog processes
# If we're using supervisor, check the number of processes
# supervisor is currently controlling, and make sure that it's the
# same as the number of programs specified in the supervisor config
# file:
supervisor_processes=$(supervisorctl -c $SUPERVISOR_FILE status)
datadog_supervisor_processes=$(echo "$supervisor_processes" |
supervisor_processes=$(echo "$supervisor_processes" |
grep -v pup |
grep $NAME |
grep -c RUNNING)
supervisor_config_programs=$(grep -v pup $SUPERVISOR_FILE |
grep -c '\[program:')
if [ "$datadog_supervisor_processes" -ne "$supervisor_config_programs" ]; then
if [ "$supervisor_processes" -ne "$supervisor_config_programs" ]; then
echo "$supervisor_processes"
echo "$DESC (supervisor) is NOT running all child processes"
return 1
@ -121,7 +121,7 @@ case "$1" in
info)
shift # Shift 'info' out of args so we can pass any
# addtional options to the real command
# (right now only dd-agent supports additional flags)
# (right now only mon-agent supports additional flags)
su $AGENTUSER -c "$AGENTPATH info $@"
COLLECTOR_RETURN=$?
su $AGENTUSER -c "$DOGSTATSDPATH info"

View File

@ -1,8 +1,8 @@
[supervisorctl]
serverurl = unix:///var/tmp/datadog-supervisor.sock
serverurl = unix:///var/tmp/mon-agent-supervisor.sock
[unix_http_server]
file=/var/tmp/datadog-supervisor.sock
file=/var/tmp/mon-agent-supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
@ -14,21 +14,21 @@ loglevel = info
logfile = /var/log/mon-agent/supervisord.log
logfile_maxbytes = 50MB
nodaemon = false
pidfile = /var/run/datadog-supervisord.pid
pidfile = /var/run/mon-agent-supervisord.pid
logfile_backups = 10
environment=PYTHONPATH='/usr/share/datadog/agent:/usr/share/datadog/agent/checks',LANG=POSIX
environment=PYTHONPATH='/usr/share/mon/agent:/usr/share/mon/agent/checks',LANG=POSIX
[program:collector]
command=/usr/bin/dd-agent foreground
command=/usr/bin/mon-collector foreground
stdout_logfile=NONE
stderr_logfile=NONE
priority=999
startsecs=2
user=mon-agent
environment=LC_ALL=POSIX,PYTHONPATH='/usr/share/datadog/agent/checks/libs:$PYTHONPATH'
environment=LC_ALL=POSIX,PYTHONPATH='/usr/share/mon/agent/checks/libs:$PYTHONPATH'
[program:forwarder]
command=/usr/bin/dd-forwarder
command=/usr/bin/mon-forwarder
stdout_logfile=NONE
stderr_logfile=NONE
startsecs=3

View File

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 612 B

View File

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 522 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,4 +1,3 @@
import platform
import sys
from config import *
from jmxfetch import JMX_FETCH_JAR_NAME
@ -77,11 +76,9 @@ if sys.platform == 'win32':
def __init__(self, **kw):
self.__dict__.update(kw)
self.version = get_version()
self.company_name = 'Datadog, Inc.'
self.copyright = 'Copyright 2013 Datadog, Inc.'
self.cmdline_style = 'pywin32'
agent_svc = Target(name='Datadog Agent', modules='win32.agent', dest_base='ddagent')
agent_svc = Target(name='Mon Agent', modules='win32.agent', dest_base='ddagent')
extra_args = {
'options': {
@ -97,7 +94,7 @@ if sys.platform == 'win32':
'windows': [{'script': 'win32\gui.py',
'dest_base': "agent-manager",
'uac_info': "requireAdministrator", # The manager needs to be administrator to stop/start the service
'icon_resources': [(1, r"packaging\datadog-agent\win32\install_files\dd_agent_win_256.ico")],
'icon_resources': [(1, r"packaging\mon-agent\win32\install_files\dd_agent_win_256.ico")],
}],
'data_files': [
("Microsoft.VC90.CRT", glob(r'C:\Python27\redist\*.*')),
@ -109,12 +106,9 @@ if sys.platform == 'win32':
}
setup(
name='datadog-agent',
name='mon-agent',
version=get_version(),
description="DevOps' best friend",
author='DataDog',
author_email='dev@datadoghq.com',
url='http://www.datadoghq.com',
install_requires=install_requires,
setup_requires=setup_requires,
packages=find_packages(exclude=['ez_setup']),