Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHOW MEASUREMENTS with multiple WHERE conditions returns inconsistent results #4118

Closed
wfro opened this issue Sep 16, 2015 · 5 comments
Closed
Assignees

Comments

@wfro
Copy link

wfro commented Sep 16, 2015

Seeing some unexpected behavior when trying to query for a list of all measurements that contain a particular combination of tag keys (specific key/value pairs aren't relevant, just measurements that are part of a series with any number of tag keys.

I'm trying to reduce a list of possible measurements based on the presence of an arbitrary number of tags. Below, I would have expected the third query SHOW MEASUREMENTS WHERE host <> '' AND cpu <> '' to return all four cpu-based measurements. Not sure if I'm using the query language incorrectly or potentially a bug with SHOW MEASUREMENTS.

Querying using Telegraf data:

> SHOW MEASUREMENTS WHERE cpu <> ''
name: measurements
------------------
name
cpu_idle
cpu_nice
cpu_system
cpu_user

> SHOW MEASUREMENTS WHERE host <> ''
name: measurements
------------------
name
cpu_idle
cpu_nice
cpu_system
cpu_user
disk_free
disk_inodes_free
// ...

> SHOW MEASUREMENTS WHERE host <> '' AND cpu <> ''
>
@mark-rushakoff
Copy link
Contributor

We've confirmed that we can at least work around this issue with regular expressions:

SHOW MEASUREMENTS WHERE host =~ // AND cpu =~ //

@wfro
Copy link
Author

wfro commented Sep 16, 2015

The above empty regular expression workaround applies when looking for measurements containing a key, but it does not work when using a value.

> SHOW SERIES WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
name: cpu_idle
--------------
_key                        cpu host
cpu_idle,cpu=cpu0,host=Wills-MacBook-Pro    cpu0    Wills-MacBook-Pro


name: cpu_nice
--------------
_key                        cpu host
cpu_nice,cpu=cpu0,host=Wills-MacBook-Pro    cpu0    Wills-MacBook-Pro


name: cpu_system
----------------
_key                        cpu host
cpu_system,cpu=cpu0,host=Wills-MacBook-Pro  cpu0    Wills-MacBook-Pro


name: cpu_user
--------------
_key                        cpu host
cpu_user,cpu=cpu0,host=Wills-MacBook-Pro    cpu0    Wills-MacBook-Pro

> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" =~ /cpu0/ AND "host" =~ /Wills-MacBook-Pro/

@wfro
Copy link
Author

wfro commented Sep 16, 2015

Upon further review, SHOW MEASUREMENTS sometimes works.

influx console:

> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
name: measurements
------------------
name
cpu_user

> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
name: measurements
------------------
name
cpu_idle

> SHOW MEASUREMENTS WHERE "cpu" = 'cpu0' AND "host" = 'Wills-MacBook-Pro'
name: measurements
------------------
name
cpu_idle

influxd output:

[wal] 2015/09/16 09:36:17 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:36:17 write to index of partition 1 took 747.628µs
[query] 2015/09/16 09:36:19 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:19 127.0.0.1 - - [16/Sep/2015:09:36:19 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 99 - InfluxDBShell/0.9 0f25ddf3-5c91-11e5-8024-000000000000 1.626963ms
[query] 2015/09/16 09:36:20 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:20 127.0.0.1 - - [16/Sep/2015:09:36:20 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 0f766d70-5c91-11e5-8025-000000000000 490.778µs
[query] 2015/09/16 09:36:21 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:21 127.0.0.1 - - [16/Sep/2015:09:36:21 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 0fe6b70a-5c91-11e5-8026-000000000000 1.795654ms
[http] 2015/09/16 09:36:22 127.0.0.1 - - [16/Sep/2015:09:36:22 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 109a0f89-5c91-11e5-8027-000000000000 1.26227ms
[wal] 2015/09/16 09:36:27 Flush due to idle. Flushing 132 series with 132 points and 2244 bytes from partition 1
[wal] 2015/09/16 09:36:27 write to index of partition 1 took 2.689172ms
[wal] 2015/09/16 09:36:27 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:36:27 write to index of partition 1 took 1.653036ms
[http] 2015/09/16 09:36:32 127.0.0.1 - - [16/Sep/2015:09:36:32 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 168fce3e-5c91-11e5-8028-000000000000 1.371578ms
[wal] 2015/09/16 09:36:37 Flush due to idle. Flushing 132 series with 132 points and 2244 bytes from partition 1
[wal] 2015/09/16 09:36:37 write to index of partition 1 took 5.792992ms
[wal] 2015/09/16 09:36:37 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:36:37 write to index of partition 1 took 1.327826ms
[http] 2015/09/16 09:36:42 127.0.0.1 - - [16/Sep/2015:09:36:42 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 1c8596cf-5c91-11e5-8029-000000000000 1.260942ms
[wal] 2015/09/16 09:36:47 Flush due to idle. Flushing 132 series with 132 points and 2244 bytes from partition 1
[wal] 2015/09/16 09:36:47 write to index of partition 1 took 4.519299ms
[wal] 2015/09/16 09:36:47 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:36:47 write to index of partition 1 took 1.448022ms
[http] 2015/09/16 09:36:52 127.0.0.1 - - [16/Sep/2015:09:36:52 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 227b9f43-5c91-11e5-802a-000000000000 1.53705ms
[query] 2015/09/16 09:36:57 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:57 127.0.0.1 - - [16/Sep/2015:09:36:57 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2557c20c-5c91-11e5-802b-000000000000 1.809096ms
[query] 2015/09/16 09:36:57 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:57 127.0.0.1 - - [16/Sep/2015:09:36:57 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 25a0cc8c-5c91-11e5-802c-000000000000 572.044µs
[wal] 2015/09/16 09:36:57 Flush due to idle. Flushing 132 series with 132 points and 2244 bytes from partition 1
[wal] 2015/09/16 09:36:57 write to index of partition 1 took 7.161735ms
[wal] 2015/09/16 09:36:57 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:36:57 write to index of partition 1 took 1.322408ms
[query] 2015/09/16 09:36:58 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:58 127.0.0.1 - - [16/Sep/2015:09:36:58 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 25f1652c-5c91-11e5-802d-000000000000 578.912µs
[query] 2015/09/16 09:36:58 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:58 127.0.0.1 - - [16/Sep/2015:09:36:58 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2641ed27-5c91-11e5-802e-000000000000 1.484373ms
[query] 2015/09/16 09:36:59 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:59 127.0.0.1 - - [16/Sep/2015:09:36:59 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 268b9ee6-5c91-11e5-802f-000000000000 446.372µs
[query] 2015/09/16 09:36:59 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:36:59 127.0.0.1 - - [16/Sep/2015:09:36:59 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 26cf914d-5c91-11e5-8030-000000000000 1.258828ms
[query] 2015/09/16 09:37:00 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:00 127.0.0.1 - - [16/Sep/2015:09:37:00 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 27202c8c-5c91-11e5-8031-000000000000 644.86µs
[query] 2015/09/16 09:37:00 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:00 127.0.0.1 - - [16/Sep/2015:09:37:00 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 277a8184-5c91-11e5-8032-000000000000 1.59737ms
[query] 2015/09/16 09:37:01 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:01 127.0.0.1 - - [16/Sep/2015:09:37:01 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 27b7e2f7-5c91-11e5-8033-000000000000 437.081µs
[query] 2015/09/16 09:37:01 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:01 127.0.0.1 - - [16/Sep/2015:09:37:01 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 27f4917e-5c91-11e5-8034-000000000000 1.479052ms
[query] 2015/09/16 09:37:01 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:01 127.0.0.1 - - [16/Sep/2015:09:37:01 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 28367f60-5c91-11e5-8035-000000000000 636.492µs
[http] 2015/09/16 09:37:02 127.0.0.1 - - [16/Sep/2015:09:37:02 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 28715bc4-5c91-11e5-8036-000000000000 1.492536ms
[query] 2015/09/16 09:37:02 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:02 127.0.0.1 - - [16/Sep/2015:09:37:02 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2875fe93-5c91-11e5-8037-000000000000 2.077033ms
[query] 2015/09/16 09:37:02 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:02 127.0.0.1 - - [16/Sep/2015:09:37:02 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 28b3094e-5c91-11e5-8038-000000000000 578.986µs
[query] 2015/09/16 09:37:03 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:03 127.0.0.1 - - [16/Sep/2015:09:37:03 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 28f9dacd-5c91-11e5-8039-000000000000 1.838976ms
[query] 2015/09/16 09:37:03 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:03 127.0.0.1 - - [16/Sep/2015:09:37:03 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 293963a8-5c91-11e5-803a-000000000000 638.167µs
[query] 2015/09/16 09:37:04 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:04 127.0.0.1 - - [16/Sep/2015:09:37:04 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2973ebac-5c91-11e5-803b-000000000000 1.293964ms
[query] 2015/09/16 09:37:04 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:04 127.0.0.1 - - [16/Sep/2015:09:37:04 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 29b36474-5c91-11e5-803c-000000000000 561.434µs
[query] 2015/09/16 09:37:04 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:04 127.0.0.1 - - [16/Sep/2015:09:37:04 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 29f07808-5c91-11e5-803d-000000000000 723.439µs
[query] 2015/09/16 09:37:05 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:05 127.0.0.1 - - [16/Sep/2015:09:37:05 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2a2d854a-5c91-11e5-803e-000000000000 652.398µs
[query] 2015/09/16 09:37:05 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:05 127.0.0.1 - - [16/Sep/2015:09:37:05 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2a6d0607-5c91-11e5-803f-000000000000 1.269706ms
[query] 2015/09/16 09:37:06 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:06 127.0.0.1 - - [16/Sep/2015:09:37:06 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2ab150ec-5c91-11e5-8040-000000000000 570.334µs
[query] 2015/09/16 09:37:06 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:06 127.0.0.1 - - [16/Sep/2015:09:37:06 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 99 - InfluxDBShell/0.9 2af86e7d-5c91-11e5-8041-000000000000 1.137035ms
[query] 2015/09/16 09:37:07 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:07 127.0.0.1 - - [16/Sep/2015:09:37:07 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 99 - InfluxDBShell/0.9 2b79a34d-5c91-11e5-8042-000000000000 479.647µs
[wal] 2015/09/16 09:37:07 Flush due to idle. Flushing 132 series with 132 points and 2244 bytes from partition 1
[wal] 2015/09/16 09:37:07 write to index of partition 1 took 5.80329ms
[wal] 2015/09/16 09:37:07 Flush due to idle. Flushing 9 series with 9 points and 603 bytes from partition 1
[wal] 2015/09/16 09:37:07 write to index of partition 1 took 1.520036ms
[query] 2015/09/16 09:37:07 SHOW MEASUREMENTS WHERE cpu = 'cpu0' AND host = 'Wills-MacBook-Pro'
[http] 2015/09/16 09:37:07 127.0.0.1 - - [16/Sep/2015:09:37:07 -0700] GET /query?db=telegraf&q=SHOW+MEASUREMENTS+WHERE+%22cpu%22+%3D+%27cpu0%27+AND+%22host%22+%3D+%27Wills-MacBook-Pro%27 HTTP/1.1 200 40 - InfluxDBShell/0.9 2bd3c380-5c91-11e5-8043-000000000000 415.549µs
[http] 2015/09/16 09:37:12 127.0.0.1 - - [16/Sep/2015:09:37:12 -0700] POST /write?consistency=&db=telegraf&precision=&rp= HTTP/1.1 204 0 - InfluxDBClient 2e67596c-5c91-11e5-8044-000000000000 1.317701ms

@dgnorton
Copy link
Contributor

InfluxQL doesn't support <> and should return a parser error for that. Try != instead. I'll open a separate issue so that <> will return a descriptive error and suggest !=.

Re the other issue of SHOW MEASUREMENTS sometimes working, once it starts working will it fail again if you keep running it?

@mark-rushakoff
Copy link
Contributor

This is from commit 6ef51f8, starting with an empty ~/.influxdb folder, running a recent build of telegraf to collect data:

Show measurements with two conditions returns inconsistent data:

> SHOW MEASUREMENTS WHERE fstype = 'devfs' AND path != ''
name: measurements
------------------
name
disk_free
disk_inodes_free
disk_inodes_total
disk_inodes_used
disk_total
disk_used

> SHOW MEASUREMENTS WHERE fstype = 'devfs' AND path != ''
name: measurements
------------------
name
disk_free
disk_used

> SHOW MEASUREMENTS WHERE fstype = 'devfs' AND path != ''
name: measurements
------------------
name
disk_free
disk_inodes_free
disk_inodes_total
disk_inodes_used
disk_used

> SHOW MEASUREMENTS WHERE fstype = 'devfs' AND path != ''
name: measurements
------------------
name
disk_free
disk_total
disk_used

> SHOW MEASUREMENTS WHERE fstype = 'devfs' AND path != ''
name: measurements
------------------
name
disk_free
disk_inodes_free
disk_inodes_used
disk_used

Show measurements with one condition seems to consistently and correctly return the full set of matching measurements.

@mark-rushakoff mark-rushakoff changed the title SHOW MEASUREMENTS with multiple WHERE conditions SHOW MEASUREMENTS with multiple WHERE conditions returns inconsistent results Sep 20, 2015
mark-rushakoff added a commit to mark-rushakoff/influxdb that referenced this issue Sep 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants