{"id":20260398,"url":"https://github.com/influxdata/influxdb-stack-manager","last_synced_at":"2026-02-17T07:09:17.300Z","repository":{"id":37965987,"uuid":"355941637","full_name":"influxdata/influxdb-stack-manager","owner":"influxdata","description":"CLI tool to make managing stacks easier","archived":false,"fork":false,"pushed_at":"2022-06-13T11:47:57.000Z","size":316,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T01:41:30.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/influxdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-04-08T14:33:35.000Z","updated_at":"2023-02-13T21:05:11.000Z","dependencies_parsed_at":"2022-08-31T18:13:04.062Z","dependency_job_id":null,"html_url":"https://github.com/influxdata/influxdb-stack-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/influxdata/influxdb-stack-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Finfluxdb-stack-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Finfluxdb-stack-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Finfluxdb-stack-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Finfluxdb-stack-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/influxdata","download_url":"https://codeload.github.com/influxdata/influxdb-stack-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/influxdata%2Finfluxdb-stack-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264585372,"owners_count":23632646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-14T11:19:26.488Z","updated_at":"2025-10-13T09:44:23.722Z","avatar_url":"https://github.com/influxdata.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfluxDB Stack Manager\n\nThe [influx cli tool](https://github.com/influxdata/influx-cli) provides\nthe ability to manage dashboards, tasks etc. in a collection called a \"stack\".\nIt provides the ability to export a template for all of these objects, and\napply a modified version to update our stack.\n\nThis tool builds on top of the influx cli to make working with that template\nfile a better, and easier experience. It transforms the single large yaml file,\nwith inlined flux code like this:\n\n![Full template](/screenshots/full-template.png?raw=true)\n\n\nInto a well-organised set of individual templates, with the flux code extracted\nso we can work with it easily, like this:\n\n![Separated templates](/screenshots/separated-templates.png?raw=true)\n\n\n\n## Installation\n\nThis tool can be built using [go](https://golang.org/) by running:\n`go install github.com/influxdata/influxdb-stack-manager`.\n\nThe influx cli tool will also need to be installed, and can be found\n[here](https://github.com/influxdata/influxdb).\n\n\n## Basic Usage\n\nTo first create a stack to manage, you will need to use the influx cli\ntool itself. To create a stack, run:\n\n```bash\ninflux stacks init -n MyStackName -d MyStackDescription\n```\n\nTo add resources to the stack, you will need to know their IDs which\ncan be found either from the influxdb UI, or by listing them, and then\nupdating the stack with the new resources:\n\n```bash\ninflux dashboards\ninflux task list\n\ninflux stacks update --stack-id $STACK_ID \\\n    --addResource=Dashboard=$DASHBOARD_ID\n    --addResource=Task=$TASK_ID\n```\n\nWith the stack created, you can use the influxdb-stack-manager to actually\nfetch your templates and push up any changes.\n\n```\ninfluxdb-stack-manager pull \u003cstack-id\u003e\n```\n\nPlease be aware though, that this will destructively update the template\ndirectory (which can be specified using the `--directory` or `-d` argument).\n\nTo apply any changes you've made to a stack, run:\n\n```\ninfluxdb-stack-manager push \u003cstack-id\u003e\n```\n\nHelp can be found on by supplying an `-h` or `--help` argument to any command.\n\n\n## Templating\n\nIf you would like to use the same templates for multiple stacks (in the same or\ndifferent influxdb clusters), you may want to inject data into the templates or\nflux code. To do this:\n\n### 1. Add fields to your templates/flux queries\n\nThe templates and flux queries can be amended to use injected fields using the\n[golang templating syntax](https://pkg.go.dev/text/template). For example, if\nI wanted to inject a set of thresholds which I would alert on, I could inject\nthe field `{{ .Thresholds.CPU }}`.\n\n\n### 2. Create a data file with the values to inject\n\nThe data to be injected can be specified either in json or yaml format, for example:\n\n```json\n{\n  \"Thresholds\": {\n    \"CPU\": 75.0,\n    \"Memory\": 60.0\n  }\n}\n```\n\n```yaml\nThresholds:\n  CPU: 75.0\n  Memory: 60.0\n```\n\n### 3. Specify the data file when pushing\n\nWhen pushing, add the `--data-file` flag:\n\n```\ninfluxdb-stack-manager push \u003cstack-id\u003e --data-file \"data/cluster-1.yml\"\n```\n\n\n## TODO\n\n - [ ] Provide release binaries\n - [ ] Provide docker images\n - [ ] Allow running queries with injected data\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxdata%2Finfluxdb-stack-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfluxdata%2Finfluxdb-stack-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfluxdata%2Finfluxdb-stack-manager/lists"}