Splunk_SPL常用函数

这些函数一般与 where eval 等关键字同时使用。

对⽐和条件函数
case(X,"Y",...)
cidrmatch("X",Y)
coalesce(X,...)
false()
if(X,Y,Z)
in(VALUE-LIST)
like(TEXT, PATTERN)
match(SUBJECT, "REGEX")
null()
nullif(X,Y)
searchmatch(X)
true()
validate(X,Y,...)

转换函数
printf("format",arguments)
tonumber(NUMSTR,BASE)
tostring(X,Y)

加密函数
md5(X)
sha1(X)
sha256(X)
sha512(X)

⽇期和时间函数
now()
relative_time(X,Y)
strftime(X,Y)
strptime(X,Y)
time()

信息函数
isbool(X)
isint(X)
isnotnull(X)
isnull(X)
isnum(X)
isstr(X)
typeof(X)

数学函数
abs(X)
ceiling(X)
exact(X)
exp(X)
floor(X)
ln(X)
log(X,Y)
pi()
pow(X,Y)
round(X,Y)
sigfig(X)
sqrt(X)

多值 eval 函数
commands(X)
mvappend(X,...)
mvcount(MVFIELD)
mvdedup(X)
mvfilter(X)
mvfind(MVFIELD,"REGEX")
mvindex(MVFIELD,STARTINDEX,ENDINDEX)
mvjoin(MVFIELD,STR)
mvrange(X,Y,Z)
mvsort(X)
mvzip(X,Y,"Z")
split(X,"Y")

统计 eval 函数
max(X,...)
min(X,...)
random()

⽂本函数
len(X)
lower(X)
ltrim(X,Y)
replace(X,Y,Z)
rtrim(X,Y)
spath(X,Y)
substr(X,Y,Z)
trim(X,Y)
upper(X)
urldecode(X)

三⾓函数和双曲函数
acos(X)
acosh(X)
asin(X)
asinh(X)
atan(X)
atan2(X,Y)
atanh(X)
cos(X)
cosh(X)
hypot(X,Y)
sin(X)
sinh(X)
tan(X)
tanh(X)

原文地址:https://www.cnblogs.com/congxinglong/p/13272012.html