Followup to issue #77, create configured database name from toml file
This commit is contained in:
2
agent.go
2
agent.go
@@ -86,7 +86,7 @@ func (a *Agent) Connect() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = c.Query(client.Query{
|
_, 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") {
|
if err != nil && !strings.Contains(err.Error(), "database already exists") {
|
||||||
|
|||||||
Reference in New Issue
Block a user