scalyr / scalyr-tool

Command-line tool for accessing Scalyr services
Apache License 2.0
56 stars 37 forks source link

Cannot facet-query for 'query' facet #16

Open jjhart opened 7 years ago

jjhart commented 7 years ago

It confuses the cmd line parser:

$ scalyr facet-query 'tag="foo"' query --start=1h --count=1
usage: scalyr [-h] [--version] [--server SERVER] [--token TOKEN] [--verbose]
              [--no-escape-unicode] [--start START] [--end END]
              [--count COUNT] [--mode {head,tail}] [--columns COLUMNS]
              [--output {singleline,multiline,csv,json,json-pretty}]
              [--priority {high,low}]
              {timeseries-query,list-files,delete-file,create-timeseries,query,facet-query,numeric-query,timerseries-query,tail,get-file,put-file}
              [filter]
scalyr: error: unrecognized arguments: query

You can workaround the issue by using the $ form (and remember to single-quote it!):

$ scalyr facet-query 'tag="foo"' '$query' --start=1h --count=1
count,value
...