template.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ---
  2. kind: compose
  3. metadata:
  4. name: Grafana Alloy
  5. description: |-
  6. Grafana Alloy is an open telemetry collector that collects, processes, and exports metrics to various backends.
  7. ## Prerequisites
  8. - :warning: When alloy runs in a container, you should set the `container_hostname` to a unique value to identify
  9. the instance in your monitoring backend. Otherwise it defaults to the container ID.
  10. ## Resources
  11. - **Project**: https://grafana.com/oss/alloy/
  12. - **Documentation**: https://grafana.com/docs/alloy/latest/
  13. - **GitHub**: https://github.com/grafana/alloy
  14. version: v1.12.1
  15. author: Christian Lempa
  16. date: '2025-12-15'
  17. tags:
  18. - traefik
  19. icon:
  20. provider: selfh
  21. id: grafana
  22. next_steps:
  23. schema: 1.2
  24. spec:
  25. general:
  26. vars:
  27. service_name:
  28. default: alloy
  29. container_hostname:
  30. description: Container internal hostname
  31. type: str
  32. restart_policy:
  33. description: Container restart policy
  34. type: enum
  35. options:
  36. - unless-stopped
  37. - always
  38. - on-failure
  39. - 'no'
  40. default: unless-stopped
  41. required: true
  42. logs:
  43. title: Log Collection
  44. toggle: logs_enabled
  45. vars:
  46. logs_docker:
  47. description: Enable Docker container log collection
  48. type: bool
  49. default: true
  50. logs_enabled:
  51. description: Enable log collection
  52. type: bool
  53. default: false
  54. logs_loki_url:
  55. description: Loki endpoint URL for sending logs
  56. type: url
  57. default: http://loki:3100/loki/api/v1/push
  58. required: true
  59. logs_system:
  60. description: Enable system and journalctl log collection
  61. type: bool
  62. default: true
  63. metrics:
  64. title: Metrics Collection
  65. toggle: metrics_enabled
  66. vars:
  67. metrics_docker:
  68. description: Enable Docker container metrics collection (cAdvisor)
  69. type: bool
  70. default: true
  71. metrics_enabled:
  72. description: Enable metrics collection
  73. type: bool
  74. default: false
  75. metrics_prometheus_url:
  76. description: Prometheus remote write endpoint
  77. type: url
  78. default: http://prometheus:9090/api/v1/write
  79. required: true
  80. metrics_system:
  81. description: Enable system (node) metrics collection
  82. type: bool
  83. default: true
  84. ports:
  85. vars:
  86. ports_webui:
  87. description: Port for Alloy web UI
  88. type: int
  89. default: 12345
  90. traefik:
  91. vars:
  92. traefik_enabled:
  93. description: Enable Traefik reverse proxy integration
  94. type: bool
  95. default: false
  96. traefik_network:
  97. description: Traefik network name
  98. type: str
  99. default: traefik
  100. required: true
  101. traefik_host:
  102. default: alloy
  103. traefik_domain:
  104. description: Base domain (e.g., example.com)
  105. type: str
  106. default: home.arpa
  107. required: true
  108. traefik_tls:
  109. vars:
  110. traefik_tls_enabled:
  111. description: Enable HTTPS/TLS
  112. type: bool
  113. default: true
  114. traefik_tls_certresolver:
  115. description: Traefik certificate resolver name
  116. type: str
  117. default: cloudflare
  118. required: true