Esempio n. 1
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 2
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog',
                             cls.__name__ + '.pickle')
     else:
         path = os.path.join(tempfile.gettempdir(),
                             cls.__name__ + '.pickle')
     return path
Esempio n. 3
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, cls.__name__ + '.pickle')
Esempio n. 4
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datamonitor')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, cls.__name__ + '.pickle')
Esempio n. 5
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 6
0
 def _get_pickle_path(cls, prefix=""):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'StackState')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, prefix + cls.__name__ + '.pickle')
Esempio n. 7
0
File: jmx.py Progetto: ufou/sd-agent
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Server Density')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 8
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Server Density')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 9
0
 def __init__(self, config, hostname, **options):
     multiprocessing.Process.__init__(self, name='updater')
     self.is_enabled = True
     self.running = True
     self.hostname = hostname
     self.options = options
     self.interval = config['updater_interval']
     self.server = 'updater_server'
     self.post_interval = config['post_interval']
     self.linux_conf = _unix_root_path()
     self.windows_conf = _windows_commondata_path()
     self.central_configuration_switch = config[
         'central_configuration_switch']
     self.central_configuration_api_key = config['api_key']
     self.central_configuration_url = config['m_url'].replace(
         'api/v2/gateway/dd-agent', 'api/v2/agent/config/')
     self.api_url = config['m_url'].replace('api/v2/gateway/dd-agent',
                                            'api/autosync/client/')
     self.dirs = {
         'conf': _windows_commondata_path(),
         'checks': _windows_confd_path()
     }
Esempio n. 10
0
from util import get_os
from config import (get_confd_path, get_config_path, get_config, 
    _windows_commondata_path)

EXCLUDED_WINDOWS_CHECKS = [
    'cacti', 'directory', 'gearmand',
    'hdfs', 'kafka_consumer', 'mcache', 'network',
    'postfix', 'process', 'gunicorn', 'zk',
    ]

MAIN_WINDOW_TITLE = "Datadog Agent Manager"

DATADOG_SERVICE = "DatadogAgent"

STATUS_PAGE_URL = "http://localhost:17125/status"
AGENT_LOG_FILE = osp.join(_windows_commondata_path(), 'Datadog', 'logs', 'ddagent.log')

HUMAN_SERVICE_STATUS = {
    win32service.SERVICE_RUNNING : 'Service is running',
    win32service.SERVICE_START_PENDING : 'Service is starting',
    win32service.SERVICE_STOP_PENDING : 'Service is stopping',
    win32service.SERVICE_STOPPED : 'Service is stopped',
    "Unknown" : "Cannot get service status",
}

REFRESH_PERIOD = 5000

START_AGENT = "Start Agent"
STOP_AGENT = "Stop Agent"
RESTART_AGENT = "Restart Agent"
STATUS_PAGE = "Status page"
Esempio n. 11
0
    "kafka_consumer",
    "marathon",
    "mcache",
    "mesos",
    "network",
    "postfix",
    "process",
    "ssh_check",
    "zk",
]

MAIN_WINDOW_TITLE = "Datadog Agent Manager"

DATADOG_SERVICE = "DatadogAgent"

COLLECTOR_LOG_FILE = os.path.join(_windows_commondata_path(), "Datadog", "logs", "collector.log")
FORWARDER_LOG_FILE = os.path.join(_windows_commondata_path(), "Datadog", "logs", "forwarder.log")
DOGSTATSD_LOG_FILE = os.path.join(_windows_commondata_path(), "Datadog", "logs", "dogstatsd.log")
JMXFETCH_LOG_FILE = os.path.join(_windows_commondata_path(), "Datadog", "logs", "jmxfetch.log")

HUMAN_SERVICE_STATUS = {
    win32service.SERVICE_RUNNING: "Service is running",
    win32service.SERVICE_START_PENDING: "Service is starting",
    win32service.SERVICE_STOP_PENDING: "Service is stopping",
    win32service.SERVICE_STOPPED: "Service is stopped",
    "Unknown": "Cannot get service status",
}

REFRESH_PERIOD = 5000

START_AGENT = "Start Agent"
Esempio n. 12
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog', cls.__name__ + '.pickle')
     else:
         path = os.path.join(tempfile.gettempdir(), cls.__name__ + '.pickle')
     return path
Esempio n. 13
0

log = logging.getLogger(__name__)

EXCLUDED_WINDOWS_CHECKS = [
    'btrfs', 'cacti', 'directory', 'docker', 'gearmand',
    'hdfs', 'kafka_consumer', 'marathon', 'mcache',
    'mesos', 'network', 'postfix', 'process',
    'gunicorn', 'zk', 'ssh_check'
    ]

MAIN_WINDOW_TITLE = "Datadog Agent Manager"

DATADOG_SERVICE = "DatadogAgent"

COLLECTOR_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog', 'logs', 'collector.log')
FORWARDER_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog', 'logs', 'forwarder.log')
DOGSTATSD_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog', 'logs', 'dogstatsd.log')
JMXFETCH_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog', 'logs', 'jmxfetch.log')

HUMAN_SERVICE_STATUS = {
    win32service.SERVICE_RUNNING : 'Service is running',
    win32service.SERVICE_START_PENDING : 'Service is starting',
    win32service.SERVICE_STOP_PENDING : 'Service is stopping',
    win32service.SERVICE_STOPPED : 'Service is stopped',
    "Unknown" : "Cannot get service status",
}

REFRESH_PERIOD = 5000

START_AGENT = "Start Agent"
Esempio n. 14
0
    'hdfs',
    'kafka_consumer',
    'mcache',
    'network',
    'postfix',
    'process',
    'gunicorn',
    'zk',
]

MAIN_WINDOW_TITLE = "Datadog Agent Manager"

DATADOG_SERVICE = "DatadogAgent"

STATUS_PAGE_URL = "http://localhost:17125/status"
AGENT_LOG_FILE = osp.join(_windows_commondata_path(), 'Datadog', 'logs',
                          'ddagent.log')

HUMAN_SERVICE_STATUS = {
    win32service.SERVICE_RUNNING: 'Service is running',
    win32service.SERVICE_START_PENDING: 'Service is starting',
    win32service.SERVICE_STOP_PENDING: 'Service is stopping',
    win32service.SERVICE_STOPPED: 'Service is stopped',
    "Unknown": "Cannot get service status",
}

REFRESH_PERIOD = 5000

START_AGENT = "Start Agent"
STOP_AGENT = "Stop Agent"
RESTART_AGENT = "Restart Agent"
Esempio n. 15
0
    'kafka_consumer',
    'marathon',
    'mcache',
    'mesos',
    'network',
    'postfix',
    'process',
    'ssh_check',
    'zk',
]

MAIN_WINDOW_TITLE = "Datadog Agent Manager"

DATADOG_SERVICE = "DatadogAgent"

COLLECTOR_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog',
                                  'logs', 'collector.log')
FORWARDER_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog',
                                  'logs', 'forwarder.log')
DOGSTATSD_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog',
                                  'logs', 'dogstatsd.log')
JMXFETCH_LOG_FILE = os.path.join(_windows_commondata_path(), 'Datadog', 'logs',
                                 'jmxfetch.log')

HUMAN_SERVICE_STATUS = {
    win32service.SERVICE_RUNNING: 'Service is running',
    win32service.SERVICE_START_PENDING: 'Service is starting',
    win32service.SERVICE_STOP_PENDING: 'Service is stopping',
    win32service.SERVICE_STOPPED: 'Service is stopped',
    "Unknown": "Cannot get service status",
}