# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. dnsone_dhcp = { # Initial creation - 1.0 # 2010-11-02 - 1.0.1 - MSG - Edited info lines. info.1.manfacturer = "Infoblox" info.1.device = "DNSone DHCP" info.1.version.1 = "" # The name of the log format log.format.format_label = "DNSone DHCP Log Format" log.miscellaneous.log_data_type = "syslog_required" 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 = "dhcpd: DHCPDISCOVER from [0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # An entry in this log is called an "event" in the statistics statistics.miscellaneous.entry_name = "events" # Log fields log.fields = { operation = "" mac_address = "" client_gateway = "" lease_ip = "" interface = "" } # log.fields # # Log Parsing Filters log.parsing_filters = { parse = ` if (matches_regular_expression(v.syslog_message, '^dhcpd: (.*)$')) then ( v.dhcpd_message = $1; if (matches_regular_expression(v.dhcpd_message, '^(DHCPREQUEST) for ([0-9.]+) from ([0-9a-f:]+) \\([^)]+\\) via ([0-9.]*)$')) then ( set_collected_field('', 'operation', $1); set_collected_field('', 'lease_ip', $2); set_collected_field('', 'mac_address', $3); set_collected_field('', 'client_gateway', $4); ); else if (matches_regular_expression(v.dhcpd_message, '^(DHCPDISCOVER|DHCPNAK) from ([0-9a-f:]+) via ([0-9.]+)')) then ( set_collected_field('', 'operation', $1); set_collected_field('', 'mac_address', $2); set_collected_field('', 'client_gateway', $3); ); else if (matches_regular_expression(v.dhcpd_message, '^(DHCPOFFER|DHCPACK) on ([^ ]+) to ([0-9a-f:]+) \\([^)]+\\) via ([0-9.]+)$')) then ( set_collected_field('', 'operation', $1); set_collected_field('', 'lease_ip', $2); set_collected_field('', 'mac_address', $3); set_collected_field('', 'client_gateway', $4); ); else if (matches_regular_expression(v.dhcpd_message, '^(DHCPACK) on ([0-9.]+)$')) then ( set_collected_field('', 'operation', $1); set_collected_field('', 'client_gateway', $3); ); else if (matches_regular_expression(v.dhcpd_message, '^(DHCPINFORM) from ([0-9.]+) via (.*)$')) then ( set_collected_field('', 'operation', $1); set_collected_field('', 'lease_ip', $2); set_collected_field('', 'interface', $3); ); accept_collected_entry('', false); ); ` } # log.parsing_filters # Database fields database.fields = { operation = "" mac_address = "" client_gateway = "" lease_ip = "" interface = "" } # database.fields database.numerical_fields = { events = { label = "$lang_stats.field_labels.events" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # events } # database.numerical_fields 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 create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" operation = true mac_address = true client_gateway = true lease_ip = true interface = true } # report_groups } # create_profile_wizard_options } # dnsone_dhcp