Permalink
Browse files

Fix querying multiple items from ts

  • Loading branch information...
1 parent cd99fda commit b1085fd84f47da75c0ca92338a295540997e40a1 @oldpatricka oldpatricka committed Mar 26, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 epu/sensors/trafficsentinel.py
@@ -186,10 +186,12 @@ def _build_script(self, query_fields, query_type, interval, group, dimensions=No
continue
if metric == 'pid':
- where_item = "(app_attributes ~ %s)" % (" | ".join(vals))
+ vals = ["%s ~ %s" % ("app_attributes", val) for val in vals]
+ where_item = "(%s)" % " | ".join(vals)
where_items.append(where_item)
else:
- where_item = "(%s = %s)" % (metric, " | ".join(vals))
+ vals = ["%s = %s" % (metric, val) for val in vals]
+ where_item = "(%s)" % " | ".join(vals)
where_items.append(where_item)
where = " & ".join(where_items)

0 comments on commit b1085fd

Please sign in to comment.