diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..62231bf --- /dev/null +++ b/config.yaml @@ -0,0 +1,284 @@ +connectors: + count/output_metrics: + logs: + telemetry_controller_output_log_count: + attributes: + - key: tenant + - key: subscription + - key: exporter + description: The number of logs sent out from each exporter. + resource_attributes: + - key: k8s.namespace.name + - key: k8s.node.name + - key: k8s.container.name + - key: k8s.pod.name + - key: k8s.pod.labels.app.kubernetes.io/name + - key: k8s.pod.labels.app + count/tenant_metrics: + logs: + telemetry_controller_tenant_log_count: + attributes: + - key: tenant + description: The number of logs from each tenant pipeline. + resource_attributes: + - key: k8s.namespace.name + - key: k8s.node.name + - key: k8s.container.name + - key: k8s.pod.name + - key: k8s.pod.labels.app.kubernetes.io/name + - key: k8s.pod.labels.app + routing/subscription_example-tenant-ns_subscription-sample-1_outputs: + table: + - condition: "true" + pipelines: + - logs/output_example-tenant-ns_subscription-sample-1_collector_otlp-test-output + routing/subscription_example-tenant-ns_subscription-sample-2_outputs: + table: + - condition: "true" + pipelines: + - logs/output_example-tenant-ns_subscription-sample-2_collector_otlp-test-output-2 + routing/tenant_example-tenant_subscriptions: + table: + - condition: "true" + pipelines: + - logs/tenant_example-tenant_subscription_example-tenant-ns_subscription-sample-1 + - logs/tenant_example-tenant_subscription_example-tenant-ns_subscription-sample-2 +exporters: + otlp/collector_otlp-test-output: + endpoint: receiver-collector.telemetry-controller-system.svc.cluster.local:4317 + retry_on_failure: + enabled: true + max_elapsed_time: 0 + sending_queue: + enabled: true + queue_size: 100 + tls: + insecure: true + otlp/collector_otlp-test-output-2: + endpoint: receiver-collector.telemetry-controller-system.svc.cluster.local:4317 + retry_on_failure: + enabled: true + max_elapsed_time: 0 + sending_queue: + enabled: true + queue_size: 100 + tls: + insecure: true + prometheus/message_metrics_exporter: + endpoint: :9999 +extensions: {} +processors: + attributes/exporter_name_otlp-test-output: + actions: + - action: insert + key: exporter + value: otlp/collector_otlp-test-output + attributes/exporter_name_otlp-test-output-2: + actions: + - action: insert + key: exporter + value: otlp/collector_otlp-test-output-2 + attributes/metricattributes: + actions: + - action: insert + from_attribute: k8s.pod.labels.app + key: app + - action: insert + from_attribute: k8s.node.name + key: host + - action: insert + from_attribute: k8s.namespace.name + key: namespace + - action: insert + from_attribute: k8s.container.name + key: container + - action: insert + from_attribute: k8s.pod.name + key: pod + attributes/subscription_subscription-sample-1: + actions: + - action: insert + key: subscription + value: subscription-sample-1 + attributes/subscription_subscription-sample-2: + actions: + - action: insert + key: subscription + value: subscription-sample-2 + attributes/tenant_example-tenant: + actions: + - action: insert + key: tenant + value: example-tenant + deltatocumulative: {} + filter/exclude: + error_mode: ignore + logs: + log_record: + - resource.attributes["exclude"] == "true" + k8sattributes: + auth_type: serviceAccount + extract: + annotations: + - from: pod + key: telemetry.kube-logging.dev/exclude + key_regex: null + tag_name: exclude + labels: + - from: pod + key: null + key_regex: .* + tag_name: all_labels + metadata: + - k8s.pod.name + - k8s.pod.uid + - k8s.deployment.name + - k8s.namespace.name + - k8s.node.name + - k8s.pod.start_time + passthrough: false + pod_association: + - sources: + - from: resource_attribute + name: k8s.namespace.name + - from: resource_attribute + name: k8s.pod.name + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_mib: 25 +receivers: + filelog/example-tenant: + exclude: + - /var/log/pods/*/otc-container/*.log + include: + - /var/log/pods/example-tenant-ns_*/*/*.log + include_file_name: false + include_file_path: true + operators: + - id: get-format + routes: + - expr: body matches "^\\{" + output: parser-docker + - expr: body matches "^[^ Z]+Z" + output: parser-containerd + type: router + - id: parser-containerd + output: extract_metadata_from_filepath + regex: ^(?P