GithubHelp home page GithubHelp logo

Comments (2)

mtferg avatar mtferg commented on August 19, 2024

Here is another example. In this case, I just increased the end of the requested timeframe by 1 hr and am not getting back any data for the last grouping ("pname"=>"c").

Query:

SELECT mean(*) FROM mymeasurement WHERE time >= '2019-01-23T15:00:00Z' AND time < '2019-01-23T21:00:00Z' GROUP BY time(1h, 0s), did, pid, pname fill(0)

Influx CLI Response:

name: mymeasurement
tags: did=1, pid=1, pname=a
time                mean_allocation mean_usage mean_value
----                --------------- ---------- ----------
1548255600000000000 0               0          0
1548259200000000000 25              0          25
1548262800000000000 25              0          25
1548266400000000000 25              0.04       25
1548270000000000000 25              0          25
1548273600000000000 0               0          0

name: mymeasurement
tags: did=1, pid=2, pname=b
time                mean_allocation mean_usage mean_value
----                --------------- ---------- ----------
1548255600000000000 0               0          0
1548259200000000000 2358            0          2358
1548262800000000000 2358            1          2358
1548266400000000000 2358            74.34      2358
1548270000000000000 2358            3208.44    3208.44
1548273600000000000 0               0          0

name: mymeasurement
tags: did=1, pid=3, pname=c
time                mean_allocation mean_usage mean_value
----                --------------- ---------- ----------
1548255600000000000 0               0          0
1548259200000000000 5907            75.11      5907
1548262800000000000 5907            40.06      5907
1548266400000000000 5907            721.62     5907
1548270000000000000 5907            3248.08    5907
1548273600000000000 0               0          0

InfluxDB::Client Response:

=> [{"name"=>"mymeasurement",
  "tags"=>{"did"=>"1", "pid"=>"1", "pname"=>"a"},
  "values"=>
   [{"time"=>"2019-01-23T15:00:00Z", "mean_allocation"=>0, "mean_usage"=>0, "mean_value"=>0},
    {"time"=>"2019-01-23T16:00:00Z", "mean_allocation"=>25, "mean_usage"=>0, "mean_value"=>25},
    {"time"=>"2019-01-23T17:00:00Z", "mean_allocation"=>25, "mean_usage"=>0, "mean_value"=>25},
    {"time"=>"2019-01-23T18:00:00Z", "mean_allocation"=>25, "mean_usage"=>0.04, "mean_value"=>25},
    {"time"=>"2019-01-23T19:00:00Z", "mean_allocation"=>25, "mean_usage"=>0, "mean_value"=>25},
    {"time"=>"2019-01-23T20:00:00Z", "mean_allocation"=>0, "mean_usage"=>0, "mean_value"=>0}]},
 {"name"=>"mymeasurement",
  "tags"=>{"did"=>"1", "pid"=>"2", "pname"=>"b"},
  "values"=>
   [{"time"=>"2019-01-23T15:00:00Z", "mean_allocation"=>0, "mean_usage"=>0, "mean_value"=>0},
    {"time"=>"2019-01-23T16:00:00Z", "mean_allocation"=>2358, "mean_usage"=>0, "mean_value"=>2358},
    {"time"=>"2019-01-23T17:00:00Z", "mean_allocation"=>2358, "mean_usage"=>1, "mean_value"=>2358},
    {"time"=>"2019-01-23T18:00:00Z", "mean_allocation"=>2358, "mean_usage"=>74.34, "mean_value"=>2358},
    {"time"=>"2019-01-23T19:00:00Z", "mean_allocation"=>2358, "mean_usage"=>3208.44, "mean_value"=>3208.44},
    {"time"=>"2019-01-23T20:00:00Z", "mean_allocation"=>0, "mean_usage"=>0, "mean_value"=>0}]}]

The issue seems to be related to the time grouping. If I remove the time grouping from my query:

SELECT mean(*) FROM mymeasurement WHERE time >= '2019-01-23T15:00:00Z' AND time < '2019-01-23T21:00:00Z' GROUP BY did, pid, pname fill(0)

I am getting data back for that grouping:

=> [{"name"=>"mymeasurement",
  "tags"=>{"did"=>"1", "pid"=>"1", "pname"=>"a"},
  "values"=>[{"time"=>"2019-01-23T15:00:00Z", "mean_allocation"=>25, "mean_usage"=>0.01, "mean_value"=>25}]},
 {"name"=>"mymeasurement",
  "tags"=>{"did"=>"1", "pid"=>"2", "pname"=>"b"},
  "values"=>[{"time"=>"2019-01-23T15:00:00Z", "mean_allocation"=>2358, "mean_usage"=>820.945, "mean_value"=>2570.61}]},
 {"name"=>"mymeasurement",
  "tags"=>{"did"=>"1", "pid"=>"3", "pname"=>"c"},
  "values"=>[{"time"=>"2019-01-23T15:00:00Z", "mean_allocation"=>5907, "mean_usage"=>1021.2175, "mean_value"=>5907}]}]

from influxdb-ruby.

mtferg avatar mtferg commented on August 19, 2024

Put some binding.prys in the http.rb file and it looks like I'm getting a partial response back from Influx. Starting to think this is an issue with our max-row-limit config. Strange that I wouldn't see the same behavior in the Influx CLI, but I got in touch with our DBA and will close this out as soon as I confirm that is the issue.

from influxdb-ruby.

Related Issues (20)

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.