def __init__(self, configuration=None, name=None): ExecutableService.__init__(self, configuration=configuration, name=name) self.command = "exim -bpc" self.order = ORDER self.definitions = CHARTS
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
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
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+)')
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+)')
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+)')
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"
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
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)
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)
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
def __init__(self, configuration=None, name=None): ExecutableService.__init__(self, configuration=configuration, name=name) self.command = "postqueue -p" self.order = ORDER self.definitions = CHARTS
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+)')