Skip to main content
Astro Private Cloud (APC) provides centralized logging through Vector and Elasticsearch. Vector collects Airflow task logs and Airflow component logs, and indexes them in Elasticsearch for search and troubleshooting.
This page covers the Vector DaemonSet pipeline that ships task and component logs. The APC API control plane audit events have a separate Vector sidecar with its own configuration and supported sinks. See the APC API audit logging overview.

Architecture

Vector runs as a DaemonSet on every node. It collects logs from Pods that carry an Airflow component label, such as scheduler, worker, triggerer, api-server, webserver, dag-processor, dag-server, and git-sync-relay. It doesn’t collect logs from platform components such as the APC API or the Registry. Vector ships the logs to Elasticsearch for storage and indexing. For log visualization, you can connect your own tools (Kibana, Grafana, OpenSearch Dashboards) to query Elasticsearch.

Access logs

Airflow UI

Task logs are accessible directly in the Airflow UI:
  1. Go to the Dag run.
  2. Click a task instance.
  3. Click Log.

Elasticsearch API

Vector writes one index per Deployment per day. The index name is <index-name-prefix>.<deployment-release-name>.<date>. The prefix defaults to fluentd when the DaemonSet ships the logs, and to vector when the logging sidecar ships them. Set global.logging.indexNamePrefix to use a different prefix. Query logs directly through Elasticsearch:
On a data plane that uses a domain prefix, the host is elasticsearch.<domain-prefix>.<base-domain>.

BYO visualization

APC doesn’t include a log visualization UI. Connect your preferred tool to Elasticsearch:
  • Kibana: Deploy separately and point to the Elasticsearch endpoint.
  • Grafana: Use the Elasticsearch data source.
  • OpenSearch Dashboards: Use Elasticsearch API compatibility.

Vector configuration

Vector is the log collection agent in APC.

Enable Vector

The vector key appears twice. The outer key is the subchart, and the inner key is the container in the DaemonSet Pod.

Logging sidecar

APC supports either DaemonSet or sidecar logging on a data plane cluster, but not both at the same time. To use sidecar logging, first disable the Vector DaemonSet, then enable the sidecar:
The chart sets repository and tag for the sidecar image. Override them only when you use a private registry or a specific Vector version. For the complete procedure, see Export logs using container sidecars.

Custom log parsing

The chart generates the Vector DaemonSet configuration and mounts it as a read-only ConfigMap. You can’t change its sources or transforms with a Helm value. The one supported addition is an extra sink. See Forward to external systems. To change how logs are parsed, use the logging sidecar with your own Vector configuration:
  1. Set global.logging.loggingSidecar.customConfig to true.
  2. Write a complete Vector configuration file.
  3. Create the sidecar-config secret from that file in the platform namespace, annotate the secret with astronomer.io/commander-sync, and run the config syncer job to copy it into the Deployment namespaces.
customConfig: true doesn’t create a configuration for you. It stops APC from creating the default sidecar configuration, so the sidecar has no configuration until you create and sync the secret. Do all three steps together.
For the full procedure, with example configurations for Elasticsearch, Datadog, and Honeycomb, see Customize Vector logging sidecars.

Elasticsearch configuration

Enable Elasticsearch

Log retention

An Elasticsearch curator CronJob deletes log indices that are more than 10 days old. To change the retention period:
To inspect or delete indices yourself, see Manage Elasticsearch log indices.

External logging

Forward to external Elasticsearch

Send logs to your own Elasticsearch cluster:
For the full procedure, including how to store the credentials in a Kubernetes secret, see Use an external Elasticsearch instance for Airflow task log management.

Forward to S3

Archive logs to object storage with an extra sink. The inputs value must name a transform from the generated DaemonSet configuration. The last transform in that pipeline is transform_remove_fields:
The sink also needs AWS credentials. For the complete procedure, see Forward logs to Amazon S3.

Forward to external systems

Use vector.extraSinks to send logs to any destination that Vector supports. APC adds these sinks to the generated configuration and keeps the Elasticsearch sink:
Vector reads ${SPLUNK_TOKEN} and ${DATADOG_API_KEY} from its own environment. Add environment variables as key-value pairs:
vector.extraEnv takes literal values only. It can’t read a value from a Kubernetes secret.

Deployment log settings

Task log retention

The log groomer sidecar deletes old task log files from the Airflow Pods. deployments.helm.airflow.*.logGroomerSidecar is a deployments.* setting, so cluster configuration is the final layer here: the cluster value wins when both values.yaml and a cluster override are set. See Configure Astro Private Cloud for the precedence rules. To change retention for one data plane cluster, add the following to that cluster’s Configuration Override in the Astro UI, or pass it as deploymentsConfigOverride on the updateCluster Houston API mutation. See Update data plane cluster configurations.
To change the platform default for clusters that don’t have their own saved value for this key, update values.yaml and run a Helm upgrade instead:

Log level configuration

Set the Airflow log level with environment variables on a Deployment. See Environment variables.

Reduce excessive Dag processor logging

In multi-deployment environments (for example, 1,000 or more Deployments each running multiple Dags), Deployments with Dags that have import errors can produce continuous, repetitive scheduler and Dag processor log entries every few seconds. The setting that reduces this noise depends on the Airflow version your Deployment runs.

Airflow 3

Airflow 3 uses [dag_processor] bundle_refresh_check_interval to control how often the Dag processor checks whether any Dag bundle is ready for a refresh, either because the bundle’s own refresh_interval has elapsed or because another Dag processor has seen a newer version of the bundle. A lower value keeps multiple Dag processors in sync with each other faster, but generates more frequent log activity. The default is 5 seconds. Increase this value to reduce how often the check and its associated logging occur. Set the following environment variable on the affected Deployment:

Airflow 2

Airflow 2 uses [logging] dag_processor_manager_log_stdout to control whether Dag processor manager logs are also sent to stdout, in addition to the dedicated manager log file (dag_processor_manager.log under the configured log directory). The default is False. In containerized Deployments where log aggregation or shipping only captures container stdout (for example, Vector or Fluentd), keeping this set to False prevents the noisy, frequently repeating manager output from being shipped:

Query logs

Elasticsearch query examples

Find task failures

level_numeric is 40 for errors and 50 for critical events:

Search specific Dag

Filter by time range

Common log fields

Vector removes the kubernetes, host, and file fields before it sends a log to Elasticsearch, so you can’t search on them. Use component, namespace, and release instead.

Log types

The log_type value a log gets depends on which Vector pipeline collected it: On Airflow 2 Deployments, component logs are log_type: system, not log_type: component. To find logs for a specific Airflow component on any Airflow version, filter on the component field instead of log_type.

Troubleshooting

Logs aren’t appearing

  1. Check Vector is running:
  2. Check Elasticsearch health:
  3. Verify Vector logs:

High disk usage

  1. Reduce elasticsearch.curator.age.unit_count to delete indices sooner.
  2. Delete the largest indices. See Manage Elasticsearch log indices.
  3. Increase elasticsearch.data.persistence.size.
  4. Reduce log verbosity.
  5. Forward logs to external storage (S3) for long-term retention.

Slow queries

  1. Query one Deployment’s indices instead of all indices.
  2. Narrow the time range.
  3. Increase Elasticsearch resources.

Security

Access control

The chart has no Helm value that turns on Elasticsearch authentication. Airflow components read task logs through the nginx-es proxy in the platform namespace. The proxy authenticates each request with the APC API and rewrites the query so that a Deployment reads only its own indices. It allows the _search, _count, _bulk, _cluster/health, and _cluster/state/version paths, and denies every other path. The elasticsearch.<base-domain> ingress goes to Elasticsearch directly. Restrict access to that host with your ingress controller and your network policies. See Network configuration.

Log redaction

You can’t add a transform to the Vector DaemonSet. To redact values before Elasticsearch indexes them, use the logging sidecar with a custom configuration and add a remap transform to it:
The transform is part of the complete sidecar configuration file, so the next transform or the sink must name redact in its inputs. See Custom log parsing.

Best practices

  • Set the curator retention period from your compliance requirements.
  • Use log levels wisely — avoid DEBUG in production.
  • Enable the log groomer to prevent disk exhaustion on Airflow Pods.
  • Forward logs externally for long-term retention and compliance.
  • Monitor Elasticsearch health and disk usage.
  • Use your preferred visualization tool — deploy Kibana, Grafana, or other tools separately.