default bucket in Observability Logs.
Log collection configuration
You can customize log collection by creating avalues.yaml file and updating your Nebius Observability Agent for Kubernetes installation:
Basic log configuration
Configuration parameters
config.logs.enabled: Enable or disable log collection. Default:true.config.logs.collectAgentLogs: Parameter to collect logs from the Nebius Observability Agent for Kubernetes itself. Default:false.config.logs.excludedNamespaces: List of namespaces to exclude from log collection.config.logs.operators: List of OpenTelemetry operators that parse Pod log lines. The agent runs them after it parses the container runtime log format. For more details, see Parsing structured logs.config.logs.processors: List of OpenTelemetry processors for the logs pipeline. The agent runs them after it adds Kubernetes metadata and before it sends the logs. For more details, see Parsing structured logs.
Excluding namespaces
To avoid collecting logs from infrastructure or monitoring namespaces, exclude specific namespaces from the log collection:Parsing structured logs
By default, the agent sends each Pod log line as a text message. If your application writes logs in JSON, Observability Logs shows the whole JSON object as one string and does not recognize the severity or other fields. To set up the Nebius Observability Agent for Kubernetes to parse JSON logs, add OpenTelemetry log processing units of the following types to the agent configuration (values.yaml):
- Operators (
config.logs.operatorsinvalues.yaml) parse logs after the agent parses the container runtime log format, but before it adds Kubernetes metadata to the logs. Operators use shorter configuration and recognize common severity level names in all letter cases out of the box. - Processors (
config.logs.processorsinvalues.yaml) parse logs after the agent adds Kubernetes metadata to them, and thus their conditions support attributes such asresource.attributes["k8s.namespace.name"]. Processors also let you filter or mask data.
- The
messagefield becomes the log message. - The
severityfield sets the log severity. - Other fields become log attributes. Nested objects stay structured.
- Lines that are not JSON objects stay unchanged.
Model is ready. message, the INFO severity, and the logger attribute:
- Operators
- Processors
DEBUG, INFO, WARNING, and ERROR, in any letter case. The mapping section adds CRITICAL as a fatal level.With on_error: send_quiet, the agent still sends a line that has no severity field or is not valid JSON, and does not write an error to its log for each such line.- In operators:
if: 'resource["k8s.namespace.name"] == "<namespace>" and body matches "^\\s*\\{"'. - In processors:
resource.attributes["k8s.namespace.name"] == "<namespace>" and IsString(log.body) and IsMatch(log.body, "^\\s*\\{").
Data enrichment
The Nebius Observability Agent for Kubernetes enriches logs with the following metadata:k8s_cluster_id: Cluster IDk8s_node_group_id: Node group IDapp.kubernetes.io/name: Application name labelk8s.namespace.name: Namespace namek8s.deployment.name: Deployment name (if applicable)k8s.statefulset.name: StatefulSet name (if applicable)k8s.daemonset.name: DaemonSet name (if applicable)k8s.cronjob.name: CronJob name (if applicable)k8s.job.name: Job name (if applicable)k8s.node.name: Node namek8s.pod.name: Pod namek8s.pod.start_time: Pod start timecontainer.image.tag: Container image tagk8s.container.restart_count: Number of the container restarts in the Podk8s_pod_uid: Pod unique identifier
Troubleshooting
If you encounter issues with log or metric collection, do the following:-
Verify the agent is running:
-
Check agent logs for errors:
The Grafana Labs Marks are trademarks of Grafana Labs, and are used with Grafana Labs’ permission. We are not affiliated with, endorsed or sponsored by Grafana Labs or its affiliates.