Skip to content

Cadvisor fails to write stats to influxDB #794

Closed

Description

@mboussaa

Hi,
Cadvisor fails to write stats into influxDB

Here the logs:
capture d ecran 2015-07-02 a 19 58 23

I am starting Cadvisor like this:
docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --publish=8080:8080 --detach=true --name=cadvisor --restart=always google/cadvisor:latest --logtostderr -storage_driver=influxdb -storage_driver_host=10.0.0.22:8086 -storage_driver_db=cadvisorDB

I am starting influxDB like this:
docker run -d --name=influxdb -p 8083:8083 -p 8086:8086 --restart=always -expose 8090 --expose 8099 tutum/influxdb

When I execute a sample request on InfluxDB like this "select * from stats" it shows:
ERROR: {"error":"error parsing query: found STATS, expected identifier at line 1, char 15

Thank you for help.

Activity

  1. jmaitrehenry commented on Jul 2, 2015

    @jmaitrehenry
    Contributor

    Hi,

    You are using influxdb v0.9 that is not currently supported by cadvisor, see #743.
    You can use influxdb 0.8 just by using tutum/influxdb:0.8.8

  2. mboussaa commented on Jul 2, 2015

    @mboussaa
    Author

    Thank you for your answer. I changed the image however now, when I create a new database on influxDB. I get this message:
    capture d ecran 2015-07-02 a 20 36 22

    I can not understand this issue. The only thing I have changed is the influxDB docker image.
    docker logs influxdb doesn't report any issue.

  3. jmaitrehenry commented on Jul 2, 2015

    @jmaitrehenry
    Contributor

    It's really look like you use influxdb 0.9 and not 0.8 because on the 0.8.8 web ui, when you create a database you have Shard Spaces box, but it's more a problem with influxdb than cadvisor IMO.

    I juste made a test with by running influxdb with:
    docker run -d --name=influxdb -p 8083:8083 -p 8086:8086 --restart=always -expose 8090 --expose 8099 tutum/influxdb

    And with a force refresh (remove my browser cache).

  4. mboussaa commented on Jul 2, 2015

    @mboussaa
    Author

    Ok so the solution is to clear the web browser cache.
    You can close this issue.
    Thank you for your help

  5. svenmueller commented on Oct 19, 2015

    @svenmueller

    is influxdb 0.9.x still not supported by cadvisor?

  6. marcellodesales commented on Feb 4, 2016

    @marcellodesales

    @svenmueller I tested a PR and it is now supported... #1040 (comment)

    I built an image to help others at https://hub.docker.com/r/marcellodesales/google-cadvisor/... I will maintain it until the team releases a new version with it.

  7. vishh commented on Feb 4, 2016

    @vishh
    Contributor

    FYI: google/cadvisor:v0.20.5 should include support for InfluxDB v0.9

    On Wed, Feb 3, 2016 at 5:30 PM, Marcello de Sales [email protected]
    wrote:

    @svenmueller https://github.com/svenmueller I tested a PR and it is now
    supported... #1040 (comment)
    #1040 (comment)

    I built an image to help others at
    https://hub.docker.com/r/marcellodesales/google-cadvisor/... I will
    maintain it until the team releases a new version with it.

    —
    Reply to this email directly or view it on GitHub
    #794 (comment).

  8. marcellodesales commented on Feb 4, 2016

    @marcellodesales

    @vishh I did not verify it :S Well that's nice then I will remove my image... thanks!

  9. marcellodesales commented on Feb 5, 2016

    @marcellodesales

    @vishh I see the new image works at the tag you mentioned.

    @mboussaa Use the tag v0.20.5 and everything is working on the latest.

    influxdb_1     | [http] 2016/02/05 19:25:47 172.17.0.2 - root [05/Feb/2016:19:25:47 +0000] POST /write?consistency=&db=cadvisor&precision=&rp= HTTP/1.1 204 0 - cAdvisor/0.20.5 41f62cc0-cc3e-11e5-8007-000000000000 24.01661ms
    

    However, the latest tag is not pointing to the v0.20.5 version. What's the process to update the tag?

    $ docker images | grep cadvisor
    google/cadvisor                                           v0.20.5                       cb4f76a7607a        46 hours ago        43.12 MB
    google/cadvisor                                           latest                        cec6ac4b467e        10 days ago         36.46 MB
    
  10. vishh commented on Feb 5, 2016

    @vishh
    Contributor

    In general, we don't believe in the latest tag. But if you are relying on
    it, we can update that tag as well.

    On Fri, Feb 5, 2016 at 11:33 AM, Marcello de Sales <[email protected]

    wrote:

    @vishh https://github.com/vishh I see the new image works at the tag
    you mentioned.

    influxdb_1 | [http] 2016/02/05 19:25:47 172.17.0.2 - root [05/Feb/2016:19:25:47 +0000] POST /write?consistency=&db=cadvisor&precision=&rp= HTTP/1.1 204 0 - cAdvisor/0.20.5 41f62cc0-cc3e-11e5-8007-000000000000 24.01661ms

    However, the latest tag is not pointing to the v0.20.5 version. What's
    the process to update the tag?

    $ docker images | grep cadvisor
    google/cadvisor v0.20.5 cb4f76a7607a 46 hours ago 43.12 MB
    google/cadvisor latest cec6ac4b467e 10 days ago 36.46 MB

    —
    Reply to this email directly or view it on GitHub
    #794 (comment).

  11. vishh commented on Feb 5, 2016

    @vishh
    Contributor

    I have updated the latest tag to point to v0.20.5.

    On Fri, Feb 5, 2016 at 3:20 PM, Vishnu Kannan [email protected] wrote:

    In general, we don't believe in the latest tag. But if you are relying
    on it, we can update that tag as well.

    On Fri, Feb 5, 2016 at 11:33 AM, Marcello de Sales <
    [email protected]> wrote:

    @vishh https://github.com/vishh I see the new image works at the tag
    you mentioned.

    influxdb_1 | [http] 2016/02/05 19:25:47 172.17.0.2 - root [05/Feb/2016:19:25:47 +0000] POST /write?consistency=&db=cadvisor&precision=&rp= HTTP/1.1 204 0 - cAdvisor/0.20.5 41f62cc0-cc3e-11e5-8007-000000000000 24.01661ms

    However, the latest tag is not pointing to the v0.20.5 version. What's
    the process to update the tag?

    $ docker images | grep cadvisor
    google/cadvisor v0.20.5 cb4f76a7607a 46 hours ago 43.12 MB
    google/cadvisor latest cec6ac4b467e 10 days ago 36.46 MB

    —
    Reply to this email directly or view it on GitHub
    #794 (comment).

  12. marcellodesales commented on Feb 6, 2016

    @marcellodesales

    @vishh Although I can definitely agree with your point, most documentation I found uses the the tag latest... It confuses a lot of users, including myself... It since there was not Git Tag on this merge request, it is hard to find which version this is released...

    Could you guys please tag the merge as part of the release process, in case the docker latest tag is not used? that would simplify and help users finding features...!

    Thanks a lot!

  13. dashpole commented on Mar 16, 2017

    @dashpole
    Collaborator

    closing since this issue is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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