Details
Description
Currently the hostname label is set to just the pod name, e.g. cb7-0000, whereas CBS sees the host names as pod.cluster.namespace.svc, for example cb7-0000.cb7.default.svc. For consistency it'd be good to have hostname match that.
Attachments
For Gerrit Dashboard: K8S-2531 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
169449,13 | K8S-2531: Set pod hostname label | main | couchbase-fluent-bit | Status: MERGED | +2 | +1 |
I think the right way to do this is using the modify filter with conditional rules to overwrite the couchbase.node key:
[FILTER]
Name modify
Match couchbase.log.*
Condition Key_Exists pod['namespace']
Condition Key_Exists couchbase['cluster']
Condition Key_Exists couchbase['node']
Set couchbase.node $couchbase['node'].$couchbase['cluster'].$pod['namespace']
Not sure if you can set a nested field that way so confirm, it might also be better to set up a new field for it but really we want a simple one-size-fits-all for Loki labelling with both on-premise and CAO clusters.