We are using promtail 2.8.4 in Kubernetes 1.24.
We want to define custom metrics in promtail.
We use config below but we do not see the metrics in prometheus.
promtail-values.yaml file is like:
config:
snippets:
pipelineStages:
- cri: {}
extraScrapeConfigs: |
- job_name: shift-custom
pipeline_stages:
- regex:
expression: '(?P<exception>.*Exception: .*)'
- metrics:
shift_custom_exceptions:
type: Counter
description: "Exceptions"
source: exception
config:
action: inc
kubernetes_sd_configs:
- role: pod