Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.fail2ban.sensor.BanLogParser Class Reference

Public Member Functions

def __init__ (self, log_file)
 
def read_log (self, jail)
 

Public Attributes

 data
 
 ip_regex
 
 log_file
 

Detailed Description

Class to parse fail2ban logs.

Definition at line 116 of file sensor.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.fail2ban.sensor.BanLogParser.__init__ (   self,
  log_file 
)
Initialize the parser.

Definition at line 119 of file sensor.py.

Member Function Documentation

◆ read_log()

def homeassistant.components.fail2ban.sensor.BanLogParser.read_log (   self,
  jail 
)
Read the fail2ban log and find entries for jail.

Definition at line 125 of file sensor.py.

Member Data Documentation

◆ data

homeassistant.components.fail2ban.sensor.BanLogParser.data

Definition at line 122 of file sensor.py.

◆ ip_regex

homeassistant.components.fail2ban.sensor.BanLogParser.ip_regex

Definition at line 123 of file sensor.py.

◆ log_file

homeassistant.components.fail2ban.sensor.BanLogParser.log_file

Definition at line 121 of file sensor.py.


The documentation for this class was generated from the following file: