It would be helpful if Filebeat could handle the variables when it's referenced, but not defined. It should log an error in this case.
If the name value (E.g,${kubernetes.labels.app|[app.kubernetes.io/name](https://app.kubernetes.io/name)|[kubernetes.deployment.name](https://kubernetes.deployment.name/)|[kubernetes.statefulset.name](https://kubernetes.statefulset.name/)|[kubernetes.replicaset.name](https://kubernetes.replicaset.name/)}) don't have any matching substitution available, rather than falling back to setting null, it will just break the ingestion without an error.
To workaround this issue, it is possible to add the fallback constant unknown to the name value at the end.
E.g. ${kubernetes.labels.app|[app.kubernetes.io/name](https://app.kubernetes.io/name)|[kubernetes.deployment.name](https://kubernetes.deployment.name/)|[kubernetes.statefulset.name](https://kubernetes.statefulset.name/)|[kubernetes.replicaset.name](https://kubernetes.replicaset.name/)|"unknown"}
It would be helpful if Filebeat could handle the variables when it's referenced, but not defined. It should log an error in this case.
If the name value (E.g,
${kubernetes.labels.app|[app.kubernetes.io/name](https://app.kubernetes.io/name)|[kubernetes.deployment.name](https://kubernetes.deployment.name/)|[kubernetes.statefulset.name](https://kubernetes.statefulset.name/)|[kubernetes.replicaset.name](https://kubernetes.replicaset.name/)}
) don't have any matching substitution available, rather than falling back to settingnull
, it will just break the ingestion without an error.To workaround this issue, it is possible to add the fallback constant
unknown
to the name value at the end.E.g.
${kubernetes.labels.app|[app.kubernetes.io/name](https://app.kubernetes.io/name)|[kubernetes.deployment.name](https://kubernetes.deployment.name/)|[kubernetes.statefulset.name](https://kubernetes.statefulset.name/)|[kubernetes.replicaset.name](https://kubernetes.replicaset.name/)|"unknown"}