Tool to help you manage your Grafana dashboards using Git.

config.example.yaml 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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-dashboards-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-dashboards-manager@company.tld
  34. # An alternative to Git synchronisation is the "simple sync" mode. This will
  35. # only back up your dashboards on the disk and won't do anything else.
  36. # Here is an example of the synchronisation for the simple sync mode:
  37. #
  38. # simple_sync:
  39. # sync_path: /etc/grafana-dashboards
  40. #
  41. # Note that if Git settings are supplied, the settings there will be used even
  42. # if there are settings for the "simple sync" mode. In this case, if settings for
  43. # the "simple sync" mode are supplied, they will be ignored by the configuration.
  44. # Note also that the "simple sync" mode doesn't work with the pusher, which needs
  45. # Git settings to work.
  46. # Configuration for the Git -> Grafana pusher. Optional (only required if you
  47. # try to run the pusher).
  48. pusher:
  49. # Mode which will define how the pusher will sync with the Git remote.
  50. # Currently, only two modes are supported:
  51. # webhook: sets up a webhook which will listen for requests from the
  52. # Git remote, and use the content of a request's body to
  53. # determine what to push to Grafana. Currently only GitLab
  54. # webhooks are supported.
  55. # git-pull: sets up a routine that will pull from the Git remote on a
  56. # given interval, and compare the updated Git history with the
  57. # previous one to determine what to push to Grafana.
  58. sync_mode: webhook
  59. # Configuration for the given sync mode. The current uncommented exemple
  60. # works for the "webhook" mode. Here's a config example for the "git-pull"
  61. # mode:
  62. #
  63. # config:
  64. # # Interval at which the remote should be pulled, in seconds.
  65. # interval: 3600
  66. #
  67. config:
  68. # Interface the webhook will listen on.
  69. interface: 127.0.0.1
  70. # Port the webhool will listen on.
  71. port: 8080
  72. # Path on which the webhook will live. Full webhook URL will be
  73. # interface:port/path.
  74. path: /gitlab-webhook
  75. # Secret GitLab will use to authenticate the requests.
  76. secret: mysecret