Skip to content

Commit

Permalink
Add histogram oneshot search example
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Nov 10, 2023
1 parent 1d9b94c commit a552bdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions distribution/lambda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ invoke-hdfs-indexer: check-env
invoke-hdfs-searcher-severity: check-env
python -c 'from cdk import cli; cli.invoke_hdfs_searcher("""{"query": "severity_text:ERROR"}""")'

invoke-hdfs-searcher-histogram: check-env
python -c 'from cdk import cli; cli.invoke_hdfs_searcher("""{ "query": "*", "max_hits": 0, "aggs": { "events": { "date_histogram": { "field": "timestamp", "fixed_interval": "1h" }, "aggs": { "log_level": { "terms": { "size": 10, "field": "severity_text", "order": { "_count": "desc" } } } } } } }""")'

deploy-mock-data: build check-env
cdk deploy -a cdk/app.py MockDataStack

Expand Down

0 comments on commit a552bdf

Please sign in to comment.