Issue Querying metrics

42 views
Skip to first unread message

TR Staake

unread,
Feb 24, 2016, 2:47:57 PM2/24/16
to Blueflood Discuss
Hi All, 

I am new to BlueFlood and have installed it on a development environment and populated with some sample metrics. However when I am on the box and query for metrics using the API I am getting inconsistent results. If I query for all metrics using:
curl -i -X GET "http://localhost:20000/v2.0/100/metrics/search?query=*"

HTTP/1.1 200 OK
Content-Length: 741041

[{"metric":"<host>.<domain>.com:<DataCenter>:<cell>:<tier>:44cluster:cpu_idle"} ... more metrics ]


If I do the following I get results for a given host:

However if I try I get nothing:
curl --X GET "http://localhost:20000/v2.0/100/metrics/search?query=<host>.<domain>.com*"

It seems to not like the '.' in the metric name so I tried replacing the '.' with, '*' and HTTP encoding.  


It is also getting hung up on different permutations of the metric using the '*' so this works:

Any help would be greatly appreciated. 

Thanks, 
-TR

Shinta Smith

unread,
Feb 26, 2016, 2:55:36 PM2/26/16
to Blueflood Discuss
Hi, TR Staake,
I am having troubles reproducing the issues you are seeing. I am running Blueflood (latest on master) locally on my Mac. I am running Cassandra 2.0.11 and ElasticSearch 1.7.3.

What version of Cassandra and ElasticSearch are you using? Can you hit us up in the #blueflood IRC for further discussion/troubleshooting?

Here's what I did trying to reproduce your issue

# the pipe to json2 is just for formatting the response
curl
'http://localhost:20000/v2.0/123456/metrics/search?query=*' | json2
[
 
{
   
"metric": "query01.api.mycompany.com:iad:1234:2:44cluster:cpu_idle"
 
},
 
{
   
"metric": "query02.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
},
 
{
   
"metric": "acct01.api.mycompany.com:iad:9876:2:44cluster:cpu_idle"
 
},
 
{
   
"metric": "acct00.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
},
 
{
   
"metric": "query00.api.mycompany.com:iad:1234:1:44cluster:cpu_idle"
 
}
]

If I do a query for a given host, it works as you said:

curl 'http://localhost:20000/v2.0/123456/metrics/search?query=acct*' | json2
[
 
{
   
"metric": "acct01.api.mycompany.com:iad:9876:2:44cluster:cpu_idle"
 
},
 
{
   
"metric": "acct00.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
}
]

If I try for a given host+domain, it also works for me:

curl 'http://localhost:20000/v2.0/123456/metrics/search?query=acct00.api.mycompany.com*' | json2
[
 
{
   
"metric": "acct00.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
}
]

Using permutation of '*' also works for me:

curl 'http://localhost:20000/v2.0/123456/metrics/search?query=*:44cluster:cpu_idle' | json2
[
 
{
   
"metric": "query01.api.mycompany.com:iad:1234:2:44cluster:cpu_idle"
 
},
 
{
   
"metric": "query02.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
},
 
{
   
"metric": "acct01.api.mycompany.com:iad:9876:2:44cluster:cpu_idle"
 
},
 
{
   
"metric": "acct00.api.mycompany.com:dfw:9876:1:44cluster:cpu_idle"
 
},
 
{
   
"metric": "query00.api.mycompany.com:iad:1234:1:44cluster:cpu_idle"
 
}
]

Thanks,
-shinta

Chandra Addala

unread,
Feb 26, 2016, 5:24:51 PM2/26/16
to Blueflood Discuss
May the indexes are not properly setup on elastic search. Can you print out the aliases that are setup? You can use the below curl command. 

Chandra

On Wednesday, February 24, 2016 at 1:47:57 PM UTC-6, TR Staake wrote:
Reply all
Reply to author
Forward
0 new messages