Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions roles/rsyslog/templates/parse_ebauth_to_mysql.py.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/python3
# This script parses the files produced by engineblock and inserts them into a mySQL table where the SURFconext stats module will analyse the data further
# This script is intended to be used during logrotate
# It picks up all files starting with ebauth- (all rotated files) and parses them
# This script parses the authentication log files produced by engineblock and inserts them into two tables:
# - log_logins: contains login events from engineblock and stepup-gateway, and is there for use manually querying logins.
# There is no further processing done on this table.
# A daily cronjob runs clean_loglogins.j2 to remove old logins from the log_logins table.
# - last_login: contains the last login date for each user. This is used for deprovisioning (lifecycle)
#
# This script is intended to be used during logrotate with the delaycompress option set.
# It picks up all files starting with ebauth- that do not end in .gz and parses them

import os
import sys
Expand Down
12 changes: 8 additions & 4 deletions roles/rsyslog/templates/parse_stepupauth_to_mysql.py.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/python3
# This script parses rotated stepup-authentication.log files produced by engineblock.
# It filters for successful logins (authentication_result:OK) and inserts the data
# into the log_logins and last_login MySQL tables.
# This script is intended to be run separately during logrotate.
# This script parses the authentication log files produced by stepup-gateway and inserts them into two tables:
# - log_logins: contains login events from engineblock and stepup-gateway, and is there for use manually querying logins.
# There is no further processing done on this table.
# A daily cronjob runs clean_loglogins.j2 to remove old logins from the log_logins table.
# - last_login: contains the last login date for each user. This is used for deprovisioning (lifecycle)
#
# This script is intended to be used during logrotate with the delaycompress option set.
# It picks up all files starting with stepup-authentication.log- that do not end in .gz and parses them

import os
import sys
Expand Down