Skip to content

Commit

Permalink
influxdb output: quote the database name
Browse files Browse the repository at this point in the history
closes #898
  • Loading branch information
sparrc committed Mar 21, 2016
1 parent fbe1664 commit 5917a42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Bugfixes
- [#890](https://github.com/influxdata/telegraf/issues/890): Create TLS config even if only ssl_ca is provided.
- [#884](https://github.com/influxdata/telegraf/issues/884): Do not call write method if there are 0 metrics to write.
- [#898](https://github.com/influxdata/telegraf/issues/898): Put database name in quotes, fixes special characters in the database name.

## v0.11.1 [2016-03-17]

Expand Down
2 changes: 1 addition & 1 deletion plugins/outputs/influxdb/influxdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (i *InfluxDB) Connect() error {

// Create Database if it doesn't exist
_, e := c.Query(client.Query{
Command: fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s", i.Database),
Command: fmt.Sprintf("CREATE DATABASE IF NOT EXISTS \"%s\"", i.Database),
})

if e != nil {
Expand Down

0 comments on commit 5917a42

Please sign in to comment.