示例#1
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge("datadog.agent.collector.collection.time")
     self.gauge("datadog.agent.emitter.emit.time")
     self.gauge("datadog.agent.collector.threads.count")
     self.gauge("datadog.agent.collector.cpu.used")
示例#2
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.cpu.user')
     self.gauge('system.cpu.idle')
     self.gauge('system.cpu.interrupt')
     self.gauge('system.cpu.system')
示例#3
0
文件: win32.py 项目: DataDog/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.counter("system.cpu.user")
        self.counter("system.cpu.idle")
        self.counter("system.cpu.system")
        self.counter("system.cpu.interrupt")
示例#4
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.os_wmi_sampler = WMISampler(
            logger,
            "Win32_OperatingSystem",
            ["TotalVisibleMemorySize", "FreePhysicalMemory"]
        )
        self.mem_wmi_sampler = WMISampler(
            logger,
            "Win32_PerfRawData_PerfOS_Memory",
            ["CacheBytes", "CommittedBytes", "PoolPagedBytes", "PoolNonpagedBytes"])

        self.gauge('system.mem.free')
        self.gauge('system.mem.used')
        self.gauge('system.mem.total')
        # area of physical memory that stores recently used pages of data
        # for applications
        self.gauge('system.mem.cached')
        # Committed memory is physical memory for which space has been
        # reserved on the disk paging file in case it must be written
        # back to disk
        self.gauge('system.mem.committed')
        # physical memory used by the operating system, for objects
        # that can be written to disk when they are not being used
        self.gauge('system.mem.paged')
        # physical memory used by the operating system for objects that
        # cannot be written to disk, but must remain in physical memory
        # as long as they are allocated.
        self.gauge('system.mem.nonpaged')
        # usable = free + cached
        self.gauge('system.mem.usable')
        self.gauge('system.mem.pct_usable')
示例#5
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.networkTrafficStore = {}
        self.networkTrafficStore["last_ts"] = time.time()
        self.networkTrafficStore["current_ts"] = self.networkTrafficStore[
            "last_ts"]
示例#6
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.disk.free')
     self.gauge('system.disk.total')
     self.gauge('system.disk.in_use')
     self.gauge('system.disk.used')
示例#7
0
文件: win32.py 项目: ufou/sd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.counter('system.cpu.user')
        self.counter('system.cpu.idle')
        self.counter('system.cpu.system')
        self.counter('system.cpu.interrupt')
示例#8
0
    def __init__(self):
        super(Http, self).__init__()
        self.check = Check()

        configuration = Config()
        self.average_threshold = int(
            configuration.parse_config("Ressie", "http_average_coefficient"))
示例#9
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('datadog.agent.collector.collection.time')
     self.gauge('datadog.agent.emitter.emit.time')
     self.gauge('datadog.agent.collector.threads.count')
     self.gauge('datadog.agent.collector.cpu.used')
示例#10
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.gauge('system.proc.queue_length')
        self.gauge('system.proc.count')
        self.numprocs = WinPDHCounter('System', 'Processes', logger)
        self.pql = WinPDHCounter('System', 'Processor Queue Length', logger)
示例#11
0
文件: win32.py 项目: Tokutek/dd-agent
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.disk.free')
     self.gauge('system.disk.total')
     self.gauge('system.disk.in_use')
     self.gauge('system.disk.used')
示例#12
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.gauge('system.mem.free')
        self.gauge('system.mem.used')
        self.gauge('system.mem.total')
        # area of physical memory that stores recently used pages of data
        # for applications
        self.gauge('system.mem.cached')
        # Committed memory is physical memory for which space has been
        # reserved on the disk paging file in case it must be written
        # back to disk
        self.gauge('system.mem.committed')
        # physical memory used by the operating system, for objects
        # that can be written to disk when they are not being used
        self.gauge('system.mem.paged')
        # physical memory used by the operating system for objects that
        # cannot be written to disk, but must remain in physical memory
        # as long as they are allocated.
        self.gauge('system.mem.nonpaged')
        # usable = free + cached
        self.gauge('system.mem.usable')
        self.gauge('system.mem.pct_usable')
        #  details about the usage of the pagefile.
        self.gauge('system.mem.pagefile.total')
        self.gauge('system.mem.pagefile.used')
        self.gauge('system.mem.pagefile.free')
        self.gauge('system.mem.pagefile.pct_free')

        self.cache_bytes_counter = WinPDHCounter('Memory', 'Cache Bytes', logger)
        self.committed_bytes_counter = WinPDHCounter('Memory', 'Committed Bytes', logger)
        self.pool_paged_bytes_counter = WinPDHCounter('Memory', 'Pool Paged Bytes', logger)
        self.pool_non_paged_bytes_counter = WinPDHCounter('Memory', 'Pool Nonpaged Bytes', logger)
示例#13
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.os_wmi_sampler = WMISampler(
            logger, "Win32_OperatingSystem",
            ["TotalVisibleMemorySize", "FreePhysicalMemory"])
        self.mem_wmi_sampler = WMISampler(
            logger, "Win32_PerfRawData_PerfOS_Memory", [
                "CacheBytes", "CommittedBytes", "PoolPagedBytes",
                "PoolNonpagedBytes"
            ])

        self.gauge('system.mem.free')
        self.gauge('system.mem.used')
        self.gauge('system.mem.total')

        self.gauge('system.mem.cached')

        self.gauge('system.mem.committed')

        self.gauge('system.mem.paged')

        self.gauge('system.mem.nonpaged')
        self.gauge('system.mem.usable')
        self.gauge('system.mem.pct_usage')
示例#14
0
文件: win32.py 项目: zt706/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.os_wmi_sampler = WMISampler(
            logger, "Win32_OperatingSystem",
            ["TotalVisibleMemorySize", "FreePhysicalMemory"])
        self.mem_wmi_sampler = WMISampler(
            logger, "Win32_PerfRawData_PerfOS_Memory", [
                "CacheBytes", "CommittedBytes", "PoolPagedBytes",
                "PoolNonpagedBytes"
            ])

        self.gauge('system.mem.free')
        self.gauge('system.mem.used')
        self.gauge('system.mem.total')
        # area of physical memory that stores recently used pages of data
        # for applications
        self.gauge('system.mem.cached')
        # Committed memory is physical memory for which space has been
        # reserved on the disk paging file in case it must be written
        # back to disk
        self.gauge('system.mem.committed')
        # physical memory used by the operating system, for objects
        # that can be written to disk when they are not being used
        self.gauge('system.mem.paged')
        # physical memory used by the operating system for objects that
        # cannot be written to disk, but must remain in physical memory
        # as long as they are allocated.
        self.gauge('system.mem.nonpaged')
        # usable = free + cached
        self.gauge('system.mem.usable')
        self.gauge('system.mem.pct_usable')
示例#15
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.counter('system.cpu.user')
     self.counter('system.cpu.idle')
     self.gauge('system.cpu.interrupt')
     self.counter('system.cpu.system')
示例#16
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        self.mysqlVersion = None
        self.db = None
        self.logger = logger
        self.slowProcessThreshold = 5
        self.replicationUser = '******'

        # Register metrics
        self.counter("mysqlConnections")
        self.gauge("mysqlCreatedTmpDiskTables")
        self.gauge("mysqlMaxUsedConnections")
        self.gauge("mysqlOpenFiles")
        self.counter("mysqlSlowQueries")
        self.counter("mysqlQuestions")
        self.counter("mysqlQueries")
        self.gauge("mysqlSlowProcessCount")
        self.gauge("mysqlSlowProcessMax")
        self.gauge("mysqlTableLocksWaited")
        self.gauge("mysqlThreadsConnected")
        self.gauge("mysqlSecondsBehindMaster")

        self.counter("mysqlInnodbDataReads")
        self.counter("mysqlInnodbDataWrites")
        self.counter("mysqlInnodbOsLogFsyncs")

        self.counter("mysqlUserTime")
        self.counter("mysqlKernelTime")
示例#17
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.io.wkb_s')
     self.gauge('system.io.w_s')
     self.gauge('system.io.rkb_s')
     self.gauge('system.io.r_s')
     self.gauge('system.io.avg_q_sz')
示例#18
0
文件: unix.py 项目: d1rk/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)
        self.solaris_re = re.compile("([ro]bytes64)|errors|collisions")

        # FIXME rework linux support to use the built-in Check logic
        self.networkTrafficStore = {}
        self.networkTrafficStore["last_ts"] = time.time()
        self.networkTrafficStore["current_ts"] = self.networkTrafficStore["last_ts"]
示例#19
0
 def __init__(self, logger):
     """Declare a single gauge that will record the second value of its invocation"""
     # Super-initialization
     Check.__init__(self, logger)
     self.logger.info("Initializing custom check %s" % self.__class__)
     # Declare which metric(s) you want to save
     self.gauge("dd.custom.agent.second")
     self.counter("dd.custom.agent.check_rate")
示例#20
0
文件: win32.py 项目: DataDog/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.wmi_sampler = WMISampler(logger, "Win32_PerfRawData_PerfOS_System", ["ProcessorQueueLength", "Processes"])

        self.gauge("system.proc.queue_length")
        self.gauge("system.proc.count")
示例#21
0
 def __init__(self, logger):
     """Declare a single gauge that will record the second value of its invocation"""
     # Super-initialization
     Check.__init__(self, logger)
     self.logger.info("Initializing custom check %s" % self.__class__)
     # Declare which metric(s) you want to save
     self.gauge("dd.custom.agent.second")
     self.counter("dd.custom.agent.check_rate")
示例#22
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.io.wkb_s')
     self.gauge('system.io.w_s')
     self.gauge('system.io.rkb_s')
     self.gauge('system.io.r_s')
     self.gauge('system.io.avg_q_sz')
示例#23
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.disk.free')
     self.gauge('system.disk.total')
     self.gauge('system.disk.in_use')
     self.gauge('system.disk.used')
     self.counter("system.disk.read_time_pct")
     self.counter("system.disk.write_time_pct")
示例#24
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.wmi_sampler = WMISampler(
            logger, "Win32_PerfRawData_Tcpip_NetworkInterface",
            ["Name", "BytesReceivedPerSec", "BytesSentPerSec"])

        self.gauge('system.net.bytes_rcvd')
        self.gauge('system.net.bytes_sent')
示例#25
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.disk.free')
     self.gauge('system.disk.total')
     self.gauge('system.disk.in_use')
     self.gauge('system.disk.used')
     self.counter("system.disk.read_time_pct")
     self.counter("system.disk.write_time_pct")
示例#26
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.wmi_sampler = WMISampler(logger,
                                      "Win32_PerfRawData_PerfOS_System",
                                      ["ProcessorQueueLength", "Processes"])

        self.gauge('system.proc.queue_length')
        self.gauge('system.proc.count')
示例#27
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.counter('system.cpu.user')
        self.counter('system.cpu.idle')
        self.counter('system.cpu.system')
        self.counter('system.cpu.interrupt')

        self.cpu_interrupt_counter = WinPDHCounter('Processor', '% Interrupt Time', logger, instance_name="_Total")
示例#28
0
文件: win32.py 项目: DataDog/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.wmi_sampler = WMISampler(
            logger, "Win32_PerfRawData_Tcpip_NetworkInterface", ["Name", "BytesReceivedPerSec", "BytesSentPerSec"]
        )

        self.gauge("system.net.bytes_rcvd")
        self.gauge("system.net.bytes_sent")
示例#29
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        def generate_metric(name, xtype, *args):
            if xtype == "counter":
                self.counter(name)
            else:
                self.gauge(name)

        self._map_metric(generate_metric)
示例#30
0
文件: win32.py 项目: WPMedia/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.wmi_sampler = WMISampler(logger, "Win32_PerfRawData_PerfOS_Processor", ["Name", "PercentInterruptTime"])

        self.counter("system.cpu.user")
        self.counter("system.cpu.idle")
        self.gauge("system.cpu.interrupt")
        self.counter("system.cpu.system")
示例#31
0
文件: win32.py 项目: Tokutek/dd-agent
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.mem.free')
     self.gauge('system.mem.used')
     self.gauge('system.mem.total')
     self.gauge('system.mem.cached')
     self.gauge('system.mem.committed')
     self.gauge('system.mem.paged')
     self.gauge('system.mem.nonpaged')
示例#32
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.mem.free')
     self.gauge('system.mem.used')
     self.gauge('system.mem.total')
     self.gauge('system.mem.cached')
     self.gauge('system.mem.committed')
     self.gauge('system.mem.paged')
     self.gauge('system.mem.nonpaged')
示例#33
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     macV = None
     if sys.platform == 'darwin':
         macV = platform.mac_ver()
         macV_minor_version = int(re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))
     
     # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
     if macV and (macV_minor_version >= 6):
         self.topIndex = 6
     else:
         self.topIndex = 5
示例#34
0
文件: win32.py 项目: zt706/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)

        # Sampler(s)
        self.wmi_sampler = WMISampler(logger,
                                      "Win32_PerfRawData_PerfOS_Processor",
                                      ["Name", "PercentInterruptTime"])

        self.counter('system.cpu.user')
        self.counter('system.cpu.idle')
        self.gauge('system.cpu.interrupt')
        self.counter('system.cpu.system')
示例#35
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == 'darwin':
            macV = platform.mac_ver()
            macV_minor_version = int(
                re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))

        # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5
示例#36
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.gauge('system.io.wkb_s')
        self.gauge('system.io.w_s')
        self.gauge('system.io.rkb_s')
        self.gauge('system.io.r_s')
        self.gauge('system.io.avg_q_sz')

        self.dwbpscounter = WinPDHCounter('LogicalDisk', 'Disk Write Bytes/sec', logger)
        self.dwpscounter = WinPDHCounter('LogicalDisk', 'Disk Writes/sec', logger)
        self.drbpscounter = WinPDHCounter('LogicalDisk', 'Disk Read Bytes/sec', logger)
        self.drpscounter = WinPDHCounter('LogicalDisk', 'Disk Reads/sec', logger)
        self.qszcounter = WinPDHCounter('LogicalDisk', 'Current Disk Queue Length', logger)
示例#37
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.wmi_sampler = WMISampler(
            logger, "Win32_PerfRawData_PerfDisk_LogicalDisk", [
                "Name", "DiskWriteBytesPerSec", "DiskWritesPerSec",
                "DiskReadBytesPerSec", "DiskReadsPerSec",
                "CurrentDiskQueueLength"
            ])

        self.gauge('system.io.wkb_s')
        self.gauge('system.io.w_s')
        self.gauge('system.io.rkb_s')
        self.gauge('system.io.r_s')
        self.gauge('system.io.avg_q_sz')
示例#38
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        #  Sampler(s)
        self.wmi_sampler = WMISampler(
            logger,
            "Win32_PerfRawData_PerfDisk_LogicalDisk",
            ["Name", "DiskWriteBytesPerSec", "DiskWritesPerSec", "DiskReadBytesPerSec",
             "DiskReadsPerSec", "CurrentDiskQueueLength"]
        )

        self.gauge('system.io.wkb_s')
        self.gauge('system.io.w_s')
        self.gauge('system.io.rkb_s')
        self.gauge('system.io.r_s')
        self.gauge('system.io.avg_q_sz')
示例#39
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == 'darwin':
            macV = platform.mac_ver()
            macV_minor_version = int(re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))

        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5

        self.pagesize = 0
        if sys.platform == 'sunos5':
            try:
                pgsz, _, _ = get_subprocess_output(['pagesize'], self.logger)
                self.pagesize = int(pgsz.strip())
            except Exception:
                pass
示例#40
0
文件: unix.py 项目: hungld/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == "darwin":
            macV = platform.mac_ver()
            macV_minor_version = int(re.match(r"10\.(\d+)\.?.*", macV[0]).group(1))

        # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5

        self.pagesize = 0
        if sys.platform == "sunos5":
            try:
                pgsz = sp.Popen(["pagesize"], stdout=sp.PIPE, close_fds=True).communicate()[0]
                self.pagesize = int(pgsz.strip())
            except Exception:
                # No page size available
                pass
示例#41
0
文件: unix.py 项目: motusllc/dd-agent
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == 'darwin':
            macV = platform.mac_ver()
            macV_minor_version = int(re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))

        # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5

        self.pagesize = 0
        if sys.platform == 'sunos5':
            try:
                pgsz, _, _ = get_subprocess_output(['pagesize'], self.logger)
                self.pagesize = int(pgsz.strip())
            except Exception:
                # No page size available
                pass
示例#42
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == 'darwin':
            macV = platform.mac_ver()
            macV_minor_version = int(re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))

        # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5

        self.pagesize = 0
        if sys.platform == 'sunos5':
            try:
                pgsz, _, _ = get_subprocess_output(['pagesize'], self.logger)
                self.pagesize = int(pgsz.strip())
            except Exception:
                # No page size available
                pass
示例#43
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.mem.free')
     self.gauge('system.mem.used')
     self.gauge('system.mem.total')
     # area of physical memory that stores recently used pages of data
     # for applications
     self.gauge('system.mem.cached')
     # Committed memory is physical memory for which space has been
     # reserved on the disk paging file in case it must be written
     # back to disk
     self.gauge('system.mem.committed')
     # physical memory used by the operating system, for objects
     # that can be written to disk when they are not being used
     self.gauge('system.mem.paged')
     # physical memory used by the operating system for objects that
     # cannot be written to disk, but must remain in physical memory
     # as long as they are allocated.
     self.gauge('system.mem.nonpaged')
     # usable = free + cached
     self.gauge('system.mem.usable')
     self.gauge('system.mem.pct_usable')
示例#44
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.mem.free')
     self.gauge('system.mem.used')
     self.gauge('system.mem.total')
     # area of physical memory that stores recently used pages of data
     # for applications
     self.gauge('system.mem.cached')
     # Committed memory is physical memory for which space has been
     # reserved on the disk paging file in case it must be written
     # back to disk
     self.gauge('system.mem.committed')
     # physical memory used by the operating system, for objects
     # that can be written to disk when they are not being used
     self.gauge('system.mem.paged')
     # physical memory used by the operating system for objects that
     # cannot be written to disk, but must remain in physical memory
     # as long as they are allocated.
     self.gauge('system.mem.nonpaged')
     # usable = free + cached
     self.gauge('system.mem.usable')
     self.gauge('system.mem.pct_usable')
示例#45
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        macV = None
        if sys.platform == 'darwin':
            macV = platform.mac_ver()
            macV_minor_version = int(re.match(r'10\.(\d+)\.?.*', macV[0]).group(1))
        
        # Output from top is slightly modified on OS X 10.6 (case #28239) and greater
        if macV and (macV_minor_version >= 6):
            self.topIndex = 6
        else:
            self.topIndex = 5

        self.pagesize = 0
        if sys.platform == 'sunos5':
            try:
                pgsz = sp.Popen(['pagesize'],
                                        stdout=sp.PIPE,
                                        close_fds=True).communicate()[0]
                self.pagesize = int(pgsz.strip())
            except Exception:
                # No page size available
                pass
示例#46
0
    def __init__(self, logger):
        Check.__init__(self, logger)
        self.mysqlVersion = None
        self.db = None
        self.logger = logger

        # Register metrics
        self.counter("mysqlConnections")
        self.gauge("mysqlCreatedTmpDiskTables")
        self.gauge("mysqlMaxUsedConnections")
        self.gauge("mysqlOpenFiles")
        self.counter("mysqlSlowQueries")
        self.counter("mysqlQuestions")
        self.counter("mysqlQueries")
        self.gauge("mysqlTableLocksWaited")
        self.gauge("mysqlThreadsConnected")
        self.gauge("mysqlSecondsBehindMaster")

        self.counter("mysqlInnodbDataReads")
        self.counter("mysqlInnodbDataWrites")
        self.counter("mysqlInnodbOsLogFsyncs")

        self.counter("mysqlUserTime")
        self.counter("mysqlKernelTime")
示例#47
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.header_re = re.compile(r'([%\\/\-_a-zA-Z0-9]+)[\s+]?')
     self.item_re   = re.compile(r'^([a-zA-Z0-9\/]+)')
     self.value_re  = re.compile(r'\d+\.\d+')
示例#48
0
 def __init__(self, logger):
     Check.__init__(self, logger)
示例#49
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.gauge('system.proc.queue_length')
     self.gauge('system.proc.count')
示例#50
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.gauge('system.proc.queue_length')
     self.gauge('system.proc.count')
示例#51
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.net.bytes_rcvd')
     self.gauge('system.net.bytes_sent')
示例#52
0
 def __init__(self, logger):
     Check.__init__(self, logger)
示例#53
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.logger = logger
     self.gauge('system.net.bytes_rcvd')
     self.gauge('system.net.bytes_sent')
示例#54
0
文件: unix.py 项目: remh/dd-agent
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.header_re = re.compile(r'([%\\/\-_a-zA-Z0-9]+)[\s+]?')
     self.item_re = re.compile(r'^([a-zA-Z0-9\/]+)')
     self.value_re = re.compile(r'\d+\.\d+')
示例#55
0
    def __init__(self, logger):
        Check.__init__(self, logger)

        self.networkTrafficStore = {}
        self.networkTrafficStore["last_ts"] = time.time()
        self.networkTrafficStore["current_ts"] = self.networkTrafficStore["last_ts"]
示例#56
0
 def __init__(self, logger):
     Check.__init__(self, logger)
     self.db = None
     self.rrd_path = None
     self.logger = logger
     self.last_ts = {}