-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Loki] Whitelisting automatic Kubernetes stream labels #3131
Comments
@vladimirfx what about the option |
Do you mean record_modifier filter? We are trying to implement this but this issue not about lossy modification of record but about filtering of Loki stream labels. Loki is very sensitive to stream labels especially in context of chunks ordering. |
Loki output plugin has a configuration property called
|
I see this in code but not in docs. Thanks I've try it! |
Unfortunately remove_keys not remove nested keys. Neither works:
Record: {
"log":"2021-02-25T17:04:05.843785213Z stdout F 2021-02-25 17:04:05,838 INFO: no action. i am the leader with the lock",
"kubernetes":{
"pod_name":"search-city-db-0",
"namespace_name":"default",
"pod_id":"67df6c12-053a-4268-b63b-fa00b304af25",
"labels":{
"application":"postgresql",
"cluster-name":"search-city-db",
"controller-revision-hash":"search-city-db-56bfc889bb",
"spilo-role":"master","statefulset.kubernetes.io/pod-name":"search-city-db-0"},
"annotations":{
"status":"{\"conn_url\":\"postgres://10.42.1.185:5432/postgres\",\"api_url\":\"http://10.42.1.185:8008/patroni\",\"state\":\"running\",\"role\":\"master\",\"version\":\"2.0.1\",\"xlog_location\":2415919104,\"timeline\":112}"},
"container_name":"postgres",
"docker_id":"c22b8b4bb4258f5a54aa7573aa9ac4bd055d47bf5d7d03c1c428f356d7c6acdf",
"container_hash":"registry.opensource.zalan.do/acid/spilo-13@sha256:843c659bc9c430caa81e1af1fb23c7287e0acb3c9c80288f656fcf2c82b49cc2",
"container_image":"registry.opensource.zalan.do/acid/spilo-13:2.0-p4"
}
} |
please share your full configuration. |
Anyway if What do you think about
If you ok I've try to implement it. |
Related Loki/Promtail ticket - grafana/loki#3390 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Issue closed because no one can tell does this proposal makes sense or not. Not to implement it but just ok or nok. |
Is your feature request related to a problem? Please describe.
Loki strongly recommends using stable label values for stream labels. But automatic Kubernetes labels nearly always include some runtime hashes such as controller_revision_hash, pod_template_hash etc. That makes using of k8s auto labels fatal for Loki instance in long run because of infinitely growing label values.
Describe the solution you'd like
It would be nice to have functionality similar to record_modifier filter to include/exclude/whitelist stream labels.
The text was updated successfully, but these errors were encountered: