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 |
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 2.3.0 [ 17600 ] |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Rank | Ranked higher |
Assignee | Patrick Stephens [ JIRAUSER25332 ] | Alex Emery [ JIRAUSER26037 ] |
Sprint | 50 [ 1890 ] |
Rank | Ranked lower |
Rank | Ranked higher |
Sprint | 50: Validation/Enforcement [ 1890 ] | 50: Validation/Enforcement, 1 [ 1890, 1891 ] |
Sprint | 50: Validation/Enforcement, 1: Recovery to productivity [ 1890, 1891 ] | 5: Automation, upgrades 2, 50: Validation/Enforcement, 1: Recovery to productivity [ 1534, 1890, 1891 ] |
Sprint | 5: Automation, upgrades 2, 50: Validation/Enforcement, 1: Recovery to productivity [ 1534, 1890, 1891 ] | 50: Validation/Enforcement, 1: Recovery to productivity, 3: SBEE, Multi-Cert [ 1890, 1891, 1951 ] |
Rank | Ranked lower |
Status | Open [ 1 ] | In Progress [ 3 ] |
Sprint | 50: Validation/Enforcement, 1: Recovery to productivity, 3: SBEE, Multi-Cert [ 1890, 1891, 1951 ] | 5: Automation, upgrades 2, 50: Validation/Enforcement, 1: Recovery to productivity, 3: SBEE, Multi-Cert [ 1534, 1890, 1891, 1951 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
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.