mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 20:38:58 +00:00
Add default smart-multi-line.fsm config for syslog-ng
The config file is taken from the syslog-ng upstream repository. It got added for the syslog-ng 4.2.0 release and remained unchanged since then (as of April 2024). https://github.com/syslog-ng/syslog-ng/blob/syslog-ng-4.2.0/lib/multi-line/smart-multi-line.fsm
This commit is contained in:
83
image/services/syslog-ng/smart-multi-line.fsm
Normal file
83
image/services/syslog-ng/smart-multi-line.fsm
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2023 Balazs Scheidler
|
||||||
|
# Copyright 2016 Google Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# The regular expressions were extracted from
|
||||||
|
# https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions
|
||||||
|
# and converted into a TSV format by Balazs Scheidler.
|
||||||
|
#
|
||||||
|
# List of tab separated fields
|
||||||
|
#
|
||||||
|
# comma-separated-states /regexp/ new_state
|
||||||
|
#
|
||||||
|
|
||||||
|
# java
|
||||||
|
start_state,java_start_exception /(?:Exception|Error|Throwable|V8 errors stack trace)[:\r\n]/ java_after_exception
|
||||||
|
java_after_exception /^[\t ]*nested exception is:[\t ]*/ java_start_exception
|
||||||
|
java_after_exception /^[\r\n]*$/ java_after_exception
|
||||||
|
java_after_exception,java /^[\t ]+(?:eval )?at / java
|
||||||
|
java_after_exception,java /^[\t ]+--- End of inner exception stack trace ---$/ java
|
||||||
|
java_after_exception,java /^--- End of stack trace from previous location where exception was thrown ---$/ java
|
||||||
|
java_after_exception,java /^[\t ]*(?:Caused by|Suppressed):/ java_after_exception
|
||||||
|
java_after_exception,java /^[\t ]*... \d+ (?:more|common frames omitted)/ java
|
||||||
|
|
||||||
|
# python
|
||||||
|
start_state /^Traceback \(most recent call last\):$/ python
|
||||||
|
python /^[\t ]*File / python_code
|
||||||
|
python_code /[^\t ]/ python
|
||||||
|
python /^(?:[^\s.():]+\.)*[^\s.():]+:/ start_state
|
||||||
|
|
||||||
|
# PHP
|
||||||
|
start_state /(?:PHP\ (?:Notice|Parse\ error|Fatal\ error|Warning):)|(?:exception\ '[^']+'\ with\ message\ ')/ php_stack_begin
|
||||||
|
php_stack_begin /^Stack trace:/ php_stack_frames
|
||||||
|
php_stack_frames /^#\d/ php_stack_frames
|
||||||
|
php_stack_frames /^\s+thrown in / start_state
|
||||||
|
|
||||||
|
# Go
|
||||||
|
start_state /\bpanic: / go_after_panic
|
||||||
|
start_state /http: panic serving/ go_goroutine
|
||||||
|
go_after_panic,go_after_signal,go_frame_1 /^$/ go_goroutine
|
||||||
|
go_after_panic /^\[signal / go_after_signal
|
||||||
|
go_goroutine /^goroutine \d+ \[[^\]]+\]:$/ go_frame_1
|
||||||
|
go_frame_1 /^(?:[^\s.:]+\.)*[^\s.():]+\(|^created by / go_frame_2
|
||||||
|
go_frame_2 /^\s/ go_frame_1
|
||||||
|
|
||||||
|
# Ruby
|
||||||
|
start_state /Error \(.*\):$/ ruby_before_rails_trace
|
||||||
|
ruby_before_rails_trace /^ $/ ruby
|
||||||
|
ruby_before_rails_trace /^[\t ]+.*?\.rb:\d+:in `/ ruby
|
||||||
|
ruby /^[\t ]+.*?\.rb:\d+:in `/ ruby
|
||||||
|
|
||||||
|
# Dart
|
||||||
|
start_state /^Unhandled exception:$/ dart_exc
|
||||||
|
dart_exc /^(Instance of)|(Exception)|(Bad state)|(IntegerDivisionByZeroException)|(Invalid argument)|(RangeError)|(Assertion failed)|(Cannot instantiate)|(Reading static variable)|(UnimplementedError)|(Unsupported operation)|(Concurrent modification)|(Out of Memory)|(Stack Overflow)/ dart_stack
|
||||||
|
dart_exc /^'.+?':.+?$/ dart_type_err_1
|
||||||
|
dart_type_err_1 /^#\d+\s+.+?\(.+?\)$/ dart_stack
|
||||||
|
dart_type_err_1 /^.+?$/ dart_type_err_2
|
||||||
|
dart_type_err_2 /^.*?\^.*?$/ dart_type_err_3
|
||||||
|
dart_type_err_3 /^$/ dart_type_err_4
|
||||||
|
dart_type_err_4 /^$/ dart_stack
|
||||||
|
dart_exc /^FormatException/ dart_format_err_1
|
||||||
|
dart_format_err_1 /^#\d+\s+.+?\(.+?\)$/ dart_stack
|
||||||
|
dart_format_err_1 /^./ dart_format_err_2
|
||||||
|
dart_format_err_2 /^.*?\^/ dart_format_err_3
|
||||||
|
dart_format_err_3 /^$/ dart_stack
|
||||||
|
dart_exc /^NoSuchMethodError:/ dart_method_err_1
|
||||||
|
dart_method_err_1 /^Receiver:/ dart_method_err_2
|
||||||
|
dart_method_err_2 /^Tried calling:/ dart_method_err_3
|
||||||
|
dart_method_err_3 /^Found:/ dart_stack
|
||||||
|
dart_method_err_3 /^#\d+\s+.+?\(.+?\)$/ dart_stack
|
||||||
|
dart_stack /^#\d+\s+.+?\(.+?\)$/ dart_stack
|
||||||
|
dart_stack /^<asynchronous suspension>$/ dart_stack
|
||||||
@@ -9,6 +9,7 @@ SYSLOG_NG_BUILD_PATH=/bd_build/services/syslog-ng
|
|||||||
$minimal_apt_get_install syslog-ng-core
|
$minimal_apt_get_install syslog-ng-core
|
||||||
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.init /etc/my_init.d/10_syslog-ng.init
|
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.init /etc/my_init.d/10_syslog-ng.init
|
||||||
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.shutdown /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown
|
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.shutdown /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown
|
||||||
|
cp $SYSLOG_NG_BUILD_PATH/smart-multi-line.fsm /usr/share/syslog-ng/smart-multi-line.fsm
|
||||||
mkdir -p /var/lib/syslog-ng
|
mkdir -p /var/lib/syslog-ng
|
||||||
cp $SYSLOG_NG_BUILD_PATH/syslog_ng_default /etc/default/syslog-ng
|
cp $SYSLOG_NG_BUILD_PATH/syslog_ng_default /etc/default/syslog-ng
|
||||||
touch /var/log/syslog
|
touch /var/log/syslog
|
||||||
|
|||||||
Reference in New Issue
Block a user