This PR adds flexibility in what label keys should be used automatically for output metrics, also adds the ability to use go templates that receives the destination information (name, namespace, scope:local/global and the logging name) to be used as needed. Example:
apiVersion: logging.banzaicloud.io/v1beta1
kind: SyslogNGClusterFlow
metadata:
name: all
spec:
match: {}
outputMetrics:
- key: custom_output
labels:
flow: all
# define your own label for output name
my-key-for-the-output: "{{ .Destination.Name }}"
# do not add the output_name label to the metric
output_name: ""
globalOutputRefs:
- http
This PR adds flexibility in what label keys should be used automatically for output metrics, also adds the ability to use go templates that receives the destination information (name, namespace, scope:local/global and the logging name) to be used as needed. Example: