Followup to issue #77, create configured database name from toml file
This commit is contained in:
parent
343d8f87b4
commit
9e2f8f664b
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") {
|
||||||
|
|
Loading…
Reference in New Issue