此处列出的所有函数均支持以下场景:
除非特别说明,数学函数支持float和integer值类型。
关于函数参数的通用说明:
<
>
标识函数 | ||
---|---|---|
Description | 函数特定参数 | 说明 |
abs (value) | ||
The absolute value (from 0) of a value. | value - 待检查值 | 例如:'3'或'-3'的绝对值均为'3' 示例: => abs(last(/主机/key))>10 |
acos (value) | ||
The arccosine of a value as an angle, expressed in radians. | value - 待检查值 | 数值范围必须在-1到1之间 例如:'0.5'的反余弦值为'2.0943951' 示例: => acos(last(/主机/key)) |
asin (value) | ||
The arcsine of a value as an angle, expressed in radians. | value - 待检查值 | 数值范围必须在-1到1之间 例如:'0.5'的反正弦值为'-0.523598776' 示例: => asin(last(/主机/key)) |
atan (value) | ||
The arctangent of a value as an angle, expressed in radians. | value - 待检查值 | 例如:'1'的反正切值为'0.785398163' 示例: => atan(last(/主机/key)) |
atan2 (value,abscissa) | ||
The arctangent of the ordinate (value) and abscissa coordinates specified as an angle, expressed in radians. | value - 待检查值 abscissa - 横坐标值 |
例如:纵坐标和横坐标为'1'的反正切值为'2.21429744' 示例: => atan2(last(/主机/key),2) |
avg (<value1>,<value2>,...) | ||
Average value of the referenced item values. | valueX - 其他函数返回的监控项历史数据值 | 示例: => avg(avg(/主机/key),avg(/host2/key2)) |
cbrt (value) | ||
Cube root of a value. | value - 待检查值 | 例如:'64'的立方根为'4','63'的立方根为'3.97905721' 示例: => cbrt(last(/主机/key)) |
ceil (value) | ||
Round the value up to the nearest greater or equal integer. | value - 待检查值 | 例如:'2.4'将向上取整为'3' 示例: => ceil(last(/主机/key)) 另见floor()函数 |
cos (value) | ||
The cosine of a value, where the value is an angle expressed in radians. | value - 待检查值 | 例如:'1'的余弦值为'0.54030230586' 示例: => cos(last(/主机/key)) |
cosh (value) | ||
The hyperbolic cosine of a value. | value - 待检查值 | 例如:'1'的双曲余弦值为'1.54308063482' 返回值为实数而非科学计数法 示例: => cosh(last(/主机/key)) |
cot (value) | ||
The cotangent of a value, where the value is an angle, expressed in radians. | value - 待检查值 | 例如:'1'的余切值为'0.54030230586' 示例: => cot(last(/主机/key)) |
degrees (value) | ||
Converts a value from radians to degrees. | value - 待检查值 | 例如:'1'转换为角度值为'57.2957795' 示例: => degrees(last(/主机/key)) |
e | ||
Euler's number (2.718281828459045). | 示例: => e() |
|
exp (value) | ||
Euler's number at a power of a value. | value - 待检查值 | 例如:以'2'为指数的欧拉数为'7.38905609893065' 示例: => exp(last(/主机/key)) |
expm1 (value) | ||
Euler's number at a power of a value minus 1. | value - 待检查值 | 例如:以'2'为指数的欧拉数减1得'6.38905609893065' 示例: => expm1(last(/主机/key)) |
floor (value) | ||
Round the value down to the nearest smaller or equal integer. | value - 待检查值 | 例如:'2.6'将向下取整为'2' 示例: => floor(last(/主机/key)) 另见ceil()函数 |
log (value) | ||
Natural logarithm. | value - 待检查值 | 例如:'2'的自然对数为'0.69314718055994529' 示例: => log(last(/主机/key)) |
log10 (value) | ||
Decimal logarithm. | value - 待检查值 | 例如:'5'的常用对数为'0.69897000433' 示例: => log10(last(/主机/key)) |
max (<value1>,<value2>,...) | ||
Highest value of the referenced item values. | valueX - 其他函数返回的监控项历史数据值 | 示例: => max(avg(/主机/key),avg(/host2/key2)) |
min (<value1>,<value2>,...) | ||
Lowest value of the referenced item values. | valueX - 其他函数返回的监控项历史数据值 | 示例: => min(avg(/主机/key),avg(/host2/key2)) |
mod (value,denominator) | ||
Division remainder. | value - 待检查值 denominator - 除数 |
例如:'5'除以'2'的余数为'1' 示例: => mod(last(/主机/key),2) |
pi | ||
Pi constant (3.14159265358979). | 示例: => pi() |
|
power (value,power value) | ||
The power of a value. | value - 待检查值 power value - 幂指数 |
例如:'2'的3次幂为'8' 示例: => power(last(/主机/key),3) |
radians (value) | ||
Convert a value from degrees to radians. | value - 待检查值 | 例如:'1'转换为弧度值为'0.0174532925' 示例: => radians(last(/主机/key)) |
rand | ||
Return a random integer value. | 使用时间作为种子生成的伪随机数(适用于数学用途,不适用于密码学) 示例: => rand() |
|
round (value,decimal places) | ||
Round the value to decimal places. | value - 待检查值 decimal places - 指定小数位数(支持0位) |
例如:'2.5482'四舍五入到2位小数为'2.55' 示例: => round(last(/主机/key),2) |
signum (value) | ||
Returns '-1' if a value is negative, '0' if a value is zero, '1' if a value is positive. | value - 待检查值 | 示例: => signum(last(/主机/key)) |
sin (value) | ||
The sine of a value, where the value is an angle expressed in radians. | value - 待检查值 | 例如:'1'的正弦值为'0.8414709848' 示例: => sin(last(/主机/key)) |
sinh (value) | ||
The hyperbolical sine of a value. | value - 待检查值 | 例如:'1'的双曲正弦值为'1.17520119364' 示例: => sinh(last(/主机/key)) |
sqrt (value) | ||
Square root of a value. | value - 待检查值 | 负值将导致函数执行失败 例如:'3.5'的平方根为'1.87082869339' 示例: => sqrt(last(/主机/key)) |
sum (<value1>,<value2>,...) | ||
Sum of the referenced item values. | valueX - 其他函数返回的监控项历史数据值 | 示例: => sum(avg(/主机/key),avg(/host2/key2)) |
tan (value) | ||
The tangent of a value. | value - 待检查值 | 例如:'1'的正切值为'1.55740772465' 示例: => tan(last(/主机/key)) |
truncate (value,decimal places) | ||
Truncate the value to decimal places. | value - 待检查值 decimal places - 指定截断小数位数(支持0位) |
示例: => truncate(last(/主机/key),2) |