# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. hpux_audit = { plugin_version = "1.1" plugin_time = "1.5" info.1.manufacturer = "Hewlett Packard" info.1.device = "Audit Log" info.1.version.1 = "" # 2009-05-27 - 1.0 - GMF - Initial implementation # 2009-09-16 - 1.1 - GMF - Added support for SELF-AUDITING TEXT lines and fields # The name of the log format log.format.format_label = "HP UX Audit Log Format" log.miscellaneous.log_data_type = "other" log.miscellaneous.log_format_type = "other" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = '^TIME +PID +E +EVENT +PPID +AID +RUID +RGID +EUID +EGID +TTY' log.format.parse_only_with_filters = "true" # Log fields log.fields = { date = "" time = "" pid = "" event = "" ppid = "" aid = "" ruid = "" rgid = "" euid = "" egid = "" tty = "" user = "" uid = "" audid = "" message = "" events = "" } # log.fields log.parsing_filters.parse = ` # Accept on divider lines: # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (starts_with(current_log_line(), "~")) then ( accept_collected_entry('', false); ); else if (matches_regular_expression(current_log_line(), "^([0-9][0-9])([0-9][0-9])([0-9][0-9]) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9]) +([0-9]+) +([^ ]+) +([0-9]+) +([0-9]+) +([0-9-]+) +([0-9]+) +([0-9]+) +([0-9]+) +([0-9]+) +(.*)$")) then ( set_collected_field('', 'date', '20' . $1 . '-' . $2 . '-' . $3); set_collected_field('', 'time', $4); set_collected_field('', 'pid', $5); set_collected_field('', 'event', $7); set_collected_field('', 'ppid', $8); set_collected_field('', 'aid', $9); set_collected_field('', 'ruid', $10); set_collected_field('', 'rgid', $11); set_collected_field('', 'euid', $12); set_collected_field('', 'egid', $13); set_collected_field('', 'tty', $14); ); # Handle SELF-AUDITING TEXT lines, e.g. # SELF-AUDITING TEXT: User= root uid=0 audid=0 Attempted to login - wrong password else if (matches_regular_expression(current_log_line(), "^SELF-AUDITING TEXT: User= ([^ ]+) (.*)$")) then ( set_collected_field('', 'user', $1); v.remainder = $2; if (matches_regular_expression(v.remainder, "^uid=([0-9]+) audid=([0-9]+) (.*)$")) then ( set_collected_field('', 'uid', $1); set_collected_field('', 'audid', $2); set_collected_field('', 'message', $3); ); else if (matches_regular_expression(v.remainder, "^ (.*)$")) then ( set_collected_field('', 'message', $1); ); else ( set_collected_field('', 'message', v.remainder); ); ); ` # Database fields database.fields = { date_time = "" pid = "" event = "" ppid = "" aid = "" ruid = "" rgid = "" euid = "" egid = "" tty = "" user = "" uid = "" audid = "" message = "" events = "" } # database.fields # Log Filters log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'events = 1;' } # mark_entry } # log.filters database.numerical_fields = { events = { default = true entries_field = true } # events } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" } # report_groups } # create_profile_wizard_options } # hpux_audit