On Monday, September 26, 2016 at 5:55:40 AM UTC-7, Paul Letskii wrote:
> Hi all!
> 
> 
> InfluxDB version 1.0\
> 
> 
> I'm trying to get list of hosts from measurement "mem_usage_percent". 
> 
> 
> This query works:
> SELECT * FROM "mem_usage_percent" 
> 
> 
> This one doesn't:
> SELECT "host" FROM "mem_usage_percent"
> Accordingly to documentation it has to. 
> 
> 
> My final goal is to count number of unique hosts. Like: SELECT count("host") 
> FROM "mem_usage_percent"
> 
> 
> What is correct syntax to get information from certain field? 
> 
> 
> Thank you in advance!
> 
> 
> Best regards,
> Paul Letskii

Since you're interested in the cardinality of the host tag, you might try using 
only the metadata:

SHOW SERIES FROM mem

Depending on the client API you're using, this is probably available as a 
method. HTH.

Kent

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/219c5f81-089f-46ab-8b64-9b803e34b76c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to