diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-12-03 17:00:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 15:00:51 +0000 |
commit | fc9b5170c6301366bd66d9b0766850a0ed8dc807 (patch) | |
tree | 7b2596498725a161f5ae9ed7943dc16de799a4f1 /collectors/log2journal/log2journal.d/nginx-combined.yaml | |
parent | 48b2d1609ce4266f11d84b4a3ae269aad07650b9 (diff) |
log2journal improvements 5 (#16519)
* added ${LINE} variable; added default config
* prefer single quotes in yaml to avoid interference from yaml escaping
* simple_hashtable now supports deletions
* simple hashtable now supports setting entries with NULL values
* hashtable implementation now has sorting option to maintain a sorted list of the items
* multiple hashtables with type checking
* added comments
* still incomplete yaml parser
* fixes and cleanup
Diffstat (limited to 'collectors/log2journal/log2journal.d/nginx-combined.yaml')
-rw-r--r-- | collectors/log2journal/log2journal.d/nginx-combined.yaml | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/collectors/log2journal/log2journal.d/nginx-combined.yaml b/collectors/log2journal/log2journal.d/nginx-combined.yaml index 00610f4b7c..003c774d7b 100644 --- a/collectors/log2journal/log2journal.d/nginx-combined.yaml +++ b/collectors/log2journal/log2journal.d/nginx-combined.yaml @@ -37,15 +37,15 @@ rename: # Inject constant fields into the journal logs. inject: - key: SYSLOG_IDENTIFIER - value: "nginx-log" + value: nginx-log # inject PRIORITY is a duplicate of NGINX_STATUS - - key: "PRIORITY" - value: "${NGINX_STATUS}" + - key: PRIORITY + value: '${NGINX_STATUS}' # Inject NGINX_STATUS_FAMILY is a duplicate of NGINX_STATUS - - key: "NGINX_STATUS_FAMILY" - value: "${NGINX_STATUS}" + - key: NGINX_STATUS_FAMILY + value: '${NGINX_STATUS}' # Rewrite the value of fields (including the duplicated ones). # The search pattern can have named groups, and the replace pattern can use @@ -53,30 +53,30 @@ inject: rewrite: # PRIORITY is a duplicate of NGINX_STATUS # Valid PRIORITIES: 0=emerg, 1=alert, 2=crit, 3=error, 4=warn, 5=notice, 6=info, 7=debug - - key: "PRIORITY" - match: "^[123]" + - key: PRIORITY + match: '^[123]' value: 6 - - key: "PRIORITY" - match: "^4" + - key: PRIORITY + match: '^4' value: 5 - - key: "PRIORITY" - match: "^5" + - key: PRIORITY + match: '^5' value: 3 - - key: "PRIORITY" - match: ".*" + - key: PRIORITY + match: '.*' value: 4 # NGINX_STATUS_FAMILY is a duplicate of NGINX_STATUS - - key: "NGINX_STATUS_FAMILY" - match: "^(?<first_digit>[1-5])" - value: "${first_digit}xx" + - key: NGINX_STATUS_FAMILY + match: '^(?<first_digit>[1-5])' + value: '${first_digit}xx' - - key: "NGINX_STATUS_FAMILY" - match: ".*" - value: "UNKNOWN" + - key: NGINX_STATUS_FAMILY + match: '.*' + value: 'UNKNOWN' # Control what to do when input logs do not match the main PCRE2 pattern. unmatched: |