You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So basically we just reused existing discovery.relabel.filtered_pod_logs.output in our custom logic.
In v2, it seams like its impossible. The new declare block is closed for any inputs/outputs and we can customise it only by adding new extraDiscoveryRules and extraLogProcessingStages.
We can not add new loki.process there or hook into output flow to introduce additional chain:
declare "pod_logs" {
argument "logs_destinations" {
comment = "Must be a list of log destinations where collected logs should be forwarded to"
}
...
discovery.relabel "filtered_pods" {
targets = discovery.kubernetes.pods.targets
...
loki.source.kubernetes "ingress_nginx_logs" { <<<<< NOT POSSIBLE
targets = discovery.relabel.filtered_pods.output
forward_to = [loki.process.ingress_nginx_logs.receiver]
}
Also we can not use output from declare block to supply the new processing chain somehow:
declare "pod_logs" {
argument "logs_destinations" {
comment = "Must be a list of log destinations where collected logs should be forwarded to"
}
}
loki.source.kubernetes "ingress_nginx_logs" {
targets = declare. pod_logs.output.filtered_pods <<<<< NOT POSSIBLE
forward_to = [loki.process.ingress_nginx_logs.receiver]
}
Could you please review this and let me know you thoughts on that matter?
The text was updated successfully, but these errors were encountered:
dmitrii-didenko
changed the title
v2 - Not able to reuse existing discovery rules for custom logs processing
v2 - Not able to extend declare block with custom logic
Jan 24, 2025
Hey everyone!
We have tried to upgrade helm chart to v2 and faced the issue with impossibility of configuring additional custom logic.
We are using experimental feature
loki.secretfilter
for obfuscation of logs. In helm chart v1 we pasted the following code to make it work:So basically we just reused existing
discovery.relabel.filtered_pod_logs.output
in our custom logic.In v2, it seams like its impossible. The new declare block is closed for any inputs/outputs and we can customise it only by adding new extraDiscoveryRules and extraLogProcessingStages.
We can not add new
loki.process
there or hook into output flow to introduce additional chain:Also we can not use output from declare block to supply the new processing chain somehow:
Could you please review this and let me know you thoughts on that matter?
The text was updated successfully, but these errors were encountered: