Cribl 在的function 的活用 (pipeline中)
说明:
下面的使用function,最好在特定的pipeline 中实现,全局的话,很大程度抓不到数据,因为pipeline 可以限定source / router, 来创建新的function , 常用的eval.
Functions
You've now gone through basic expressions using comparison operators and logical operators. Often, though, it's not enough to just compare two values. Sometimes you want to be able to include more complex logic. For example, you might want to check if an IP address is an "external" address or a "private" address or check if a field starts with, ends with, or includes a certain string fragment. Luckily, since Stream supports full JavaScript expressions, you have all the power of JavaScript at your disposal.
For example, field values are by