示例#1
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = "exim -bpc"
     self.order = ORDER
     self.definitions = CHARTS
示例#2
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = "OpenCorsairLink.elf --device 0"
     self.order = ORDER
     self.definitions = CHARTS
示例#3
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = "chronyc -n tracking"
     self.order = ORDER
     self.definitions = CHARTS
示例#4
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(
         self, configuration=configuration, name=name)
     self.command = "nsd-control stats_noreset"
     self.order = ORDER
     self.definitions = CHARTS
     self.regex = re.compile(r'([A-Za-z0-9.]+)=(\d+)')
示例#5
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.rgx_smb2 = re.compile(
         r'(smb2_[^:]+|syscall_.*file_bytes):\s+(\d+)')
示例#6
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = "nsd-control stats_noreset"
     self.order = ORDER
     self.definitions = CHARTS
     self.regex = re.compile(r'([A-Za-z0-9.]+)=(\d+)')
示例#7
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.disks = []
     self.definitions = OrderedDict()
     self.hdd_regex = re.compile(
         self.configuration.get('hdd_regex', 'md[0-9]+$'))
     self.command = 'df -P'
     self.chart_name = "df"
示例#8
0
    def check(self):
        check = ExecutableService.check(self)
        data = self._get_data()

        def create_line(prefix, disk):
            return [format_dimemsion_id(prefix, disk), disk, 'absolute']

        charts = [
            dict(id='hdd_avail', text='HDD space available in GB', unit='GB'),
            dict(id='hdd_used', text='HDD space used in GB', unit='GB'),
            dict(id='hdd_used_percentage',
                 text='HDD space used in percent',
                 unit='%'),
            dict(id='hdd_avail_percentage',
                 text='HDD space available in percent',
                 unit='%'),
        ]
        for chart in charts:
            id_ = chart['id']
            self.definitions[id_] = {
                'options': [
                    chart['text'], 'Disks', chart['unit'], 'diskspace', 'df',
                    'line'
                ],
                'lines':
                [create_line(id_, drives) for drives in data['drives']]
            }
        return check
示例#9
0
    def check(self):
        sudo_binary, smbstatus_binary = self.find_binary('sudo'), self.find_binary('smbstatus')

        if not (sudo_binary and smbstatus_binary):
            self.error('Can\'t locate \'sudo\' or \'smbstatus\' binary')
            return False

        self.command = [sudo_binary, '-v']
        err = self._get_raw_data(stderr=True)
        if err:
            self.error(''.join(err))
            return False

        self.command = ' '.join([sudo_binary, '-n', smbstatus_binary, '-P'])

        return ExecutableService.check(self)
示例#10
0
    def check(self):
        sudo_binary, smbstatus_binary = self.find_binary(
            'sudo'), self.find_binary('smbstatus')

        if not (sudo_binary and smbstatus_binary):
            self.error('Can\'t locate \'sudo\' or \'smbstatus\' binary')
            return False

        self.command = [sudo_binary, '-v']
        err = self._get_raw_data(stderr=True)
        if err:
            self.error(''.join(err))
            return False

        self.command = ' '.join([sudo_binary, '-n', smbstatus_binary, '-P'])

        return ExecutableService.check(self)
示例#11
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(
         self, configuration=configuration, name=name)
     self.command = "chronyc -n tracking"
     self.order = ORDER
     self.definitions = CHARTS
示例#12
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.command = "postqueue -p"
     self.order = ORDER
     self.definitions = CHARTS
示例#13
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.rgx_smb2 = re.compile(r'(smb2_[^:]+|syscall_.*file_bytes):\s+(\d+)')