这个curl请求中,fcl_ip的值$1是一个变量,需要用如下方式引用。
curl -s -XPOST "http://服务器URL" -d '{"query":{"bool":{"must":[{"range":{"@timestamp":{"gt":"now-5m"}}},{"range":{"fcl_state":{"lt":"30"}}},{"wildcard":{"fcl_ip":"'"$1"'"}}],"must_not":[],"should":[]}},"from":0,"size":1000,"sort":[],"aggs":{}}'