コード例 #1
0
ファイル: redis.py プロジェクト: emetens/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.queue = self.config.get('queue', 'celery')
        self.db = int(self.config.get('db', 0))

        self.clipath = self.config.get('clipath', '/usr/bin/redis-cli')
コード例 #2
0
ファイル: elasticsearch.py プロジェクト: DKrul/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)
        self.url = self.config.get('url', 'http://localhost:9200').rstrip('\n')
        user = self.config.get('user')
        passwd = self.config.get('password')

        self.client = elasticsearch.ElasticSearch(self.url, user, passwd)
コード例 #3
0
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)
        self.url = self.config.get('url', 'http://localhost:9200').rstrip('\n')
        user = self.config.get('user')
        passwd = self.config.get('password')

        self.client = elasticsearch.ElasticSearch(self.url, user, passwd)
コード例 #4
0
ファイル: basic.py プロジェクト: DKrul/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.devices = self.config.get('devices')

        self.tcache = {}
        self.trc = {}
        self.twc = {}
コード例 #5
0
ファイル: basic.py プロジェクト: emetens/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.devices = self.config.get('devices')

        self.tcache = {}
        self.trc = {}
        self.twc = {}
コード例 #6
0
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.parser = parsers.ApacheLogParser(self.config.get('log_format', 'combined'))

        self.log = follower.LogFollower(self.config['file'],
            parser=self._parser_proxy, history=False)

        self.max_lines = int(self.config.get('max_lines', 2000))
コード例 #7
0
ファイル: nginx.py プロジェクト: calston/tensor
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.parser = parsers.ApacheLogParser(self.config.get('log_format', 'combined'))

        self.log = follower.LogFollower(self.config['file'],
            parser=self._parser_proxy, history=False)

        self.max_lines = int(self.config.get('max_lines', 2000))
コード例 #8
0
ファイル: snmp.py プロジェクト: calston/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        host = self.config.get('ip', '127.0.0.1')
        port = int(self.config.get('port', 161))

        # Must add v3 support

        community = self.config.get('community', None)
        self.snmp = SNMPConnection(host, port, community)
コード例 #9
0
ファイル: rabbitmq.py プロジェクト: jerith/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.last_t = None

        self.ready = {}
        self.unack = {}

        self.last_ready = 0
        self.last_unack = 0
コード例 #10
0
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.last_t = None

        self.ready = {}
        self.unack = {}

        self.last_ready = 0
        self.last_unack = 0
コード例 #11
0
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        host = self.config.get('ip', '127.0.0.1')
        port = int(self.config.get('port', 161))

        # Must add v3 support

        community = self.config.get('community', None)
        self.snmp = SNMPConnection(host, port, community)
コード例 #12
0
    def __init__(self, *a):
        Source.__init__(self, *a)

        parser = parsers.ApacheLogParser(self.config.get('log_format', 'combined'))

        history = self.config.get('history', False)

        self.log = follower.LogFollower(self.config['file'],
            parser=parser.parse, history=history)

        self.max_lines = int(self.config.get('max_lines', 2000))
        self.bucket_res = int(self.config.get('resolution', 10))

        self.bucket = 0
コード例 #13
0
ファイル: nginx.py プロジェクト: calston/tensor
    def __init__(self, *a):
        Source.__init__(self, *a)

        parser = parsers.ApacheLogParser(self.config.get('log_format', 'combined'))

        history = self.config.get('history', False)

        self.log = follower.LogFollower(self.config['file'],
            parser=parser.parse, history=history)

        self.max_lines = int(self.config.get('max_lines', 2000))
        self.bucket_res = int(self.config.get('resolution', 10))

        self.bucket = 0
コード例 #14
0
ファイル: memcache.py プロジェクト: calston/tensor
 def __init__(self, *a, **kw):
     Source.__init__(self, *a, **kw)
     self.host = self.config.get('host', '127.0.0.1')
     self.port = self.config.get('port', 11211)
コード例 #15
0
ファイル: basic.py プロジェクト: hobbeswalsh/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.tcache = {}
        self.trc = {}
        self.twc = {}
コード例 #16
0
ファイル: basic.py プロジェクト: hobbeswalsh/tensor
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.cpu = None
コード例 #17
0
ファイル: memcache.py プロジェクト: emetens/tensor
 def __init__(self, *a, **kw):
     Source.__init__(self, *a, **kw)
     self.host = self.config.get('host', '127.0.0.1')
     self.port = self.config.get('port', 11211)
コード例 #18
0
ファイル: docker.py プロジェクト: calston/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.url = self.config.get('url', 'unix:/var/run/docker.sock')

        self.cache = PersistentCache(location='/tmp/dockerstats.cache')
コード例 #19
0
ファイル: unbound.py プロジェクト: DKrul/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.uc = self.config.get('executable', '/usr/sbin/unbound-control')
コード例 #20
0
ファイル: munin.py プロジェクト: mapleyustat/tensor-3
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.cache = {}
コード例 #21
0
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.cpu = None
コード例 #22
0
ファイル: sensors.py プロジェクト: emetens/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.devices = []
コード例 #23
0
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.url = self.config.get('url', 'http://localhost/haproxy?stats;csv')
        self.user = self.config.get('user', 'haproxy')
        self.password = self.config.get('password', 'stats')
コード例 #24
0
ファイル: unbound.py プロジェクト: calston/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.uc = self.config.get('executable', '/usr/sbin/unbound-control')
コード例 #25
0
ファイル: __init__.py プロジェクト: DKrul/tensor
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.events = self.tensor.eventCounter
        self.rtime = time.time()
コード例 #26
0
ファイル: docker.py プロジェクト: emetens/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.url = self.config.get('url', 'unix:/var/run/docker.sock')

        self.cache = PersistentCache(location='/tmp/dockerstats.cache')
コード例 #27
0
ファイル: __init__.py プロジェクト: emetens/tensor
    def __init__(self, *a):
        Source.__init__(self, *a)

        self.events = self.tensor.eventCounter
        self.rtime = time.time()
コード例 #28
0
ファイル: haproxy.py プロジェクト: calston/tensor
 def __init__(self, *a, **kw):
     Source.__init__(self, *a, **kw)
     
     self.url = self.config.get('url', 'http://localhost/haproxy?stats;csv')
     self.user = self.config.get('user', 'haproxy')
     self.password = self.config.get('password', 'stats')
コード例 #29
0
ファイル: stream.py プロジェクト: emetens/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.client = NexgenClient(self.url, self.key)
コード例 #30
0
 def __init__(self, *a, **kw):
     Source.__init__(self, *a, **kw)
     self.user = self.config.get('user', 'postgres')
     self.password = self.config.get('password', '')
     self.port = self.config.get('port', 5432)
     self.host = self.config.get('host', '127.0.0.1')
コード例 #31
0
ファイル: munin.py プロジェクト: jerith/tensor
    def __init__(self, *a, **kw):
        Source.__init__(self, *a, **kw)

        self.cache = {}