fix(secretstores): Fix handling of 'id' and print failing secret-store (#12468)

This commit is contained in:
Sven Rebhan 2023-01-09 15:27:07 +01:00 committed by GitHub
parent 6fb08bb3da
commit b5dcc49250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -808,7 +808,7 @@ func (c *Config) addSecretStore(name string, table *ast.Table) error {
}
if err := store.Init(); err != nil {
return fmt.Errorf("error initializing secretstore: %w", err)
return fmt.Errorf("error initializing secret-store %q: %w", storeid, err)
}
if _, found := c.SecretStores[storeid]; found {
@ -1397,6 +1397,9 @@ func (c *Config) missingTomlField(_ reflect.Type, key string) error {
"pass", "period", "precision",
"tagdrop", "tagexclude", "taginclude", "tagpass", "tags":
// Secret-store options to ignore
case "id":
// Parser options to ignore
case "data_type", "influx_parser_type":