{index:"myIndex",field1:"myfield1",field2:{"subField1":"mySubField1","subField2":145,"subField3":500},。。。。。。}
SPL:index:"myIndex"eval result=if(field.subField2(。。。。。点运算符在SPL中工作吗?
我假设您的数据是JSON格式的。如果是,则可以使用spath
从结构化数据中提取字段。然后用isnotnull
检查字段是否存在
index="myIndex" | spath | where isnotnull(field2.subField2)
假设您的数据是JSON格式的,那么应该这样做:
index=myIndex sourcetype=srctp field2{}.subField2=*
如果这些是多值字段,则需要首先进行mvexpand