logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

prom_ex.ex (1203B)


  1. defmodule Pleroma.PromEx do
  2. use PromEx, otp_app: :pleroma
  3. alias PromEx.Plugins
  4. @impl true
  5. def plugins do
  6. [
  7. # PromEx built in plugins
  8. Plugins.Application,
  9. Plugins.Beam,
  10. {Plugins.Phoenix, router: Pleroma.Web.Router, endpoint: Pleroma.Web.Endpoint},
  11. Plugins.Ecto,
  12. Plugins.Oban
  13. # Plugins.PhoenixLiveView,
  14. # Plugins.Absinthe,
  15. # Plugins.Broadway,
  16. # Add your own PromEx metrics plugins
  17. # Pleroma.Users.PromExPlugin
  18. ]
  19. end
  20. @impl true
  21. def dashboard_assigns do
  22. [
  23. datasource_id: Pleroma.Config.get([Pleroma.PromEx, :datasource]),
  24. default_selected_interval: "30s"
  25. ]
  26. end
  27. @impl true
  28. def dashboards do
  29. [
  30. # PromEx built in Grafana dashboards
  31. {:prom_ex, "application.json"},
  32. {:prom_ex, "beam.json"},
  33. {:prom_ex, "phoenix.json"},
  34. {:prom_ex, "ecto.json"},
  35. {:prom_ex, "oban.json"}
  36. # {:prom_ex, "phoenix_live_view.json"},
  37. # {:prom_ex, "absinthe.json"},
  38. # {:prom_ex, "broadway.json"},
  39. # Add your dashboard definitions here with the format: {:otp_app, "path_in_priv"}
  40. # {:pleroma, "/grafana_dashboards/user_metrics.json"}
  41. ]
  42. end
  43. end