{"id":37854441,"url":"https://github.com/dbtuneai/dbtune-agent","last_synced_at":"2026-01-16T16:24:32.460Z","repository":{"id":275005521,"uuid":"917112343","full_name":"dbtuneai/dbtune-agent","owner":"dbtuneai","description":"Open-source Agent to observe and optimize your PostgreSQL database","archived":false,"fork":false,"pushed_at":"2026-01-13T10:26:15.000Z","size":429,"stargazers_count":9,"open_issues_count":6,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-13T13:28:01.334Z","etag":null,"topics":["agent","postgresql"],"latest_commit_sha":null,"homepage":"https://www.dbtune.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbtuneai.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-15T11:29:57.000Z","updated_at":"2026-01-13T10:26:17.000Z","dependencies_parsed_at":"2025-02-26T11:31:36.190Z","dependency_job_id":"3792883d-0226-48db-81df-9d6cac943aa7","html_url":"https://github.com/dbtuneai/dbtune-agent","commit_stats":null,"previous_names":["dbtuneai/dbtune-agent","dbtuneai/agent"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/dbtuneai/dbtune-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtuneai%2Fdbtune-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtuneai%2Fdbtune-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtuneai%2Fdbtune-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtuneai%2Fdbtune-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbtuneai","download_url":"https://codeload.github.com/dbtuneai/dbtune-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtuneai%2Fdbtune-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["agent","postgresql"],"created_at":"2026-01-16T16:24:31.938Z","updated_at":"2026-01-16T16:24:32.446Z","avatar_url":"https://github.com/dbtuneai.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eDBtune agent\u003c/h1\u003e\n\n![Go](https://img.shields.io/badge/golang-00ADD8?\u0026style=plastic\u0026logo=go\u0026logoColor=white)\n\nThe DBtune agent is a lightweight, extensible monitoring and configuration management tool for PostgreSQL databases. It collects system metrics, database performance data, and manages database configurations through a centralized DBtune software as a service.\n\n## PostgreSQL providers supported\n\n- PostgreSQL -\n  [docs](https://docs.dbtune.com/postgresql),\n  [config](pkg/pgprem/CONFIG.md)\n- AWS Aurora PostgreSQL -\n  [docs](https://docs.dbtune.com/aws-aurora),\n  [config](pkg/rds/CONFIG.md)\n- AWS RDS PostgreSQL -\n  [docs](https://docs.dbtune.com/aws-rds),\n  [config](pkg/rds/CONFIG.md)\n- Google Cloud SQL -\n  [docs](https://docs.dbtune.com/google-cloud-sql),\n  [config](pkg/cloudsql/CONFIG.md)\n- Aiven -\n  [docs](https://docs.dbtune.com/aiven),\n  [config](pkg/aiven/CONFIG.md)\n- Azure Flexible Server -\n  [docs](https://docs.dbtune.com/azure-flex-server),\n  [config](pkg/azureflex/CONFIG.md)\n- CloudNativePG -\n  [docs](https://docs.dbtune.com/cnpg),\n  [config](pkg/cnpg/CONFIG.md)\n\n## Quick start\nYou can use the binary or our docker image to run the `dbtune-agent`.\n[Configuration](#Configuration) is done with a `dbtune.yaml` and is required for running.\n[See here for more advanced deployment options](#advanced-deployments)\n\n\u003e [!IMPORTANT]\n\u003e Please check the relevant documentation page for your provider for the pre-requisites required for `dbtune-agent` to operate properly.\n\n### Docker\n\n```bash\ndocker pull --platform linux/amd64 public.ecr.aws/dbtune/dbtune/agent:latest\n\n# Run with a dbtune.yaml\ndocker run \\\n    -v $(pwd)/dbtune.yaml:/app/dbtune.yaml \\\n    --name dbtune-agent \\\n    public.ecr.aws/dbtune/dbtune/agent:latest\n        \n# OR... run with environment variables.\ndocker run \\\n    -e DBT_POSTGRESQL_CONNECTION_URL=postgresql://user:password@localhost:5432/database \\\n    -e DBT_DBTUNE_SERVER_URL=https://app.dbtune.com \\\n    -e DBT_DBTUNE_API_KEY=your-api-key \\\n    -e DBT_DBTUNE_DATABASE_ID=your-database-id \\\n    -e DBT_POSTGRESQL_INCLUDE_QUERIES=true \\\n    public.ecr.aws/dbtune/dbtune/agent:latest\n```\n\n### Binary\nYou can use the one-liner below to fetch the latest binary for your system, from our [releases page](https://github.com/dbtuneai/dbtune-agent/releases).\n\n```bash\ncurl https://raw.githubusercontent.com/dbtuneai/dbtune-agent/refs/heads/main/setup.sh \u003e /tmp/dbtune-agent.sh \u0026\u0026 sh /tmp/dbtune-agent.sh\n./dbtune-agent\n```\n\nAlternatively, you can [build from source](#build-from-source).\n\nYou can further deploy this as a [systemd service](#systemd).\n\n## Configuration\nConfiguration can be done via a `dbtune.yaml` file, which is looked up in the following places,\nordered by priority:\n* `/etc/dbtune.yaml`\n* `/etc/dbtune/dbtune.yaml`\n* `./dbtune.yaml` (Relative to the path from which `dbtune-agent` was executed)\n\nEach PostgreSQL provider has [different configuration options](#PostgreSQL-providers-supported), so please refer to their specific configuration options.\nPlease also take note of any pre-requisites required for the `dbtune-agent` to be able to read\nsystem metrics.\n\nThe shared options for the `dbtune.yaml` are listed below:\n\n```yaml\n# dbtune.yaml\npostgresql:\n  connection_url: postgresql://user:password@localhost:5432/database # Connection url to your database\n  include_queries: true # Whether to include place-holdered query text when transmitting to DBtune.\n                        # This is provided so that you can identify you queries by their text.\n                        # DBtune does not require this info, and will instead display query ids\n                        # if this is disabled.\n\n# Optional\nguardrail_settings:\n  memory_threshold: 90  # The percentage at which the dbtune-agent triggers a memory gaurdrail\n                        # DBtune will act to prevent an OOM if this threshold is reached\n                        # during tuning.\ndbtune:\n  server_url: https://app.dbtune.com\n  api_key:  \"\" # Provided when you create a database on DBtune\n  database_id: \"\" # Provided when you create a database on DBtune\n\ndebug: false\n```\n\nThe shared options for environment variables are listed below:\n\n```bash\nexport DBT_DBTUNE_SERVER_URL=\"https://app.dbtune.com\"\nexport DBT_DBTUNE_API_KEY=\"\"\nexport DBT_DBTUNE_DATABASE_ID=\"\"\nexport DBT_POSTGRESQL_INCLUDE_QUERIES=true\n\n# Your database specific\nexport DBT_POSTGRESQL_CONNECTION_URL=postgresql://user:password@localhost:5432/database \n```\n\n## Advanced deployments\n\n### Build from source\nTo build the DBtune agent from source, you'll need Go 1.23.1 or later installed on your system.\n\n```bash\ngit clone https://github.com/dbtuneai/dbtune-agent.git\ncd dbtune-agent\n\n# Download dependencies and build\ngo mod download\ngo build -o dbtune-agent ./cmd/agent.go\n```\n\n### Systemd\nCreate a systemd service with the following config and save it as `/etc/systemd/system/dbtune-agent.service`.\n\n```bash\n[Unit]\nDescription=DBtune agent\nAfter=network.target\n\n[Service]\nUser=dbtune   # User that runs the dbtune-agent, can be root\nGroup=dbtune  # Group to run the dbtune-agent with\nWorkingDirectory=/usr/local/bin\nExecStart=/usr/local/bin/dbtune-agent\nRestart=always\nRestartSec=5s\nStandardOutput=journal\nStandardError=journal\n\n[Install]\nWantedBy=multi-user.target\n```\n\nMake sure the user and group that you specify in the systemd service has rights to access postgres data files and also is allowed to use sudo without a password to do a systemd restart of the postgresql service e.g. `sudo systemctl restart postgres`.\n\nReload the unit files and enable the dbtune-agent.service:\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable --now dbtune-agent\n```\n\nOnce started you can check and verify that the dbtune-agent is running by looking at the journal, for example: `journalctl -u dbtune-agent -f`\n\n### AWS Fargate / ECS\nFollow these [README](fargate/README.md) instructions to run the agent under AWS Fargate as a service.\n\n## Metric collection\n\nThe agent collects essential metrics required for DBtune's optimization engine, you can find more information about the metrics [here](https://docs.dbtune.com/agent-monitoring-and-privacy).\n\n## How to contribute\n\n- Fork the repo and create a new branch\n- Then make a PR to the main branch\n\n### Getting help\n\n- Check our [documentation](https://docs.dbtune.com)\n- Email support: support at dbtune.com\n\n## License\n\nSee github.com/dbtuneai/agent//blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbtuneai%2Fdbtune-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbtuneai%2Fdbtune-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbtuneai%2Fdbtune-agent/lists"}