Followup to issue #77, create configured database name from toml file

This commit is contained in:
Cameron Sparr 2015-08-11 14:02:04 -06:00
parent 343d8f87b4
commit 9e2f8f664b
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func (a *Agent) Connect() error {
}
_, err = c.Query(client.Query{
Command: fmt.Sprintf("CREATE DATABASE telegraf"),
Command: fmt.Sprintf("CREATE DATABASE %s", config.Database),
})
if err != nil && !strings.Contains(err.Error(), "database already exists") {