From a411322027cc4fb6c9b5a4b791dc86f8af63944d Mon Sep 17 00:00:00 2001 From: SuperQ Date: Tue, 29 Oct 2024 10:29:17 +0100 Subject: [PATCH] Improve config error message Improve config parsing error message for cases where the generator is built from a commit that supports newer features than the deployed exporter. Signed-off-by: SuperQ --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index eee19722..83ddfdd9 100644 --- a/main.go +++ b/main.go @@ -217,7 +217,8 @@ func main() { err := sc.ReloadConfig(*configFile, *expandEnvVars) if err != nil { logger.Error("Error parsing config file", "err", err) - logger.Error("Possible old config file, see https://github.com/prometheus/snmp_exporter/blob/main/auth-split-migration.md") + logger.Error("Possible version missmatch between generator and snmp_exporter. Make sure generator and snmp_exporter are the same version.") + logger.Error("See also: https://github.com/prometheus/snmp_exporter/blob/main/auth-split-migration.md") os.Exit(1) }