Skip to content

Commit

Permalink
Improve config error message
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
SuperQ committed Oct 29, 2024
1 parent df1b28d commit a411322
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit a411322

Please sign in to comment.