Commit 10e73c78 authored by Anton Kulikov's avatar Anton Kulikov

Release 1.2.0

parent e6636f4d
Pipeline #214984621 passed with stages
in 17 seconds
This diff was suppressed by a .gitattributes entry.
apiVersion: v2
name: promtail
description: Responsible for gathering logs and sending them to Loki
version: 1.1.1
version: 1.2.0
appVersion: 2.0.0
kubeVersion: ">= 1.17.7"
kubeVersion: ">= 1.18.0"
keywords:
- grafana
- loki
- promtail
- logs
home: https://grafana.com/docs/loki/latest/clients/promtail/
......@@ -18,7 +19,7 @@ maintainers:
icon: https://raw.githubusercontent.com/grafana/loki/master/docs/sources/logo.png
dependencies:
- name: generate
version: ~0.2.1
version: ~0.2.2
repository: https://charts.kube-ops.io
annotations:
category: LogManagement
......
# promtail
[![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ](#)
[![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ](#)
[](#)
[![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square) ](#)
[![Artifact Hub: kube-ops](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kube-ops&style=flat-square)](https://artifacthub.io/packages/helm/kube-ops/promtail)
......@@ -176,11 +176,11 @@ $ helm uninstall my-release --namespace my-namespace
## Requirements
Kubernetes: `>= 1.17.7`
Kubernetes: `>= 1.18.0`
| Repository | Name | Version |
|------------|------|---------|
| https://charts.kube-ops.io | generate | ~0.2.1 |
| https://charts.kube-ops.io | generate | ~0.2.2 |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.4.0](https://github.com/norwoodj/helm-docs/releases/v1.4.0)
......@@ -397,3 +397,251 @@
- output:
source: message
{{- end -}}
{{- define "promtail.podsMongoParser" -}}
- match:
selector: '{app="mongo"}'
stages:
- regex:
expression: '^(?P<timestamp>[^ ]*)\s+(?P<level>\w)\s+(?P<component>[^ ]*)\s+\[(?P<thread>.*)\]\s+(?P<message>.*)'
- template:
source: parser
template: mongo
{{- if .Values.pods.dropDebug }}
- drop:
source: level
expression: debug
drop_counter_reason: drop_debug
{{- end }}
- labels:
level:
component:
thread:
parser:
- output:
source: message
{{- end -}}
{{- define "promtail.podsStolonKeeperParser" -}}
- match:
selector: '{app="stolon",component="stolon-keeper"} !~ "^.*cmd/.*\\.go.*"'
stages:
- regex:
expression: '^(?P<timestamp>\S+\s+\S+\s+\S+)\s+(?P<username>\S+)?\s+?-\s+?(?P<database>\S+)?:\s+(?P<level>\b[A-Z0-9]{3,}\b)?:?\s+?(?P<message>.*)'
- template:
source: parser
template: stolon-keeper
{{- if .Values.pods.dropDebug }}
- drop:
source: level
expression: debug
drop_counter_reason: drop_debug
{{- end }}
- labels:
username:
database:
level:
parser:
- output:
source: message
{{- end -}}
{{- define "promtail.podsPgBouncerParser" -}}
- match:
selector: '{container="pgbouncer"}'
stages:
- regex:
expression: '^(?P<timestamp>\S+\s+\S+\s+\S+)\s+\[(?P<pid>.*)\]\s+(?P<level>\b[A-Z0-9]{3,}\b)?\s+?(?P<message>.*)'
- template:
source: parser
template: pgbouncer
- labels:
level:
parser:
{{- if .Values.pods.dropDebug }}
- drop:
source: level
expression: debug
drop_counter_reason: drop_debug
{{- end }}
- output:
source: message
{{- end -}}
{{- define "promtail.podsVeleroParser" -}}
- match:
selector: '{container="velero"} |~ `^{"\w+":`'
stages:
- json:
expressions:
controller:
level:
message: msg
- template:
source: parser
template: velero
{{- if .Values.pods.dropDebug }}
- drop:
source: level
expression: debug
drop_counter_reason: drop_debug
{{- end }}
- labels:
controller:
level:
parser:
- output:
source: message
{{- end -}}
{{- define "promtail.podsGitLabServerParser" -}}
- match:
selector: '{job=~".*gitlab.*"} |~ `^{"\w+":"`'
stages:
- template:
source: parser
template: gitlab-server
- labels:
parser:
{{- if .Values.pods.dropReadinessProbes }}
- match:
selector: '{parser="gitlab-server"} |~ `[/"](readiness|liveness|metrics)`'
stages:
- drop:
expression: '"status":200'
drop_counter_reason: drop_readiness_probes
{{- end }}
- match:
selector: '{parser="gitlab-server"} |~ `"(level|severity)":"\w+`'
stages:
- json:
expressions:
level:
severity:
- template:
source: level
template: {{ "'{{ if .severity }}{{ ToLower .severity }}{{ else }}{{ ToLower .Value }}{{ end }}'" }}
- labeldrop:
- severity
{{- if .Values.pods.dropDebug }}
- drop:
source: level
expression: debug
drop_counter_reason: drop_debug
{{- end }}
- labels:
level:
- match:
selector: '{parser="gitlab-server",level=~".+",container=~".*workhorse.*"}'
stages:
- json:
expressions:
host:
method:
protocol: proto
status:
uri:
user_agent:
remote_ip:
- template:
source: parser
template: gitlab-workhorse
- template:
source: message
template: {{ "'{{ .remote_ip }} {{ .method }} {{ .uri }} | {{ .user_agent }}'" }}
- labels:
host:
method:
protocol:
status:
parser:
- output:
source: message
- match:
selector: '{parser="gitlab-server",level="",container=~".*webservice.*"} |~ "path" |~ "remote_ip" |~ "username"'
stages:
- json:
expressions:
method:
status:
path:
ua:
remote_ip:
username:
- template:
source: parser
template: gitlab-webservice
- template:
source: message
template: {{ "'{{ if .username }}{{ .username }}@{{ end }}{{ .remote_ip }} {{ .method }} {{ .path }} | {{ .ua }}'" }}
- labels:
method:
status:
parser:
- output:
source: message
- match:
selector: '{parser="gitlab-server",level=~".+",container=~".*shell.*"}'
stages:
- json:
expressions:
method:
status:
message: msg
url:
- template:
source: parser
template: gitlab-shell
- labels:
method:
status:
parser:
- replace:
source: url
expression: '(key=AAA[^&"]+)'
replace: 'key=AAA...'
- template:
source: message
template: {{ "'{{ .Value }}{{ if .url }} | {{ .url }}{{ end }}'" }}
- output:
source: message
- match:
selector: '{parser="gitlab-server",level=~".+",container=~".*webservice.*"} |~ "method" |~ "params" |~ "path" |~ "remote_ip"'
stages:
- json:
expressions:
method:
status:
path:
remote_ip:
ua:
- template:
source: parser
template: gitlab-webservice
- labels:
method:
status:
parser:
- template:
source: message
template: {{ "'{{ .remote_ip }} {{ .method }} {{ .path }} | {{ .ua }}\n{{ .params }}'" }}
- output:
source: message
- match:
selector: '{parser="gitlab-server",level=~".+",container=~".*sidekiq.*"}'
stages:
- json:
expressions:
class:
message:
queue:
- template:
source: parser
template: gitlab-sidekiq
- labels:
class:
queue:
parser:
- output:
source: message
{{- end -}}
......@@ -78,6 +78,11 @@
{{ include "promtail.podsVaultParser" . }}
{{ include "promtail.podsConsulParser" . }}
{{ include "promtail.podsCalicoParser" . }}
{{ include "promtail.podsMongoParser" . }}
{{ include "promtail.podsStolonKeeperParser" . }}
{{ include "promtail.podsPgBouncerParser" . }}
{{ include "promtail.podsVeleroParser" . }}
{{ include "promtail.podsGitLabServerParser" . }}
{{- end }}
{{- end }}
{{- if .Values.pods.extraPipelineStages }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment