Re-enable promtail

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2021-11-27 20:02:52 +00:00
parent 513af4f9c5
commit b489562c57
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -83,28 +83,25 @@ data:
selector: '{name=~".*"} |~ ".*kube-probe/.*"' selector: '{name=~".*"} |~ ".*kube-probe/.*"'
action: drop action: drop
- match: - match:
selector: '{app="inlets"}' selector: '{name=~".*"} |~ ".*internal-proxy.*"'
action: drop action: drop
- match: # - match:
selector: '{namespace="tekton-pipelines"}' # selector: '{k8s_app="traefik-ingress-lb"}'
action: drop # stages:
- match: # - json:
selector: '{k8s_app="traefik-ingress-lb"}' # expressions:
stages: # request_host: RequestHost
- json: # request_path: RequestPath
expressions: # error: error
request_host: RequestHost # - drop:
request_path: RequestPath # source: "request_path"
error: error # value: "/healthz"
- drop: # - template:
source: "request_path" # source: has_error
value: "/healthz" # template: '{{ if .error }}true{{ else }}false{{ end }}'
- template: # - labels:
source: has_error # request_host:
template: '{{ if .error }}true{{ else }}false{{ end }}' # has_error:
- labels:
request_host:
has_error:
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -162,28 +159,25 @@ data:
selector: '{name=~".*"} |~ ".*kube-probe/.*"' selector: '{name=~".*"} |~ ".*kube-probe/.*"'
action: drop action: drop
- match: - match:
selector: '{app="inlets"}' selector: '{name=~".*"} |~ ".*internal-proxy.*"'
action: drop action: drop
- match: # - match:
selector: '{namespace="tekton-pipelines"}' # selector: '{k8s_app="traefik-ingress-lb"}'
action: drop # stages:
- match: # - json:
selector: '{k8s_app="traefik-ingress-lb"}' # expressions:
stages: # request_host: RequestHost
- json: # request_path: RequestPath
expressions: # error: error
request_host: RequestHost # - drop:
request_path: RequestPath # source: "request_path"
error: error # value: "/healthz"
- drop: # - template:
source: "request_path" # source: has_error
value: "/healthz" # template: '{{ if .error }}true{{ else }}false{{ end }}'
- template: # - labels:
source: has_error # request_host:
template: '{{ if .error }}true{{ else }}false{{ end }}' # has_error:
- labels:
request_host:
has_error:
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -245,28 +239,25 @@ data:
selector: '{name=~".*"} |~ ".*kube-probe/.*"' selector: '{name=~".*"} |~ ".*kube-probe/.*"'
action: drop action: drop
- match: - match:
selector: '{app="inlets"}' selector: '{name=~".*"} |~ ".*internal-proxy.*"'
action: drop action: drop
- match: # - match:
selector: '{namespace="tekton-pipelines"}' # selector: '{k8s_app="traefik-ingress-lb"}'
action: drop # stages:
- match: # - json:
selector: '{k8s_app="traefik-ingress-lb"}' # expressions:
stages: # request_host: RequestHost
- json: # request_path: RequestPath
expressions: # error: error
request_host: RequestHost # - drop:
request_path: RequestPath # source: "request_path"
error: error # value: "/healthz"
- drop: # - template:
source: "request_path" # source: has_error
value: "/healthz" # template: '{{ if .error }}true{{ else }}false{{ end }}'
- template: # - labels:
source: has_error # request_host:
template: '{{ if .error }}true{{ else }}false{{ end }}' # has_error:
- labels:
request_host:
has_error:
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -334,28 +325,25 @@ data:
selector: '{name=~".*"} |~ ".*kube-probe/.*"' selector: '{name=~".*"} |~ ".*kube-probe/.*"'
action: drop action: drop
- match: - match:
selector: '{app="inlets"}' selector: '{name=~".*"} |~ ".*internal-proxy.*"'
action: drop action: drop
- match: # - match:
selector: '{namespace="tekton-pipelines"}' # selector: '{k8s_app="traefik-ingress-lb"}'
action: drop # stages:
- match: # - json:
selector: '{k8s_app="traefik-ingress-lb"}' # expressions:
stages: # request_host: RequestHost
- json: # request_path: RequestPath
expressions: # error: error
request_host: RequestHost # - drop:
request_path: RequestPath # source: "request_path"
error: error # value: "/healthz"
- drop: # - template:
source: "request_path" # source: has_error
value: "/healthz" # template: '{{ if .error }}true{{ else }}false{{ end }}'
- template: # - labels:
source: has_error # request_host:
template: '{{ if .error }}true{{ else }}false{{ end }}' # has_error:
- labels:
request_host:
has_error:
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -425,28 +413,25 @@ data:
selector: '{name=~".*"} |~ ".*kube-probe/.*"' selector: '{name=~".*"} |~ ".*kube-probe/.*"'
action: drop action: drop
- match: - match:
selector: '{app="inlets"}' selector: '{name=~".*"} |~ ".*internal-proxy.*"'
action: drop action: drop
- match: # - match:
selector: '{namespace="tekton-pipelines"}' # selector: '{k8s_app="traefik-ingress-lb"}'
action: drop # stages:
- match: # - json:
selector: '{k8s_app="traefik-ingress-lb"}' # expressions:
stages: # request_host: RequestHost
- json: # request_path: RequestPath
expressions: # error: error
request_host: RequestHost # - drop:
request_path: RequestPath # source: "request_path"
error: error # value: "/healthz"
- drop: # - template:
source: "request_path" # source: has_error
value: "/healthz" # template: '{{ if .error }}true{{ else }}false{{ end }}'
- template: # - labels:
source: has_error # request_host:
template: '{{ if .error }}true{{ else }}false{{ end }}' # has_error:
- labels:
request_host:
has_error:
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -554,81 +539,81 @@ subjects:
name: promtail name: promtail
--- ---
# apiVersion: apps/v1 apiVersion: apps/v1
# kind: DaemonSet kind: DaemonSet
# metadata: metadata:
# name: promtail name: promtail
# namespace: monitoring namespace: monitoring
# labels: labels:
# app.kubernetes.io/name: promtail app.kubernetes.io/name: promtail
# annotations: annotations:
# configmap.reloader.stakater.com/reload: "promtail" configmap.reloader.stakater.com/reload: "promtail"
# spec: spec:
# selector: selector:
# matchLabels: matchLabels:
# app.kubernetes.io/name: promtail app.kubernetes.io/name: promtail
# template: template:
# metadata: metadata:
# labels: labels:
# app.kubernetes.io/name: promtail app.kubernetes.io/name: promtail
# annotations: annotations:
# prometheus.io/port: http-metrics prometheus.io/port: http-metrics
# prometheus.io/scrape: "true" prometheus.io/scrape: "true"
# spec: spec:
# serviceAccountName: promtail serviceAccountName: promtail
# containers: containers:
# - name: promtail - name: promtail
# image: "grafana/promtail:2.2.1" image: "grafana/promtail:2.2.1"
# imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# args: args:
# - "-config.file=/etc/promtail/promtail.yaml" - "-config.file=/etc/promtail/promtail.yaml"
# volumeMounts: volumeMounts:
# - name: config - name: config
# mountPath: /etc/promtail mountPath: /etc/promtail
# - name: run - name: run
# mountPath: /run/promtail mountPath: /run/promtail
# - mountPath: /var/lib/docker/containers - mountPath: /var/lib/docker/containers
# name: docker name: docker
# readOnly: true readOnly: true
# - mountPath: /var/log/pods - mountPath: /var/log/pods
# name: pods name: pods
# readOnly: true readOnly: true
# env: env:
# - name: HOSTNAME - name: HOSTNAME
# valueFrom: valueFrom:
# fieldRef: fieldRef:
# fieldPath: spec.nodeName fieldPath: spec.nodeName
# ports: ports:
# - containerPort: 3101 - containerPort: 3101
# name: http-metrics name: http-metrics
# securityContext: securityContext:
# readOnlyRootFilesystem: true readOnlyRootFilesystem: true
# runAsGroup: 0 runAsGroup: 0
# runAsUser: 0 runAsUser: 0
# readinessProbe: readinessProbe:
# failureThreshold: 5 failureThreshold: 5
# httpGet: httpGet:
# path: /ready path: /ready
# port: http-metrics port: http-metrics
# initialDelaySeconds: 10 initialDelaySeconds: 10
# periodSeconds: 10 periodSeconds: 10
# successThreshold: 1 successThreshold: 1
# timeoutSeconds: 1 timeoutSeconds: 1
# tolerations: tolerations:
# - effect: NoSchedule - effect: NoSchedule
# key: node-role.kubernetes.io/master key: node-role.kubernetes.io/master
# operator: Exists operator: Exists
# volumes: volumes:
# - name: config - name: config
# configMap: configMap:
# name: promtail name: promtail
# - name: run - name: run
# hostPath: hostPath:
# path: /run/promtail path: /run/promtail
# - hostPath: - hostPath:
# path: /var/lib/docker/containers path: /var/lib/docker/containers
# name: docker name: docker
# - hostPath: - hostPath:
# path: /var/log/pods path: /var/log/pods
# name: pods name: pods
--- ---