Skip to content

Commit

Permalink
Followup to issue #77, create configured database name from toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Aug 11, 2015
1 parent 343d8f8 commit 9e2f8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 9e2f8f6

Please sign in to comment.