✨ Update Prometheus configuration and enhance monitoring capabilities. Refactor docker-compose.dev.yml to dynamically generate target configurations for the CAATSM receiver. Modify Makefile and Taskfile to allow setting the monitoring address via environment variables. Update observability settings in config.dev.toml and Prometheus scrape configurations to improve integration with the monitoring stack. Enhance CLI options for monitoring address and disable monitoring features as needed.
This commit is contained in:
@@ -110,6 +110,16 @@ func setupApp() *cli.App {
|
||||
Name: "telemetry-insecure",
|
||||
Usage: "Send OTLP data without TLS",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "monitoring-addr",
|
||||
Usage: "Monitoring server address (e.g., 192.168.1.100:2112 or :2112)",
|
||||
EnvVars: []string{"CAATSM_MONITORING_ADDR"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "monitoring-disabled",
|
||||
Usage: "Disable monitoring server",
|
||||
EnvVars: []string{"CAATSM_MONITORING_DISABLED"},
|
||||
},
|
||||
},
|
||||
Action: executeListen,
|
||||
},
|
||||
@@ -263,6 +273,13 @@ func applyCLIOverrides(cfg *config.Config, c *cli.Context) {
|
||||
if c.IsSet("telemetry-insecure") {
|
||||
cfg.Telemetry.Insecure = c.Bool("telemetry-insecure")
|
||||
}
|
||||
if addr := c.String("monitoring-addr"); addr != "" {
|
||||
cfg.Monitoring.Addr = addr
|
||||
cfg.Monitoring.Disabled = false
|
||||
}
|
||||
if c.IsSet("monitoring-disabled") {
|
||||
cfg.Monitoring.Disabled = c.Bool("monitoring-disabled")
|
||||
}
|
||||
}
|
||||
|
||||
func applyReplayOverride(cfg *config.Config, value string) {
|
||||
|
||||
Reference in New Issue
Block a user