# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. nagios = { plugin_version = "2.0.1" # 2006-08-02 - GMF - 2.0beta - Initial 2.0; changed to v7 format, and added support for more messages. # 2007-09-13 - 2.0 - KBB - renumbered per new beta policy and changed name from beta_nagios.cfg # 2011-06-24 - 1.0.1 - MSG - Edited info lines. info.1.manufacturer = "Nagios" info.1.device = "Nagios" info.1.version.1 = "" # The name of the log format log.format.format_label = "Nagios Log Format" log.miscellaneous.log_data_type = "generic" log.miscellaneous.log_format_type = "network_device" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "^\\[[0-9]+\\] LOG ROTATION" # The format of dates and times in this log log.format.date_format = "seconds_since_jan1_1970" log.format.time_format = "seconds_since_jan1_1970" # All log field parsing will be done using the parsing filters # log.format.parse_only_with_filters = "true" # Log fields log.fields = { date = "" time = "" type = "" host = "" service = "" status = "" state = "" retry = "" notification_command = "" message = "" contact = "" } # log.fields # Log Parsing Filters log.parsing_filters.parse = ` if (matches_regular_expression(current_log_line(), '^\\\\[([0-9]+)\\\\] ([^:]+): (.*)$')) then ( date = $1; time = $1; type = $2; v.remainder = $3; if (type eq "SERVICE ALERT") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( host = $1; service = $2; status = $3; state = $4; retry = $5; message = $6; ); ); # SERVICE ALERT else if (type eq "CURRENT SERVICE STATE") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( host = $1; service = $2; status = $3; state = $4; retry = $5; message = $6; ); ); # SERVICE ALERT else if (type eq "HOST ALERT") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( host = $1; status = $2; state = $3; retry = $4; message = $5; ); ); else if (type eq "HOST STATE") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( host = $1; status = $2; state = $3; retry = $4; message = $5; ); ); else if (type eq "CURRENT HOST STATE") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( host = $1; status = $2; state = $3; retry = $4; message = $5; ); ); else if (type eq "NOTIFICATION") then ( if (matches_regular_expression(v.remainder, '^([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)$')) then ( contact = $1; host = $2; status = $3; notification_command = $4; message = $5; ); ); ); ` # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" type = "" host = "" service = "" status = "" state = "" retry = "" notification_command = "" message = "" contact = "" } # 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 requires_log_field = false 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 } # nagios