SSSDLog - files matching /var/log/sssd/*.log
¶
- class insights.parsers.sssd_logs.SSSDLog(context)[source]¶
Bases:
LogFileOutput
Parser class for reading SSSD log files. The main work is done by the LogFileOutput super-class.
Note
Please refer to its super-class
insights.core.LogFileOutput
Sample input:
(Tue Feb 14 09:45:02 2017) [sssd] [sbus_remove_timeout] (0x2000): 0x7f5aceb6a970 (Tue Feb 14 09:45:02 2017) [sssd] [sbus_dispatch] (0x4000): dbus conn: 0x7f5aceb5cff0 (Tue Feb 14 09:45:02 2017) [sssd] [sbus_dispatch] (0x4000): Dispatching. (Tue Feb 14 09:45:02 2017) [sssd] [sbus_remove_timeout] (0x2000): 0x7f5aceb63eb0 (Tue Feb 14 09:45:02 2017) [sssd] [sbus_dispatch] (0x4000): dbus conn: 0x7f5aceb578b0 (Tue Feb 14 09:45:02 2017) [sssd] [sbus_dispatch] (0x4000): Dispatching. (Tue Feb 14 09:45:02 2017) [sssd] [sbus_remove_timeout] (0x2000): 0x7f5aceb60f30 (Tue Feb 14 09:45:02 2017) [sssd] [sbus_dispatch] (0x4000): dbus conn: 0x7f5aceb58360 (Tue Feb 14 09:45:06 2015) [sssd] [monitor_hup] (0x0020): Received SIGHUP. (Tue Feb 14 09:45:07 2015) [sssd] [te_server_hup] (0x0020): Received SIGHUP. Rotating logfiles.
Each line is parsed into a dictionary with the following keys:
timestamp - the date of the log line (as a string)
datetime - the date as a datetime object (if conversion is possible)
module - the module logging the message
function - the function within the module
level - the debug level (as a string)
message - the body of the message
raw_message - the raw message before being split.
Examples
>>> logs = shared[SSSDLog]
>>> hups = logs.get("SIGHUP") >>> print len(hups) 2 >>> hups[0]['module'] 'monitor_hup'
- time_format = '%b %d %H:%M:%S %Y'¶
The timestamp format assumed for the log files. A subclass can override this for files that have a different timestamp format. This can be:
A string in strptime() format.
A list of strptime() strings.
A dictionary with each item’s value being a strptime() string. This allows the item keys to provide some form of documentation.