Skip to content

Commit c93cb0b

Browse files
committed
add example for cat anomaly detector
1 parent a9a57db commit c93cb0b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

example/catanomalydetector.nim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import nimastic, httpclient
2+
3+
var client = elasticBasicClient()
4+
5+
let req = elasticsearch.CatAnomalyDitectors(
6+
Format: "json",
7+
Bytes: "gb",
8+
H: @["buckets.time.exp_avg_hour","buckets.time.max","data.input_fields"],
9+
Time: "s" # s to second
10+
)
11+
12+
let res = req.Do(client)
13+
14+
echo res.body

0 commit comments

Comments
 (0)