Skip to content

Commit 50377ef

Browse files
authored
Merge pull request #28 from percona/PMM-2469-allow-boolean-keys
PMM-2469: my.cnf can have boolean keys.
2 parents 5727b16 + ef3ad91 commit 50377ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mysqld_exporter.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ var scrapersLr = map[collector.Scraper]struct{}{
173173

174174
func parseMycnf(config interface{}) (string, error) {
175175
var dsn string
176-
cfg, err := ini.Load(config)
176+
opts := ini.LoadOptions{
177+
// PMM-2469: my.cnf can have boolean keys.
178+
AllowBooleanKeys: true,
179+
}
180+
cfg, err := ini.LoadSources(opts, config)
177181
if err != nil {
178182
return dsn, fmt.Errorf("failed reading ini file: %s", err)
179183
}

0 commit comments

Comments
 (0)