Files
awoooi/ops/signoz/filelog-normalization-canary.yaml

99 lines
2.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: p0-obs-002-filelog-normalization-canary
namespace: observability
labels:
awoooi.work-item: P0-OBS-002
data:
config.yaml: |
receivers:
filelog:
include:
- /input/input.log
start_at: beginning
operators:
- type: regex_parser
id: cri_parser
regex: '^(?P<time>[^ ]+) (?P<stream>stdout|stderr) (?P<flags>[^ ]*) (?P<log>.*)$'
if: 'body matches "^[^ ]+ (stdout|stderr) [^ ]* .*$"'
timestamp:
parse_from: attributes.time
layout_type: gotime
layout: '2006-01-02T15:04:05.999999999-07:00'
- type: add
id: mark_cri_parsed
field: attributes["awoooi.log.parse_status"]
value: parsed_cri
if: attributes.log != nil
- type: move
id: move_cri_body
from: attributes.log
to: body
if: attributes.log != nil
- type: add
id: mark_cri_fallback
field: attributes["awoooi.log.parse_status"]
value: fallback_unparsed
if: attributes["awoooi.log.parse_status"] == nil
exporters:
debug:
verbosity: detailed
service:
pipelines:
logs:
receivers: [filelog]
exporters: [debug]
input.log: |
2026-07-14T17:01:00.000000000+00:00 stdout F P0OBS_FILELOG_PARSED_CRI
P0OBS_FILELOG_FALLBACK_UNPARSED
---
apiVersion: v1
kind: Pod
metadata:
name: p0-obs-002-filelog-normalization-canary
namespace: observability
labels:
awoooi.work-item: P0-OBS-002
app.kubernetes.io/name: p0-obs-002-filelog-normalization-canary
spec:
automountServiceAccountToken: false
restartPolicy: Never
activeDeadlineSeconds: 90
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: otel-collector
image: 192.168.0.110:5000/awoooi/otel-collector-contrib@sha256:8edf386cdd1f4dc4393e34680e298dcc577296279febf243cf122155fa560c39
imagePullPolicy: IfNotPresent
args:
- --config=/etc/otel-canary/config.yaml
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: canary-data
mountPath: /etc/otel-canary
readOnly: true
- name: canary-data
mountPath: /input
readOnly: true
volumes:
- name: canary-data
configMap:
name: p0-obs-002-filelog-normalization-canary