Beispiel #1
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     varnishstat = find_binary('varnishstat')
     self.command = [varnishstat, '-1'] if varnishstat else None
     self.parser = Parser()
Beispiel #2
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.instance_name = configuration.get('instance_name')
     self.parser = Parser()
     self.command = None
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = 'loginctl list-sessions --no-legend'
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #4
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
Beispiel #5
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+)')
Beispiel #6
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
Beispiel #7
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+)')
Beispiel #8
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.command = ['netstat', '-tnpl4']
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #9
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.command = EXIM_COMMAND
Beispiel #10
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = list()
     self.definitions = dict()
     self.megacli = Megacli()
     self.do_battery = self.configuration.get('do_battery')
Beispiel #11
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+)')
    def __init__(self, configuration=None, name=None):
        ExecutableService.__init__(self,
                                   configuration=configuration,
                                   name=name)
        self.order = ORDER

        # All the commands should be run. First command must be complete, others may add arguments from provious commands.
        self.commands_base = ['rosnode list', 'rosnode info']
Beispiel #13
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     self.use_sudo = self.configuration.get('use_sudo', True)
     self.arcconf = None
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     self.binary = find_binary('unbound-control')
     self.data = dict()
     self.command = ''
Beispiel #15
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.instance_name = configuration.get('instance_name')
     self.parser = Parser()
     self.command = None
     self.collected_vbe = set()
     self.collected_storages = set()
Beispiel #16
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self,
                                configuration=configuration,
                                name=name)
     self.order = [self.configuration.get('mount_folder', 'mount_folder')]
     self.definitions = {
         self.configuration.get('mount_folder', 'mount_folder'): {
             'options': [
                 None, 'monitor_nfs_mount_folder', 'folders', 'folders',
                 'mount.folders', 'line'
             ],
             'lines': [['folder_status', None, 'absolute']]
         }
     }
    def __init__(self, configuration=None, name=None):
        ExecutableService.__init__(self, configuration=configuration, name=name)
        #self.order = ORDER
        self.order = list()
        #self.definitions = CHARTS
        self.definitions = dict()
        self.command = EXIM_COMMAND
        #Simulation data
        self.data=None
        #data in json format
        self.json=None
        #json of stripped data to display
	self.ues_json=None
        #values to show at graphs
	self.values=dict()
    def check(self):
        smbstatus_binary = find_binary(SMBSTATUS)
        if not smbstatus_binary:
            self.error("can't locate '{0}' binary".format(SMBSTATUS))
            return False

        if os.getuid() == 0:
            self.command = ' '.join([smbstatus_binary, '-P'])
            return ExecutableService.check(self)

        sudo_binary = find_binary(SUDO)
        if not sudo_binary:
            self.error("can't locate '{0}' binary".format(SUDO))
            return False
        command = [sudo_binary, '-n', '-l', smbstatus_binary, '-P']
        smbstatus = '{0} -P'.format(smbstatus_binary)
        allowed = self._get_raw_data(command=command)
        if not (allowed and allowed[0].strip() == smbstatus):
            self.error(
                "not allowed to run sudo for command '{0}'".format(smbstatus))
            return False
        self.command = ' '.join([sudo_binary, '-n', smbstatus_binary, '-P'])
        return ExecutableService.check(self)
Beispiel #19
0
    def check(self):
        sudo_binary, smbstatus_binary = find_binary('sudo'), 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)
Beispiel #20
0
    def check(self):
        sudo_binary, smbstatus_binary = find_binary('sudo'), 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)
Beispiel #21
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
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = deepcopy(CHARTS)
     self.use_sudo = self.configuration.get('use_sudo', True)
     self.arcconf = None
Beispiel #23
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
Beispiel #24
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.command = "/usr/bin/uptime"
     self.order = ORDER
     self.definitions = CHARTS
Beispiel #25
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = list()
     self.definitions = dict()
     self.do_battery = self.configuration.get('do_battery')
     self.megacli = Megacli()
Beispiel #26
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+)')
Beispiel #27
0
 def __init__(self, configuration=None, name=None):
     ExecutableService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = CHARTS
     self.command = EXIM_COMMAND