Followup to issue #77, create configured database name from toml file
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user