{"id":20444806,"url":"https://github.com/balena-io/logs-to-vector","last_synced_at":"2026-04-02T13:55:05.718Z","repository":{"id":40398524,"uuid":"481985754","full_name":"balena-io/logs-to-vector","owner":"balena-io","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-25T23:32:24.000Z","size":215,"stargazers_count":7,"open_issues_count":5,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-03-25T23:49:35.077Z","etag":null,"topics":["balenablock","logging"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balena-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-15T14:32:20.000Z","updated_at":"2026-03-25T23:32:27.000Z","dependencies_parsed_at":"2023-02-17T21:10:21.033Z","dependency_job_id":"e9a7d786-0032-4410-b624-84b6c1995744","html_url":"https://github.com/balena-io/logs-to-vector","commit_stats":null,"previous_names":["balena-io/logs-to-vector"],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/balena-io/logs-to-vector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io%2Flogs-to-vector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io%2Flogs-to-vector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io%2Flogs-to-vector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io%2Flogs-to-vector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balena-io","download_url":"https://codeload.github.com/balena-io/logs-to-vector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io%2Flogs-to-vector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["balenablock","logging"],"created_at":"2024-11-15T10:09:05.384Z","updated_at":"2026-04-02T13:55:05.713Z","avatar_url":"https://github.com/balena-io.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logs-to-vector\n\nA log collection agent that ships logs from the balena engine to a downstream\nlog aggregator.  It uses [Vector][vector] as an agent to collect the logs from\njournald, add labels to the logs, and send the logs to a log aggregator.\n\nImportant: Starting v1.0.0, logs-to-vector now uses Vector API v2 which is incompatible\nwith Vector API v1.  If you are using a Vector API v1 endpoint, please use\nlogs-to-vector v0.2.1 instead.\n\nThe agent currently ships logs to the following log aggregators:\n- [Vector][vector]\n\n\n## Usage\n\nTo use this image, create a service in your `docker-compose.yml` as shown below:\n```\nversion: \"2.1\"\n\nvolumes:\n  logs-to-vector: {}\n\nlogs-to-vector:\n    image: bh.cr/balena/logs-to-vector-aarch64\n    labels:\n      io.balena.features.journal-logs: '1'\n    restart: unless_stopped\n    volumes:\n      - logs-to-vector:/var/lib/logs-to-vector\n```\n\nYou can also set your docker-compose.yml to build from a Dockerfile.template file.\nYou may add your own Vector sinks that takes `balena` as input.\n\n*docker-compose.yml*:\n```\nversion: \"2.1\"\n\nvolumes:\n  logs-to-vector: {}\n\nservices:\n  logs-to-vector:\n    build: ./\n    labels:\n      io.balena.features.journal-logs: '1'\n    restart: unless_stopped\n    volumes:\n      - logs-to-vector:/var/lib/logs-to-vector\n```\n\n*Dockerfile.template*\n```\nFROM bh.cr/balena/logs-to-vector-aarch64\n\nCOPY sink.yaml /etc/vector\n```\n\n*sink.yaml*\n```\nsinks:\n  console:\n    type: console\n    inputs:\n      - balena\n```\n\n\n## Customisation\n\n`logs-to-vector` can be configured via the following variables:\n\n| Environment Variable            | Default  | Description                                                |\n| ------------------------------- | -------- | ---------------------------------------------------------- |\n| `DISABLE`                       | `false`  | Disables the logshipper service                            |\n| `VECTOR_ACKNOWLEDGEMENTS_ENABLED` | `true` | Sources will wait for this sink to deliver the events before acknowledging receipt |\n| `VECTOR_BUFFER_DISK_MAX_SIZE`   | `268435488` | The maximum size of the buffer on the disk              |\n| `VECTOR_BUFFER_MEMORY_MAX_EVENTS` | `1000` | The maximum number of events allowed in the buffer         |\n| `VECTOR_BUFFER_TYPE`            | `memory` | The type of buffer to use (Options: `disk`, `memory`)      |\n| `VECTOR_BUFFER_WHEN_FULL`       | `drop_newest` | The behavior when the buffer becomes full (Options: `block`, `drop_newest`) |\n| `VECTOR_COMPRESSION_ENABLED`    | `true`   | Enables gRPC compression with gzip                         |\n| `VECTOR_ENDPOINT`               | ``       | The endpoint of the vector log aggregator. The value can be a string template that will be substituted with environment variables (e.g. `vector.$DOMAIN_NAME`). |\n| `VECTOR_REQUEST_TIMEOUT_SECS`   | `300`    | The maximum time a request can take before being aborted   |\n| `VECTOR_TLS_CA_FILE`            | ``       | An additional CA certificate file. The value can be a path to a file, a multi-line string, or a string encoded in base64. The value can be a string template that will be substituted with environment variables (e.g. `$CERTS_DIR/ca.pem`).      |\n| `VECTOR_TLS_CRT_FILE`           | ``       | The client certificate file. The value can be a path to a file, a multi-line string, or a string encoded in base64. The value can be a string template that will be substituted with environment variables (e.g. `$CERTS_DIR/cert.pem`). |\n| `VECTOR_TLS_KEY_FILE`           | ``       | The client certificate key file. The value can be a path to a file, a multi-line string, or a string encoded in base64. The value can be a string template that will be substituted with environment variables (e.g. `$CERTS_DIR/cert.key`). |\n| `VECTOR_TLS_VERIFY_CERTIFICATE` | `true`   | Verifies the TLS certificate of the remote hos             |\n| `VECTOR_TLS_VERIFY_HOSTNAME`    | `true`   | Verifies the endpoint hostname against the TLS certificate |\n\nYou can refer to the [docs](https://www.balena.io/docs/learn/manage/serv-vars/#environment-and-service-variables) on how to set environment or service variables\n\nAlternatively, you can set them in the `docker-compose.yml` or `Dockerfile.template` files.\n\n[vector]: https://vector.dev\n\n\n## Testing\n\nThis project includes an integration-style test flow wired via Docker Compose.\n\nTo run the tests, make sure you have Docker and Docker Compose installed, then run:\n\n```bash\ndocker compose -f docker-compose.test.yaml run --rm sut\n```\n\nWhat this does:\n\n* Uses docker-compose.test.yaml as the compose configuration file.\n* Starts the supporting services (setup, aggregator, logs-to-vector) as defined.\n* Runs the sut service, which executes the test script (/usr/bin/sut.sh).\n* Automatically removes the sut container when the test run completes.\n\nIf the command exits with status 0, the tests passed; any non-zero exit code indicates a failure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io%2Flogs-to-vector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalena-io%2Flogs-to-vector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io%2Flogs-to-vector/lists"}