Skip to content

Problem with special characters in influxdb output plugin #898

@collinlambert

Description

@collinlambert

In plugins.outputs.influxdb.influxdb.go

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

The database name needs to be captured in double quotes. Any database with special characters (i.e. '-') will not be created and, surprisingly enough, does not produce an error in the query call. The result is failed writes to InfluxDb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions