Exemplo n.º 1
0
    Licensed under Simplified BSD License (see LICENSE)
    (C) Boxed Ice 2010 all rights reserved
    (C) Datadog, Inc. 2010-2013 all rights reserved
"""

# Standard imports
import logging
import signal
import socket
import sys

from six import text_type

# set up logging before importing any other components
import monasca_agent.common.util as util
util.initialize_logging('forwarder')

import os
os.umask(0o22)

# Tornado
import tornado.escape
import tornado.httpclient
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web

# agent import
import monasca_agent.common.config as cfg
import monasca_agent.forwarder.api.monasca_api as mon
Exemplo n.º 2
0
import signal
import sys
import time

# Custom modules
import checks.collector
import checks.services_checks as status_checks
import jmxfetch
import monasca_agent.common.check_status
import monasca_agent.common.config as cfg
import monasca_agent.common.daemon
import monasca_agent.common.emitter
import monasca_agent.common.util as util

# set up logging before importing any other components
util.initialize_logging('collector')
os.umask(022)

# Check we're not using an old version of Python. We need 2.4 above because
# some modules (like subprocess) were only introduced in 2.4.
if int(sys.version_info[1]) <= 3:
    sys.stderr.write("Monasca Agent requires python 2.4 or later.\n")
    sys.exit(2)

# Constants
PID_NAME = "monasca-agent"
WATCHDOG_MULTIPLIER = 10
RESTART_INTERVAL = 4 * 24 * 60 * 60  # Defaults to 4 days
START_COMMANDS = ['start', 'restart', 'foreground']

# Globals
Exemplo n.º 3
0
#!/usr/bin/env python
# (C) Copyright 2015,2016 Hewlett Packard Enterprise Development Company LP
"""
A Python Statsd implementation with dimensions added
"""

# set up logging before importing any other components
import monasca_agent.common.util as util
util.initialize_logging('statsd')

import monasca_agent.common.config as cfg

import monasca_agent.statsd.reporter as reporter
import monasca_agent.statsd.udp as udp

# stdlib
import argparse
import logging
import signal
import sys

# project
import monasca_agent.common.aggregator as agg

log = logging.getLogger('statsd')


class MonascaStatsd(object):
    """This class is the monasca_statsd daemon. """
    def __init__(self, config_path):
        config = cfg.Config()
Exemplo n.º 4
0
    Licensed under Simplified BSD License (see LICENSE)
    (C) Boxed Ice 2010 all rights reserved
    (C) Datadog, Inc. 2010-2013 all rights reserved
"""

# Standard imports
import datetime
import logging
import signal
import socket
import sys

# set up logging before importing any other components
import monasca_agent.common.util as util

util.initialize_logging('forwarder')

import os
os.umask(0o22)

# Tornado
import tornado.escape
import tornado.httpclient
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web

# agent import
import monasca_agent.common.check_status as check_status
import monasca_agent.common.config as cfg
Exemplo n.º 5
0
#!/usr/bin/env python
# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP

"""
A Python Statsd implementation with dimensions added
"""

# set up logging before importing any other components
import monasca_agent.common.util as util
util.initialize_logging('statsd')

import monasca_agent.common.config as cfg

import monasca_agent.statsd.reporter as reporter
import monasca_agent.statsd.udp as udp


# stdlib
import argparse
import logging
import signal
import sys

# project
import monasca_agent.common.aggregator as agg
import monasca_agent.common.check_status as check_status

log = logging.getLogger('statsd')


class MonascaStatsd(object):
Exemplo n.º 6
0
"""
    Licensed under Simplified BSD License (see LICENSE)
    (C) Boxed Ice 2010 all rights reserved
    (C) Datadog, Inc. 2010-2013 all rights reserved
"""

# Standard imports
import logging
import signal
import socket
import sys

# set up logging before importing any other components
import monasca_agent.common.util as util

util.initialize_logging("forwarder")

import os

os.umask(0o22)

# Tornado
import tornado.escape
import tornado.httpclient
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web

# agent import
import monasca_agent.common.config as cfg
Exemplo n.º 7
0
import os
import signal
import sys
import time

# Custom modules
import checks.collector
import checks.services_checks as status_checks
import jmxfetch
import monasca_agent.common.config as cfg
import monasca_agent.common.daemon
import monasca_agent.common.emitter
import monasca_agent.common.util as util

# set up logging before importing any other components
util.initialize_logging("collector")
os.umask(0o22)

# Check we're not using an old version of Python. We need 2.4 above because
# some modules (like subprocess) were only introduced in 2.4.
if int(sys.version_info[1]) <= 3:
    sys.stderr.write("Monasca Agent requires python 2.4 or later.\n")
    sys.exit(2)

# Constants
PID_NAME = "monasca-agent"
START_COMMANDS = ["start", "restart", "foreground"]

# Globals
log = logging.getLogger("collector")