Removed all the "jah" and "Jah"
This commit is contained in:
parent
ec189c65f3
commit
6820c9827e
|
@ -1,4 +1,4 @@
|
|||
Source: jahmon-agent
|
||||
Source: mon-agent
|
||||
Priority: extra
|
||||
Section: default
|
||||
Maintainer: HPCloud Monitoring <hpcs-mon@hp.com>
|
||||
|
@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 7),
|
|||
Standards-Version: 3.9.3
|
||||
X-Python-Version: >= 2.6
|
||||
|
||||
Package: jahmon-agent
|
||||
Package: mon-agent
|
||||
Priority: extra
|
||||
Section: default
|
||||
Architecture: all
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
etc/jahmon/supervisor.conf etc/jahmon-agent
|
||||
jahmon/conf.d/*.example etc/jahmon-agent/conf.d
|
||||
jahmon/checks.d/*.py etc/jahmon-agent/checks.d
|
||||
etc/mon/supervisor.conf etc/mon-agent
|
||||
monagent/conf.d/*.example etc/mon-agent/conf.d
|
||||
monagent/checks.d/*.py etc/mon-agent/checks.d
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: jahmon-agent
|
||||
# Short-Description: Start and start jahmon-agent
|
||||
# Description: jahmon-agent is the monitoring Agent component
|
||||
# Provides: mon-agent
|
||||
# Short-Description: Start and start mon-agent
|
||||
# Description: mon-agent is the monitoring Agent component
|
||||
# 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/jahmon-agent"
|
||||
AGENTCONF="/etc/jahmon-agent/datadog.conf"
|
||||
AGENTPATH="/usr/bin/mon-agent"
|
||||
AGENTCONF="/etc/mon-agent/datadog.conf"
|
||||
DOGSTATSDPATH="/usr/bin/dogstatsd"
|
||||
AGENTUSER="jahmon-agent"
|
||||
AGENTUSER="mon-agent"
|
||||
FORWARDERPATH="/usr/bin/dd-forwarder"
|
||||
NAME="jahmon-agent"
|
||||
NAME="mon-agent"
|
||||
DESC="Monitoring Agent"
|
||||
DDAGENT_PID_PATH="/var/run/jahmon-agent"
|
||||
SUPERVISOR_PIDFILE="/var/run/jahmon-agent-supervisord.pid"
|
||||
SUPERVISOR_FILE="/etc/jahmon-agent/supervisor.conf"
|
||||
SUPERVISOR_SOCK="/var/tmp/jahmon-agent-supervisor.sock"
|
||||
DDAGENT_PID_PATH="/var/run/mon-agent"
|
||||
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
|
||||
|
|
|
@ -4,33 +4,33 @@ set -e
|
|||
|
||||
case "$1" in
|
||||
configure)
|
||||
update-rc.d jahmon-agent defaults
|
||||
adduser --system jahmon-agent --disabled-login --shell /bin/sh --no-create-home --quiet
|
||||
usermod -d /usr/share/datadog/agent jahmon-agent
|
||||
mkdir -p /var/log/jahmon-agent
|
||||
mkdir -p /usr/share/pyshared/jahmon-agent/checks.d /usr/share/pyshared/jahmon-agent/conf.d
|
||||
[ ! -e /etc/jahmon-agent/config.py ] && ln -s /usr/share/pyshared/jahmon-agent/config.py /etc/jahmon-agent/config.py
|
||||
[ ! -e /usr/bin/jahmon-agent ] && ln -s /usr/share/pyshared/jahmon-agent/agent.py /usr/bin/jahmon-agent
|
||||
[ ! -e /usr/bin/dogstatsd ] && ln -s /usr/share/pyshared/jahmon-agent/dogstatsd.py /usr/bin/dogstatsd
|
||||
[ ! -e /usr/bin/dd-forwarder ] && ln -s /usr/share/pyshared/jahmon-agent/ddagent.py /usr/bin/dd-forwarder
|
||||
[ ! -d /etc/dd-agent ] && ln -s /etc/jahmon-agent /etc/dd-agent
|
||||
chmod +x /usr/share/pyshared/jahmon-agent/agent.py
|
||||
chmod +x /usr/share/pyshared/jahmon-agent/dogstatsd.py
|
||||
chmod +x /usr/share/pyshared/jahmon-agent/ddagent.py
|
||||
chown root:root /etc/init.d/jahmon-agent
|
||||
chown -R jahmon-agent:root /etc/jahmon-agent
|
||||
chown -R jahmon-agent:root /var/log/jahmon-agent
|
||||
chown -R root:root /usr/share/pyshared/jahmon-agent/
|
||||
update-rc.d mon-agent defaults
|
||||
adduser --system mon-agent --disabled-login --shell /bin/sh --no-create-home --quiet
|
||||
usermod -d /usr/share/datadog/agent mon-agent
|
||||
mkdir -p /var/log/mon-agent
|
||||
mkdir -p /usr/share/pyshared/mon-agent/checks.d /usr/share/pyshared/mon-agent/conf.d
|
||||
[ ! -e /etc/mon-agent/config.py ] && ln -s /usr/share/pyshared/mon-agent/config.py /etc/mon-agent/config.py
|
||||
[ ! -e /usr/bin/mon-agent ] && ln -s /usr/share/pyshared/mon-agent/agent.py /usr/bin/mon-agent
|
||||
[ ! -e /usr/bin/dogstatsd ] && ln -s /usr/share/pyshared/mon-agent/dogstatsd.py /usr/bin/dogstatsd
|
||||
[ ! -e /usr/bin/dd-forwarder ] && ln -s /usr/share/pyshared/mon-agent/ddagent.py /usr/bin/dd-forwarder
|
||||
[ ! -d /etc/dd-agent ] && ln -s /etc/mon-agent /etc/dd-agent
|
||||
chmod +x /usr/share/pyshared/mon-agent/agent.py
|
||||
chmod +x /usr/share/pyshared/mon-agent/dogstatsd.py
|
||||
chmod +x /usr/share/pyshared/mon-agent/ddagent.py
|
||||
chown root:root /etc/init.d/mon-agent
|
||||
chown -R mon-agent:root /etc/mon-agent
|
||||
chown -R mon-agent:root /var/log/mon-agent
|
||||
chown -R root:root /usr/share/pyshared/mon-agent/
|
||||
chown -h root:root /usr/bin/dogstatsd
|
||||
chown -h root:root /usr/bin/jahmon-agent
|
||||
chown -h root:root /usr/bin/mon-agent
|
||||
# chown -h root:root /usr/bin/dd-forwarder
|
||||
|
||||
set +e
|
||||
|
||||
if which invoke-rc.d >/dev/null 2>&1; then
|
||||
invoke-rc.d jahmon-agent restart
|
||||
invoke-rc.d mon-agent restart
|
||||
else
|
||||
/etc/init.d/jahmon-agent restart
|
||||
/etc/init.d/mon-agent restart
|
||||
fi
|
||||
|
||||
RETVAL=$?
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
set -e
|
||||
|
||||
if [ "$1" = purge ]; then
|
||||
update-rc.d jahmon-agent remove
|
||||
deluser jahmon-agent
|
||||
[ -h /usr/bin/jahmon-agent ] && rm /usr/bin/jahmon-agent
|
||||
[ -h /etc/jahmon-agent/config.py ] && rm /etc/jahmon-agent/config.py
|
||||
update-rc.d mon-agent remove
|
||||
deluser mon-agent
|
||||
[ -h /usr/bin/mon-agent ] && rm /usr/bin/mon-agent
|
||||
[ -h /etc/mon-agent/config.py ] && rm /etc/mon-agent/config.py
|
||||
[ -h /usr/bin/dogstatsd ] && rm /usr/bin/dogstatsd
|
||||
|
||||
fi
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
if [ -f /etc/init.d/jahmon-agent ]; then
|
||||
if [ -f /etc/init.d/mon-agent ]; then
|
||||
if which invoke-rc.d >/dev/null 2>&1; then
|
||||
invoke-rc.d jahmon-agent stop || true
|
||||
invoke-rc.d mon-agent stop || true
|
||||
else
|
||||
/etc/init.d/jahmon-agent stop || true
|
||||
/etc/init.d/mon-agent stop || true
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[supervisorctl]
|
||||
serverurl = unix:///var/tmp/jahmon-agent-supervisor.sock
|
||||
serverurl = unix:///var/tmp/mon-agent-supervisor.sock
|
||||
|
||||
[unix_http_server]
|
||||
file=/var/tmp/jahmon-agent-supervisor.sock
|
||||
file=/var/tmp/mon-agent-supervisor.sock
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
@ -11,20 +11,20 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
|||
minfds = 1024
|
||||
minprocs = 200
|
||||
loglevel = info
|
||||
logfile = /var/log/jahmon-agent/supervisord.log
|
||||
logfile = /var/log/mon-agent/supervisord.log
|
||||
logfile_maxbytes = 50MB
|
||||
nodaemon = false
|
||||
pidfile = /var/run/jahmon-agent-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
|
||||
|
||||
[program:collector]
|
||||
command=/usr/bin/jahmon-agent foreground --use-local-forwarder
|
||||
command=/usr/bin/mon-agent foreground --use-local-forwarder
|
||||
stdout_logfile=NONE
|
||||
stderr_logfile=NONE
|
||||
priority=999
|
||||
startsecs=2
|
||||
user=jahmon-agent
|
||||
user=mon-agent
|
||||
environment=LC_ALL=POSIX,PYTHONPATH='/usr/share/datadog/agent/checks/libs:$PYTHONPATH'
|
||||
|
||||
[program:forwarder]
|
||||
|
@ -33,7 +33,7 @@ stdout_logfile=NONE
|
|||
stderr_logfile=NONE
|
||||
startsecs=3
|
||||
priority=998
|
||||
user=jahmon-agent
|
||||
user=mon-agent
|
||||
|
||||
[program:dogstatsd]
|
||||
command=/usr/bin/dogstatsd --use-local-forwarder
|
||||
|
@ -41,7 +41,7 @@ stdout_logfile=NONE
|
|||
stderr_logfile=NONE
|
||||
startsecs=3
|
||||
priority=998
|
||||
user=jahmon-agent
|
||||
user=mon-agent
|
||||
|
||||
#[program:pup]
|
||||
#command=python /usr/share/datadog/agent/pup/pup.py
|
||||
|
@ -53,6 +53,6 @@ user=jahmon-agent
|
|||
#exitcodes=0
|
||||
#environment=PYTHONPATH="/usr/share/datadog/agent:$PYTHONPATH",
|
||||
|
||||
[group:jahmon-agent]
|
||||
[group:mon-agent]
|
||||
#programs=forwarder,collector,dogstatsd,pup
|
||||
programs=collector
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$1" = purge ]; then
|
||||
update-rc.d jahmon-agent remove
|
||||
deluser jahmon-agent
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -1,8 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
if which invoke-rc.d >/dev/null 2>&1; then
|
||||
invoke-rc.d jahmon-agent stop || true
|
||||
else
|
||||
/etc/init.d/jahmon-agent stop || true
|
||||
fi
|
||||
|
|
@ -37,10 +37,10 @@ from daemon import Daemon, AgentSupervisor
|
|||
from emitter import http_emitter
|
||||
from util import Watchdog, PidFile, EC2, get_os
|
||||
from jmxfetch import JMXFetch
|
||||
from jahmon_lib.jahmon_api_emitter import JahmonApiEmitter
|
||||
from mon_lib.mon_api_emitter import MonApiEmitter
|
||||
|
||||
# Constants
|
||||
PID_NAME = "jahmon-agent"
|
||||
PID_NAME = "mon-agent"
|
||||
WATCHDOG_MULTIPLIER = 10
|
||||
RESTART_INTERVAL = 4 * 24 * 60 * 60 # Defaults to 4 days
|
||||
START_COMMANDS = ['start', 'restart', 'foreground']
|
||||
|
@ -171,7 +171,7 @@ class Agent(Daemon):
|
|||
if _is_affirmative(agentConfig.get("send_to_datadog")):
|
||||
emitters.append(http_emitter)
|
||||
elif _is_affirmative(agentConfig.get("send_to_mon_api")):
|
||||
emitters.append(JahmonApiEmitter)
|
||||
emitters.append(MonApiEmitter)
|
||||
return emitters
|
||||
|
||||
def _get_watchdog(self, check_freq, agentConfig):
|
|
@ -46,25 +46,25 @@ class HTTPCheck(AgentCheck):
|
|||
except socket.timeout, e:
|
||||
length = int((time.time() - start) * 1000)
|
||||
self.log.info("%s is DOWN, error: %s. Connection failed after %s ms" % (addr, str(e), length))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
return
|
||||
|
||||
except HttpLib2Error, e:
|
||||
length = int((time.time() - start) * 1000)
|
||||
self.log.info("%s is DOWN, error: %s. Connection failed after %s ms" % (addr, str(e), length))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
return
|
||||
|
||||
except socket.error, e:
|
||||
length = int((time.time() - start) * 1000)
|
||||
self.log.info("%s is DOWN, error: %s. Connection failed after %s ms" % (addr, repr(e), length))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
return
|
||||
|
||||
except Exception, e:
|
||||
length = int((time.time() - start) * 1000)
|
||||
self.log.error("Unhandled exception %s. Connection failed after %s ms" % (str(e), length))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
raise
|
||||
|
||||
if response_time:
|
||||
|
@ -72,7 +72,7 @@ class HTTPCheck(AgentCheck):
|
|||
running_time = time.time() - start
|
||||
tags_rt = tags
|
||||
tags_rt.append('url:%s' % addr)
|
||||
self.gauge('jahmon_http_response_time', running_time, tags=tags_rt)
|
||||
self.gauge('mon_http_response_time', running_time, tags=tags_rt)
|
||||
|
||||
# Add a 'detail' tag if requested
|
||||
if include_content:
|
||||
|
@ -80,16 +80,16 @@ class HTTPCheck(AgentCheck):
|
|||
|
||||
if int(resp.status) >= 400:
|
||||
self.log.info("%s is DOWN, error code: %s" % (addr, str(resp.status)))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
|
||||
if pattern is not None:
|
||||
if re.search(pattern, content, re.DOTALL):
|
||||
self.log.debug("Pattern match successful")
|
||||
else:
|
||||
self.log.info("Pattern match failed! '%s' not in '%s'" % (pattern, content))
|
||||
self.gauge('jahmon_http_status', 1, tags=tags_list)
|
||||
self.gauge('mon_http_status', 1, tags=tags_list)
|
||||
return
|
||||
|
||||
self.log.debug("%s is UP" % addr)
|
||||
self.gauge('jahmon_http_status', 0, tags=tags_list)
|
||||
self.gauge('mon_http_status', 0, tags=tags_list)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue