Code: Select all
{:timestamp=>"2020-06-15T12:18:53.660000-0400", :message=>"The given configuration is invalid. Reason: Expected one of #, ( at line 198, column 13 (byte 6105) after filter {\n if [type] == 'asa' {\n grok{\n match => [ 'message', '<%{POSINT:syslog_pri}>%{MONTH} +%{MONTHDAY} %{YEAR} %{TIME}: %%{WORD:LogType}-%{INT:LogSeverity}-%{INT:LogMessageNumber}: Group = (%{USERNAME:Group}|%{IP:Group}), Username = %{IPORHOST:username}, IP = %{IP:IPAddress}, Session disconnected. Session Type: %{NOTSPACE:SessionType}, Duration: (%NUMBER:DurationDays}d ?)?%{NUMBER:DurationHours}h:%{NUMBER:DurationMinutes}m:%{NUMBER:DurationSeconds}s, Bytes xmt: %{INT:BytesTransmitted:int}, Bytes rcv: %{INT:BytesReceived:int}, Reason: %{GREEDYDATA:Reason}' ]\n }\n geoip {\n # database => \"/usr/share/GeoIP/GeoLiteCity.dat\"\n source => \"IPAddress\"\n }\n }\n if [program] == 'apache_access' {\n grok {\n match => [ 'message', '%{COMBINEDAPACHELOG}']\n }\n date {\n match => [ 'timestamp', 'dd/MMM/yyyy:HH:mm:ss Z' ]\n }\n mutate {\n replace => [ 'type', 'apache_access' ]\n convert => [ 'bytes', 'integer' ]\n convert => [ 'response', 'integer' ]\n }\n }\n \n if [program] == 'apache_error' {\n grok {\n match => [ 'message', '\\[(?<timestamp>%{DAY:day} %{MONTH:month} %{MONTHDAY} %{TIME} %{YEAR})\\] \\[%{WORD:class}\\] \\[%{WORD:originator} %{IP:clientip}\\] %{GREEDYDATA:errmsg}']\n }\n mutate {\n replace => [ 'type', 'apache_error' ]\n }\n }\n if [program] == \"mysqld_log\" {\n grok {\n match => [ \"message\", \"^%{NUMBER:date} *%{NOTSPACE:time}\"]\n }\n mutate {\n replace => [ \"type\", \"mysqld_log\" ]\n }\n }\n if [host] == '172.30.100.226' {\n \n grok {\n \n match => { \"message\" => \"result=\\\"%{WORD:result}\\\" ip=\\\"%{IP:IP}\\\" action=\\\"%{WORD:action}\\\" params=\\\"Username: %{USER:params}\\\" user=\\\"%{USER:user}\\\" tenant=\\\"%{WORD:tenant}\\\"\"}\n match => { \"message\" => \"result=\\\"%{WORD:result}\\\" ip=\\\"%{IP:IP}\\\" action=\\\"%{WORD:action}\\\" params=\\\"Username=%{USER:params}\\\" user=\\\"%{USER:user}\\\" tenant=\\\"%{WORD:tenant}\\\"\"}\n }\n mutate {\n replace => { \"Ipaddress\" => \"%{IP}\" }\n }\n geoip {\n database => \"/usr/share/GeoIP/GeoLite2-City.mmdb\"\n source => \"Ipaddress\"\n }\n }\n \n \n \n if [program] == 'xi_auditlog' {\n grok {\n match => [ 'message', '%{XIAUDITLOG_MESSAGE}' ]\n patterns_dir => '/usr/local/nagioslogserver/etc/patterns'\n overwrite => [ 'message' ]\n }\n date {\n match => [ 'timestamp', 'yyyy-MM-dd HH:mm:ss' ]\n }\n mutate {\n replace => [ 'type', 'xi_auditlog' ]\n }\n }\n if [type] == 'netscaler'{\n grok {\n break_on_match => true\n match => [\n \"message\", \"<%{POSINT:syslog_pri}> %{DATE_US}:%{TIME} GMT %{SYSLOGHOST:syslog_hostname} %{GREEDYDATA:netscaler_message} : %{DATA} %{IP:source_ip}:%{POSINT:source_port} - %{DATA} %{IP:vserver_ip}:%{POSINT:vserver_port} - %{DATA} %{IP:nat_ip}:%{POSINT:nat_port} - %{DATA} %{IP:destination_ip}:%{POSINT:destination_port} - %{DATA} %{DATE_US:DELINK_DATE}:%{TIME:DELINK_TIME} GMT - %{DATA} %{POSINT:total_bytes_sent} - %{DATA} %{POSINT:total_bytes_recv}\",\n \"message\", \"<%{POSINT:syslog_pri}> %{DATE_US}:%{TIME} GMT %{SYSLOGHOST:syslog_hostname} %{GREEDYDATA:netscaler_message} : %{DATA} %{IP:source_ip}:%{POSINT:source_port} - %{DATA} %{IP:destination_ip}:%{POSINT:destination_port} - %{DATA} %{DATE_US:START_DATE}:%{TIME:START_TIME} GMT - %{DATA} %{DATE_US:END_DATE}:%{TIME:END_TIME} GMT - %{DATA} %{POSINT:total_bytes_sent} - %{DATA} %{POSINT:total_bytes_recv}\",\n \"message\", \"<%{POSINT:syslog_pri}> %{DATE_US}:%{TIME} GMT %{SYSLOGHOST:syslog_hostname} %{GREEDYDATA:netscaler_message} : %{DATA} %{INT:netscaler_spcbid} - %{DATA} %{IP:clientip} - %{DATA} %{INT:netscaler_client_port} - %{DATA} %{IP:netscaler_vserver_ip} - %{DATA} %{INT:netscaler_vserver_port} %{GREEDYDATA:netscaler_message} - %{DATA} %{WORD:netscaler_session_type}\",\n \"message\", \"<%{POSINT:syslog_pri}> %{DATE_US}:%{TIME} GMT %{SYSLOGHOST:syslog_hostname} %{GREEDYDATA:netscaler_message}\"\n ]\n }\n }\n if host ", :level=>:fatal}