Tool to help you manage your Grafana dashboards using Git.

config.example.yaml 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Settings to connect to the Grafana instance.
  2. grafana:
  3. # Base URL for the Grafana instance.
  4. base_url: https://grafana.company.tld
  5. # Grafana API key. This is generated by Grafana, as explained at
  6. # http://docs.grafana.org/http_api/auth/#create-api-token
  7. api_key: apiauthkey
  8. # If set, all dashboards with a name starting with this prefix will be
  9. # ignored by both the puller and the pusher. This setting is
  10. # case-insensitive and optional.
  11. ignore_prefix: test
  12. # Settings to interact with the Git repository. Currently only SSH repos are
  13. # supported.
  14. git:
  15. # SSH URL to the repository. The user part (usually "git@" at the beginning
  16. # of the URL) must be excluded.
  17. url: "git.company.tld:it/grafana-dashboards.git"
  18. # SSH user that can pull and push from and to the git repository. Usually
  19. # it's just "git".
  20. user: git
  21. # Path to the private key used to authenticate on Git. It is recommended to
  22. # use a passphraseless key.
  23. private_key: /etc/grafana-dashboard-manager/id_rsa_nopasswd
  24. # Path to the directory where the git repository lies on the disk. If the
  25. # directory doesn't exist, it will be created and the repository will be
  26. # cloned into it.
  27. clone_path: /tmp/grafana-dashboards
  28. # Author of the commit created in the puller.
  29. commits_author:
  30. # Author's name.
  31. name: Grafana Dashboard Manager
  32. # Author's email.
  33. email: grafana-dashboard-manager@company.tld
  34. # Configuration for the Git -> Grafana pusher.
  35. pusher:
  36. # Mode which will define how the pusher will sync with the Git remote.
  37. # Currently, only two modes are supported:
  38. # webhook: sets up a webhook which will listen for requests from the
  39. # Git remote, and use the content of a request's body to
  40. # determine what to push to Grafana. Currently only GitLab
  41. # webhooks are supported.
  42. # git-pull: sets up a routine that will pull from the Git remote on a
  43. # given interval, and compare the updated Git history with the
  44. # previous one to determine what to push to Grafana.
  45. sync_mode: webhook
  46. # Configuration for the given sync mode. The current uncommented exemple
  47. # works for the "webhook" mode. Here's a config example for the "git-pull"
  48. # mode:
  49. #
  50. # config:
  51. # # Interval at which the remote should be pulled, in seconds.
  52. # interval: 3600
  53. #
  54. config:
  55. # Interface the webhook will listen on.
  56. interface: 127.0.0.1
  57. # Port the webhool will listen on.
  58. port: 8080
  59. # Path on which the webhook will live. Full webhook URL will be
  60. # interface:port/path.
  61. path: /gitlab-webhook
  62. # Secret GitLab will use to authenticate the requests.
  63. secret: mysecret