Passing tags is broken?
Closed this issue · 5 comments
Were using 0.74 of Status Wolf on an Ubuntu 12.04 server.
If we call for a metric everything works. When we pass in a tag and it's value I see the following in the log:
[Thu Oct 10 15:54:23 2013] [error] [client 10.135.15.248] PHP Notice: Undefined index: atmos.posts in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 437, referer: https://wolf.roccops.com/adhoc
Thanks,
Can you set 'debug = true' in the statuswolf.conf file and send me the log info from the app log (e.g. app/log/log_2013-10-11.txt) when you perform this search?
thanks!
The debug log:
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) AdHoc search specified.
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Search datasource: OpenTSDB
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) OpenTSDB object created
2013-10-11 12:15:04 - DEBUG --> {"datasource":"OpenTSDB","downsample_master_interval":"1","new_query":"true","title":"","period":"date-search","time_span":"603","start_time":"1381514590","end_time":"1381515193","auto_update":"false","history_graph":"no","metrics_count":"6","metrics":[{"name":"net.if{host=hadoop01.us1b.com}","agg_type":"sum","ds_type":"sum","ds_interval":"1","lerp":"true"}],"key":"&m=sum:net.if{host=hadoop01.us1b.com}"}
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Incoming new query setting: true
2013-10-11 12:15:04 - INFO --> (admin|10.135.15.248) Retrieved metrics from OpenTSDB, total execution time: 0 seconds
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Normalizing legend
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) net.if host=hadoop01.us1b.com dev=eth0 location=us1b class=hadoop units=bps
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Metrics: net.if{host=hadoop01.us1b.com}(1 metrics)
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) All the legend bits: {"net.if host=hadoop01.us1b.mozyops.com dev=eth0 location=us1b class=hadoop units=bps":["net.if","host=hadoop01.us1b.mozyops.com","dev=eth0","location=us1b","class=hadoop","units=bps"]}
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Query tags: {"net.if{host=hadoop01.us1b.com}":[]}
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) sorting data, 5 timestamps, 5 values
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Calling downsampler, interval: method:
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Downsampler init, interval: method:
2013-10-11 12:15:04 - DEBUG --> (admin|10.135.15.248) Downsampling data, start: 1381514590, end: 1381514892
Corresponding Apache Error Log:
[Fri Oct 11 12:15:04 2013] [error] [client 10.135.15.248] PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 559, referer: https://wolf.roccops.com/adhoc
[Fri Oct 11 12:15:04 2013] [error] [client 10.135.15.248] PHP Notice: Undefined index: net.if in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 436, referer: https://wolf.roccops.com/adhoc
[Fri Oct 11 12:15:04 2013] [error] [client 10.135.15.248] PHP Notice: Undefined index: net.if in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 436, referer: https://wolf.roccops.com/adhoc
[Fri Oct 11 12:15:04 2013] [error] [client 10.135.15.248] PHP Notice: Undefined index: net.if in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 437, referer: https://wolf.roccops.com/adhoc
[Fri Oct 11 12:15:04 2013] [error] [client 10.135.15.248] PHP Notice: Undefined index: net.if in /var/www/StatusWolf/lib/StatusWolf/Model/Datasource/OpenTSDB.php on line 437, referer: https://wolf.roccops.com/adhoc
Ah, got it - specify your tags as space-separated from the metric:
net.if host=hadoop01.us1b.com
I have it on my list to support the metric{tag=tag_value} format, with the braces, but at the moment the format to use is with spaces...
thanks!
Works for me. I seem to recall that using the "{}" worked in earlier versions, maybe that was by accident or I'm just flat wrong. In either case thanks for the info.
It did work in a previous version, sort of, but you're right in that it was mostly by accident :-)