Exemplo n.º 1
0
    def __init__(self, configuration=None, name=None):
        LogService.__init__(self, configuration=configuration, name=name)

        self.log_path = self.configuration.get('path',
                                               '/var/log/intel_gpu_top.log')
        self.order = ORDER
        self.definitions = CHARTS
Exemplo n.º 2
0
 def __init__(self, configuration=None, name=None):
     """
     :param configuration:
     :param name:
     """
     LogService.__init__(self, configuration=configuration, name=name)
     self.log_type = self.configuration.get('type', 'web')
     self.log_path = self.configuration.get('path')
Exemplo n.º 3
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = dict()
     self.log_path = self.configuration.get('log_path', '/var/log/fail2ban.log')
     self.conf_path = self.configuration.get('conf_path', '/etc/fail2ban/jail.local')
     self.conf_dir = self.configuration.get('conf_dir', '/etc/fail2ban/jail.d/')
     self.exclude = self.configuration.get('exclude')
Exemplo n.º 4
0
 def __init__(self, configuration=None, name=None):
     """
     :param configuration:
     :param name:
     """
     LogService.__init__(self, configuration=configuration, name=name)
     self.log_type = self.configuration.get('type', 'web')
     self.log_path = self.configuration.get('path')
Exemplo n.º 5
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     if len(self.log_path) == 0:
         self.log_path = "/var/log/gunicorn/access.log"
     self.order = ORDER
     self.definitions = CHARTS
     pattern = r'" ([0-9]{3}) '
     #pattern = r'(?:" )([0-9][0-9][0-9]) ?'
     self.regex = re.compile(pattern)
Exemplo n.º 6
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     if len(self.log_path) == 0:
         self.log_path = "/var/log/gunicorn/access.log"
     self.order = ORDER
     self.definitions = CHARTS
     pattern = r'" ([0-9]{3}) '
     #pattern = r'(?:" )([0-9][0-9][0-9]) ?'
     self.regex = re.compile(pattern)
Exemplo n.º 7
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.log_path = self.configuration.get('log_path', '/var/log/fail2ban.log')
     self.conf_path = self.configuration.get('conf_path', '/etc/fail2ban/jail.local')
     self.conf_dir = self.configuration.get('conf_dir', '')
     try:
         self.exclude = self.configuration['exclude'].split()
     except (KeyError, AttributeError):
         self.exclude = []
Exemplo n.º 8
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.log_path = self.configuration.get('log_path', '/var/log/fail2ban.log')
     self.conf_path = self.configuration.get('conf_path', '/etc/fail2ban/jail.local')
     self.conf_dir = self.configuration.get('conf_dir', '')
     try:
         self.exclude = self.configuration['exclude'].split()
     except (KeyError, AttributeError):
         self.exclude = []
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     self.order = ORDER
     self.definitions = dict()
     self.log_path = self.configuration.get('log_path',
                                            '/var/log/fail2ban.log')
     self.conf_path = self.configuration.get('conf_path',
                                             '/etc/fail2ban/jail.local')
     self.conf_dir = self.configuration.get('conf_dir',
                                            '/etc/fail2ban/jail.d/')
     self.exclude = self.configuration.get('exclude')
Exemplo n.º 10
0
    def __init__(self, configuration=None, name=None):
        LogService.__init__(self, configuration=configuration, name=name)
        if len(self.log_path) == 0:
            self.log_path = "/var/log/nginx/access.log"
        self.order = ORDER
        self.definitions = CHARTS
        pattern = r'" ([0-9]{3}) ?'
        #pattern = r'(?:" )([0-9][0-9][0-9]) ?'
        self.regex = re.compile(pattern)

        self.data = {
            '1xx': 0,
            '2xx': 0,
            '3xx': 0,
            '4xx': 0,
            '5xx': 0,
            'other': 0
        }
Exemplo n.º 11
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     # Variables from module configuration file
     self.log_path = self.configuration.get('path')
     self.detailed_response_codes = self.configuration.get(
         'detailed_response_codes', True)
     self.all_time = self.configuration.get('all_time', True)
     self.url_pattern = self.configuration.get('categories')  # dict
     self.regex = None  # will be assigned in 'find_regex' method
     self.resp_time_func = None  # will be assigned in 'find_regex' method
     self._get_data = None  # will be assigned in 'check' method.
     self.order = None  # will be assigned in 'create_*_method' method.
     self.definitions = None  # will be assigned in 'create_*_method' method.
     self.detailed_chart = None  # will be assigned in 'create_*_method' method.
     self.http_method_chart = None  # will be assigned in 'create_*_method' method.
     # sorted list of unique IPs
     self.unique_all_time = list()
     # if there is no new logs this dict  returned to netdata
     self.data = {
         'bytes_sent': 0,
         'resp_length': 0,
         'resp_time_min': 0,
         'resp_time_max': 0,
         'resp_time_avg': 0,
         'unique_cur_ipv4': 0,
         'unique_cur_ipv6': 0,
         '2xx': 0,
         '5xx': 0,
         '3xx': 0,
         '4xx': 0,
         '1xx': 0,
         '0xx': 0,
         'unmatched': 0,
         'req_ipv4': 0,
         'req_ipv6': 0,
         'unique_tot_ipv4': 0,
         'unique_tot_ipv6': 0,
         'successful_requests': 0,
         'redirects': 0,
         'bad_requests': 0,
         'server_errors': 0,
         'other_requests': 0
     }
Exemplo n.º 12
0
 def __init__(self, configuration=None, name=None):
     """
     :param configuration:
     :param name:
     # self._get_data = None  # will be assigned in 'check' method.
     # self.order = None  # will be assigned in 'create_*_method' method.
     # self.definitions = None  # will be assigned in 'create_*_method' method.
     """
     LogService.__init__(self, configuration=configuration, name=name)
     # Variables from module configuration file
     self.type = self.configuration.get('type', 'web_access')
     self.log_path = self.configuration.get('path')
     self.url_pattern = self.configuration.get('categories')  # dict
     self.custom_log_format = self.configuration.get('custom_log_format')  # dict
     # Instance variables
     self.regex = None  # will be assigned in 'find_regex' or 'find_regex_custom' method
     self.data = {'bytes_sent': 0, 'resp_length': 0, 'resp_time_min': 0, 'resp_time_max': 0,
                  'resp_time_avg': 0, 'unique_cur_ipv4': 0, 'unique_cur_ipv6': 0, '2xx': 0,
                  '5xx': 0, '3xx': 0, '4xx': 0, '1xx': 0, '0xx': 0, 'unmatched': 0, 'req_ipv4': 0,
                  'req_ipv6': 0, 'unique_tot_ipv4': 0, 'unique_tot_ipv6': 0, 'successful_requests': 0,
                  'redirects': 0, 'bad_requests': 0, 'server_errors': 0, 'other_requests': 0, 'GET': 0}
Exemplo n.º 13
0
 def __init__(self, configuration=None, name=None):
     """
     :param configuration:
     :param name:
     # self._get_data = None  # will be assigned in 'check' method.
     # self.order = None  # will be assigned in 'create_*_method' method.
     # self.definitions = None  # will be assigned in 'create_*_method' method.
     """
     LogService.__init__(self, configuration=configuration, name=name)
     # Variables from module configuration file
     self.type = self.configuration.get('type', 'web_access')
     self.log_path = self.configuration.get('path')
     self.url_pattern = self.configuration.get('categories')  # dict
     self.custom_log_format = self.configuration.get('custom_log_format')  # dict
     # Instance variables
     self.regex = None  # will be assigned in 'find_regex' or 'find_regex_custom' method
     self.data = {'bytes_sent': 0, 'resp_length': 0, 'resp_time_min': 0, 'resp_time_max': 0,
                  'resp_time_avg': 0, 'unique_cur_ipv4': 0, 'unique_cur_ipv6': 0, '2xx': 0,
                  '5xx': 0, '3xx': 0, '4xx': 0, '1xx': 0, '0xx': 0, 'unmatched': 0, 'req_ipv4': 0,
                  'req_ipv6': 0, 'unique_tot_ipv4': 0, 'unique_tot_ipv6': 0, 'successful_requests': 0,
                  'redirects': 0, 'bad_requests': 0, 'server_errors': 0, 'other_requests': 0, 'GET': 0}
Exemplo n.º 14
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     if len(self.log_path) == 0:
         self.log_path = "/var/log/apache2/cache.log"
     self.order = ORDER
     self.definitions = CHARTS
Exemplo n.º 15
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     self.log_path = self.configuration.get('log_path', '/home/minetest/.minetest/debug.txt')
     self.order = ORDER
     self.definitions = CHARTS
     self.data = {'players': 0, 'actions': 0, 'warnings': 0, 'errors': 0, 'placed_nodes': 0, 'digged_nodes': 0, 'chat_messages': 0}
Exemplo n.º 16
0
 def __init__(self, configuration=None, name=None):
     LogService.__init__(self, configuration=configuration, name=name)
     if len(self.log_path) == 0:
         self.log_path = "/var/log/apache2/cache.log"
     self.order = ORDER
     self.definitions = CHARTS