Tool to help you manage your Grafana dashboards using Git.

config.example.yaml 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # If set, skip verification of the TLS certificates
  13. # You should not set it in Production environments
  14. # boolean and optional.
  15. insecure: false
  16. # Settings to interact with the Git repository. Currently only SSH repos are
  17. # supported.
  18. git:
  19. # SSH URL to the repository. The user part (usually "git@" at the beginning
  20. # of the URL) must be excluded.
  21. url: "git.company.tld:it/grafana-dashboards.git"
  22. # SSH user that can pull and push from and to the git repository. Usually
  23. # it's just "git".
  24. user: git
  25. # Path to the private key used to authenticate on Git. It is recommended to
  26. # use a passphraseless key.
  27. private_key: /etc/grafana-dashboards-manager/id_rsa_nopasswd
  28. # Path to the directory where the git repository lies on the disk. If the
  29. # directory doesn't exist, it will be created and the repository will be
  30. # cloned into it.
  31. clone_path: /tmp/grafana-dashboards
  32. # Author of the commit created in the puller.
  33. commits_author:
  34. # Author's name.
  35. name: Grafana Dashboard Manager
  36. # Author's email.
  37. email: grafana-dashboards-manager@company.tld
  38. # An alternative to Git synchronisation is the "simple sync" mode. This will
  39. # only back up your dashboards on the disk and won't do anything else.
  40. # Here is an example of the synchronisation for the simple sync mode:
  41. #
  42. # simple_sync:
  43. # sync_path: /etc/grafana-dashboards
  44. #
  45. # Note that if Git settings are supplied, the settings there will be used even
  46. # if there are settings for the "simple sync" mode. In this case, if settings for
  47. # the "simple sync" mode are supplied, they will be ignored by the configuration.
  48. # Note also that the "simple sync" mode doesn't work with the pusher, which needs
  49. # Git settings to work.
  50. # Configuration for the Git -> Grafana pusher. Optional (only required if you
  51. # try to run the pusher).
  52. pusher:
  53. # Mode which will define how the pusher will sync with the Git remote.
  54. # Currently, only two modes are supported:
  55. # webhook: sets up a webhook which will listen for requests from the
  56. # Git remote, and use the content of a request's body to
  57. # determine what to push to Grafana. Currently only GitLab
  58. # webhooks are supported.
  59. # git-pull: sets up a routine that will pull from the Git remote on a
  60. # given interval, and compare the updated Git history with the
  61. # previous one to determine what to push to Grafana.
  62. sync_mode: webhook
  63. # Configuration for the given sync mode. The current uncommented exemple
  64. # works for the "webhook" mode. Here's a config example for the "git-pull"
  65. # mode:
  66. #
  67. # config:
  68. # # Interval at which the remote should be pulled, in seconds.
  69. # interval: 3600
  70. #
  71. config:
  72. # Interface the webhook will listen on.
  73. interface: 127.0.0.1
  74. # Port the webhool will listen on.
  75. port: 8080
  76. # Path on which the webhook will live. Full webhook URL will be
  77. # interface:port/path.
  78. path: /gitlab-webhook
  79. # Secret GitLab will use to authenticate the requests.
  80. secret: mysecret