Documentation
¶
Index ¶
Constants ¶
View Source
const ( ComposeFileName = "compose.yaml" OtelConfigFileName = "otel-config.yaml" GrafanaDatasourcesFileName = "grafana-datasources.yaml" PrometheusFileName = "prometheus.yaml" GrafanaDashboardsFileName = "grafana-dashboards.yaml" GrafanaDashboardFileName = "grafana-dashboard.json" GrafanaDashboardCPFileName = "grafana-dashboard-cp.json" PromtailConfigFileName = "promtail-config.yaml" )
Template file names for writing to disk
View Source
const ( OtelCollectorImage = "otel/opentelemetry-collector-contrib:0.148.0@sha256:8164eab2e6bca9c9b0837a8d2f118a6618489008a839db7f9d6510e66be3923c" JaegerImage = "jaegertracing/all-in-one:1.76.0@sha256:ab6f1a1f0fb49ea08bcd19f6b84f6081d0d44b364b6de148e1798eb5816bacac" PrometheusImage = "prom/prometheus:v3.10.0@sha256:4a61322ac1103a0e3aea2a61ef1718422a48fa046441f299d71e660a3bc71ae9" LokiImage = "grafana/loki:3.7.0@sha256:c316b7c7589a5eeca843b6926c7446149d18300b79ac8538dc4ae063bc478da2" GrafanaImage = "grafana/grafana:12.4.2@sha256:83749231c3835e390a3144e5e940203e42b9589761f20ef3169c716e734ad505" PromtailImage = "grafana/promtail:3.6.0@sha256:2aafa34b3d5fba888c51081d3a22c234906ffd3cafc5def11c581549b297d449" )
Monitoring stack container images — pinned to version + SHA256 digest.
Variables ¶
View Source
var ComposeTemplate string
View Source
var GrafanaDashboardCPTemplate string
View Source
var GrafanaDashboardTemplate string
View Source
var GrafanaDashboardsTemplate string
View Source
var GrafanaDatasourcesTemplate string
View Source
var OtelConfigTemplate string
View Source
var PrometheusTemplate string
View Source
var PromtailConfigTemplate string
Functions ¶
func RenderTemplate ¶ added in v0.1.6
func RenderTemplate(name, tmplContent string, data MonitorTemplateData) (string, error)
RenderTemplate renders a Go text/template with the given data.
Types ¶
type MonitorTemplateData ¶ added in v0.1.6
type MonitorTemplateData struct {
OtelCollectorPort int
OtelGRPCPort int // independent of HTTP port — from config.GetOtelGRPCPort()
OtelCPPort int // mTLS-gated host-loopback receiver for clawker-cp push
LokiPort int
PrometheusPort int
JaegerPort int
GrafanaPort int
PrometheusMetricsPort int
OtelCollectorInternal string
// Host-side paths for CLI-issued mTLS material that gates the
// CP-only OTLP receiver. Populated by the monitor init command from
// internal/consts. Empty disables the gated receiver — the
// otel-config template branches on OtelCPPort to decide whether to
// emit the second receiver block.
OtelServerCertHostPath string
OtelServerKeyHostPath string
OtelCAHostPath string
// Container images — version + SHA256 pinned.
OtelCollectorImage string
JaegerImage string
PrometheusImage string
LokiImage string
GrafanaImage string
PromtailImage string
}
MonitorTemplateData provides values for rendering monitoring stack templates.
func NewMonitorTemplateData ¶ added in v0.1.6
func NewMonitorTemplateData(cfg *config.MonitoringConfig) MonitorTemplateData
NewMonitorTemplateData constructs template data from MonitoringConfig.
Click to show internal directories.
Click to hide internal directories.