Add a "group by" clause to your query in the widget editor on "tag("host")" 
then in the "Alias By" field, put in "[[tag_host]]"

On Tuesday, September 27, 2016 at 7:19:03 AM UTC-4, [email protected] 
wrote:
>
> On Tuesday, September 27, 2016 at 4:10:33 PM UTC+5:30, [email protected] 
> wrote:
> > On Monday, September 26, 2016 at 7:54:25 PM UTC+5:30, Robert wrote:
> > > I'm not sure of the best way to help with your first question, but my 
> answer to your second may answer your first.
> > > 
> > > For question 2, you'll want to set up a template variable on the 
> dashboard as described here: http://docs.grafana.org/reference/templating/ 
> with your "SHOW TAG VALUES WITH KEY = "host" query.
> > > 
> > > The grafana demo site has some examples here: 
> http://play.grafana.org/dashboard/db/influxdb-templated-queries?editview=templating
> > > 
> > > Once you have the variable set up your query would look like this 
> (assuming a template variable of "hostname"): "SELECT mean("usage_system") 
> FROM "cpu" WHERE "host" = /^$hostname$/ AND $timeFilter GROUP BY 
> time($interval) fill(null)". The query builder should also include the 
> template variables in any where clause you include for easier replication. 
> The template variable will also populate the variable's dropdown list with 
> all values, which might solve your first question.
> > > 
> > > On Monday, September 26, 2016 at 6:43:06 AM UTC-4, [email protected] 
> wrote:Hi Team,
> > > I am creating dashboards in Grafana using InfluxDB as datasource. I am 
> new to InfluxDB and Grafana. I started creating dashboard and has below 
> questions. 
> > > Question 1
> > > I am using the below query to get the list of hosts in table panel of 
> Grafana. 
> > > There are two output columns are displayed. One with column name 
> "Time" and with text "Invalid date" is displayed below this column. The 
> second column name is "value" and host names are displayed below this 
> column.
> > > Query used - SHOW TAG VALUES WITH KEY = "host"
> > > Why "Time" column is coming and how to remove this column. I need only 
> the list of host names.
> > > Question 2
> > > I am displaying the CPU usage in graph panel of Grafana in same 
> dashboard. The host name is now hard coded in the query as below
> > > SELECT mean("usage_system") FROM "cpu" WHERE "host" = 'esclient003' 
> AND $timeFilter GROUP BY time($interval) fill(null)
> > > How to pass the host names as variable from first table panel which is 
> getting list of hosts. Which ever host is selected I need that host CPU 
> Usage.
> > > Please can any help me in this.
> > > Thanks and Regards,
> > > Sree
> > 
> > Hi Robert,
> > 
> > I am able to do as you have suggested and got answers for both the 
> questions. Thank you very much for support.
> > 
> > Thanks and Regards,
> > Sree
>
> Hi Robert,
>
> When I select the multiple servers from the list, The CPU Usage is getting 
> added for all selected servers and graph is displaying in single color 
> line. How can I display the Usage separately for each servers in different 
> colors
>
> Thanks and Regards,
> Sree
>
>

-- 
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/f7d44326-f3e7-4031-abb6-256925e2b9e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to