GithubHelp home page GithubHelp logo

check_influxdb_query's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

check_influxdb_query's Issues

InfluxDB 0.9 compatibility?

Thanks for writing this tool. We're trying to get it to work now, but encountering an issue.
#1 Can the tool connect to influx and pull a data point? Yes, it can:

➜ check_influxdb ./check_influxdb --port 8086 --database graphite --host ***** --username root --password root --query 'select * from /servers.*****.diskspace.root.byte_percentfree/ limit 1' -w 70 -c 80

Debug output. Use -j to check value...
[
  {
    "name": “servers.*****.diskspace.root.byte_percentfree",
    "tags": null,
    "values": [
      {
    "time": "2015-08-04T23:32:47Z",
    "value": 70.84
      }
    ]
  }
]
CheckInfluxdbQuery WARNING: Check did not exit! You should call an exit code method.

#2 Can we perform a test against a data point? Yes, we can. But this is failing because we are using “select *” instead of “select x” in our query.

➜ check_influxdb ./check_influxdb --port 8086 --database graphite --host ***** --username root --password root --query 'select * from /servers.*****.diskspace.root.byte_percentfree/ limit 1' -w 70 -c 80 -j '$.test..x'

CheckInfluxdbQuery CRITICAL: Value '0' matched '80' for query 'select * from /servers.*****.diskspace.root.byte_percentfree/ limit 1'

#3 Can we change ‘*’ to ‘x’ in the query and test the data point? Sadly, no.

➜ check_influxdb ./check_influxdb --port 8086 --database graphite --host ***** --username root --password root --query 'select x from /servers.*****.diskspace.root.byte_percentfree/ limit 1' -w 70 -c 80 -j '$.test..x'

Check failed to run: unknown field or tag name in select clause: x, ["/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/client/http.rb:90:in `handle_successful_response'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/client/http.rb:14:in `block in get'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/client/http.rb:52:in `call'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/client/http.rb:52:in `connect_with_retry'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/client/http.rb:11:in `get'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/influxdb-0.2.2/lib/influxdb/query/core.rb:15:in `query'", "./check_influxdb:124:in `run'", "/Users/cmann/.rvm/gems/ruby-2.2.0/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in `block in <class:CLI>'"]

I’ve been trying this tool from CentOS 6.2, CentOS 7.1, and OSX Yosemite, all with similar results. My targets include a mix of InfluxDB 0.8 as well as 0.9 series. This particular example is against a 0.9 system. Maybe there’s just a query syntax change from 0.8 > 0.9 that is making the tool unhappy?

Any help greatly appreciated.

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.