Coder Social home page Coder Social logo

influxdb-go's Issues

Error handling

methods should check the status code of the response and return appropriate errors

Support ssl

Since InfluxDB has support for ssl, the client should be able to connect on the ssl port.

Server returned (400): invalid character '\x1f' looking for beginning of value

Hi,

I have the following code:

series := &influxdb.Series{
            Name:    "foometer",
            Columns: []string{"time", "frequency"},
            Points: [][]interface{}{
                []interface{}{reading.Timestamp.Unix() * 1000, reading.Value},
            },
        }
        fmt.Printf("%v\n", series)
        data, err := json.Marshal(series)
        if err != nil {
            log.Fatal("Error serializing into json: ", err.Error())
        }
        fmt.Printf("%s\n", data)
        if err := client.WriteSeries([]*influxdb.Series{series}); err != nil {
            log.Fatal("Failed to store data: ", err)
        }

The WriteSeries call fails with the message

2014/07/02 17:41:01 Failed to store data: Server returned (400): invalid character '\x1f' looking for beginning of value

but the json-serialized series value looks fine to me:

{"name":"foometer","columns":["time","frequency"],"points":[[1404315661000,50.042]]}

Any ideas where this is coming from? I'm using

$ influxdb -v
InfluxDB v0.7.0 (git: 696d61d) (leveldb: 1.15)
$ uname -a
Linux work 3.2.0-64-generic-pae #97-Ubuntu SMP Wed Jun 4 22:22:15 UTC 2014 i686 i686 i386 GNU/Linux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.