{"id":13581750,"url":"https://github.com/mpostument/grafana-sync","last_synced_at":"2025-04-06T00:10:15.054Z","repository":{"id":37085296,"uuid":"323400343","full_name":"mpostument/grafana-sync","owner":"mpostument","description":"Keep your Grafana dashboards in sync","archived":false,"fork":false,"pushed_at":"2024-01-08T01:08:10.000Z","size":440,"stargazers_count":219,"open_issues_count":15,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T22:11:17.007Z","etag":null,"topics":["cobra","go","golang","grafana","grafana-dashboard"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpostument.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"mpostument"}},"created_at":"2020-12-21T17:11:48.000Z","updated_at":"2025-02-03T21:54:29.000Z","dependencies_parsed_at":"2024-01-14T09:18:04.386Z","dependency_job_id":"2bf0c76a-840e-401b-af6a-234ad759350d","html_url":"https://github.com/mpostument/grafana-sync","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpostument%2Fgrafana-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpostument%2Fgrafana-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpostument%2Fgrafana-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpostument%2Fgrafana-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpostument","download_url":"https://codeload.github.com/mpostument/grafana-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415973,"owners_count":20935387,"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":["cobra","go","golang","grafana","grafana-dashboard"],"created_at":"2024-08-01T15:02:13.318Z","updated_at":"2025-04-06T00:10:15.038Z","avatar_url":"https://github.com/mpostument.png","language":"Go","funding_links":["https://patreon.com/mpostument"],"categories":["Go"],"sub_categories":[],"readme":"# grafana-sync\n\nKeep your grafana dashboards in sync.\n\n## Table of Contents\n\n- [grafana-sync](#grafana-sync)\n  - [Table of Contents](#table-of-contents)\n  - [Installing](#installing)\n  - [Getting Started](#getting-started)\n    - [Pull dashboards](#pull-dashboards)\n    - [Pull folder](#pull-folder)\n    - [Pull notifications](#pull-notifications)\n    - [Pull datasources](#pull-datasources)\n    - [Push dashboards](#push-dashboards)\n    - [Push folders](#push-folders)\n    - [Push notifications](#push-notifications)\n    - [Push datasources](#push-datasources)\n  - [Global parameters](#global-parameters)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Installing\n\nDownload the latest binary from [releases](https://github.com/mpostument/grafana-sync/releases)\nOr use docker image from [github registry](https://github.com/mpostument/grafana-sync/pkgs/container/grafana-sync)\n\n## Getting Started\n\n### Pull dashboards\n\n```shell\n# Save all dashboards to directory\ngrafana-sync pull-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000\n\n# Save all dashboards from specific folder to local directory using folder name\ngrafana-sync pull-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000 --folderName=\"TestFolder\"\n\n# Save all dashboards from specific folder to local directory using folder id\ngrafana-sync pull-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000 --folderId=1\n\n# Save dashboards with specific tags to directory\ngrafana-sync pull-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000 --tag=export\n```\n\n### Pull folder\n\n```shell\ngrafana-sync pull-folders --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"folders\" --url http://127.0.0.1:3000\n```\n\n### Pull notifications\n\n```shell\ngrafana-sync pull-notifications --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"notifications\" --url http://127.0.0.1:3000\n```\n\n### Pull datasources\n\n```shell\ngrafana-sync pull-datasources --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"datasources\" --url http://127.0.0.1:3000\n```\n\n### Push dashboards\n\n```shell\n# Push all dashboards to general directory\ngrafana-sync push-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000\n\n# Push dashboards to grafana in custom folder by folder name\ngrafana-sync push-dashboards --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000 --folderName=\"TestFolder\"\n\n# Push folders to grafana in custom folder by folder id\ngrafana-sync push-folders --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"dashboards\" --url http://127.0.0.1:3000 --folderId=1\n```\n\n### Push folders\n\n```shell\ngrafana-sync push-folders --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"folders\" --url http://127.0.0.1:3000\n```\n\n### Push notifications\n\n```shell\ngrafana-sync push-notifications --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"notifications\" --url http://127.0.0.1:3000\n```\n\n### Push datasources\n\n```shell\ngrafana-sync push-datasources --apikey=\"eyJrIjoiOWJYTktGNFlCbFVMOG1LY3d6ekN4Mmw4MFgyYU44a1UiLCJuIjoiY29icmEiLCJpZCI6MX0=\" --directory=\"datasources\" --url http://127.0.0.1:3000\n```\n\n## Global parameters\n\n`directory` - Directory where to save dashboards. Default `.`  \n`tag` - Dashboard tag to read. Supported only with `pull` option. Default `\"\"`  \n`apikey` - Grafana api key, need to be editor or admin. Default `\"\"`.  \nApi key can be stored in `$HOME/.grafana-sync.yaml` as `apikey: \u003cApiKey\u003e`  \n`url` - Grafana Url with port. Default `http://localhost:3000`  \n`customHeaders` - Key-value pairs of custom http headers (header1=value1,header2=value2)  \n\n## Contributing\n\n1. Fork it\n2. Download your fork to your PC ( `git clone https://github.com/your_username/grafana-sync \u0026\u0026 cd grafana-sync` )\n3. Create your feature branch ( `git checkout -b my-new-feature` )\n4. Make changes and add them ( `git add .` )\n5. Commit your changes ( `git commit -m 'Add some feature'` )\n6. Push to the branch ( `git push origin my-new-feature` )\n7. Create new pull request\n\n## License\n\ngrafana-sync is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/mpostument/grafana-sync/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpostument%2Fgrafana-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpostument%2Fgrafana-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpostument%2Fgrafana-sync/lists"}