prometheus.adoc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [#prometheus]
  2. = Prometheus
  3. OliveTin supports basic Prometheus metrics, and the project is interested to hear about what more metrics people would find useful, as well!
  4. To enable Prometheus support;
  5. .`config.yaml`
  6. [source,yaml]
  7. ----
  8. logLevel: INFO
  9. prometheus:
  10. enabled: true
  11. defaultGoMetrics: false
  12. ----
  13. It is required to restart OliveTin after changing the `prometheus` configuration.
  14. The `defaultGoMetrics` option will enable the default Go metrics, which expose metrics like go_memstats_alloc_bytes, or go_memstats_heap_alloc_bytes,
  15. and generally most people don't need these.
  16. This will give you metrics available at http://yourserver:1337/metrics. The page should look something like this;
  17. [source]
  18. ----
  19. # HELP olivetin_actions_requested_count The actions requested count
  20. # TYPE olivetin_actions_requested_count gauge
  21. olivetin_actions_requested_count 0
  22. # HELP olivetin_config_action_count Then number of actions in the config file
  23. # TYPE olivetin_config_action_count gauge
  24. olivetin_config_action_count 18
  25. # HELP olivetin_config_reloaded_count The number of times the config has been reloaded
  26. # TYPE olivetin_config_reloaded_count counter
  27. olivetin_config_reloaded_count 1
  28. # HELP olivetin_sv_count The number entries in the sv map
  29. # TYPE olivetin_sv_count gauge
  30. olivetin_sv_count 49
  31. ----