Hi Mark,

For example:

measurement: "jobstatus"
tags: t_host, t_job, t_status
time: timestamp
fields: f_check_id, f_job, f_status, f_host

t_status, t_host and t_job have the same values as the respective f_ 
fields. This is on purpose for now, while working on data exploration 
queries, eventually will be optimized.

_status will be -1, 0 or 1

A host will have an arbitrary set of jobs associated. Jobs may run with 
different frequencies. Typically, only the last result of a job is of 
interest. 

Output I'm able to get already is a table like Time | t_host | t_svc | 
Last/Current Status. 
Other output I'm looking for  would be just the number of rows of that 
table.

I hope this helps in clarifying.

Thanks.

On Friday, December 23, 2016 at 4:28:14 PM UTC, Mark Rushakoff wrote:
>
> The verbal description of your data is a little difficult to follow. Could 
> you share some example line protocol and the kind of output you're looking 
> for?
>
> On Fri, Dec 23, 2016 at 7:51 AM, Rodrigo Pereira <[email protected] 
> <javascript:>> wrote:
>
>> Hi everybody,
>>
>> Rather new to Influxdb here, and trying to create some visualizations on 
>> top of it.
>>
>> Got a bit stuck trying to create a query to get a specific count. I have 
>> a custom service constantly pushing a measurement jobstatus with host, job, 
>> and status. More or less every 5 mins Influx receives that metric for each 
>> (host, job) pair. While I am able to create a table that shows for example 
>> all the host/job pairs where status is -1 (but, very important, showing 
>> only the last status received for each host/job) I'm not being able to 
>> create a query that just counts them, so I can display it on a single stat 
>> panel.  Any hints?
>>
>> I'm using this to display a table in Grafana with the list of 
>> host/service :
>>
>> SELECT last("f_status") as "Current Status", "f_old_status" as "Previous 
>> Status" FROM "autogen"."jobstatus" WHERE "t_status" = '-1' GROUP BY t_host, 
>> t_job
>>
>> Any help appreciated.
>>
>> rgds.
>>
>> -- 
>> Remember to include the version number!
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "InfluxData" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/a88d379d-ed65-4a03-a578-937fd9b04e52%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/influxdb/a88d379d-ed65-4a03-a578-937fd9b04e52%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" 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/3369ae52-a411-4b32-895c-ea53e4951cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to