hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Question] NVIDIA配置阈值规则报错

Open Lee-1024 opened this issue 9 months ago • 1 comments

Question

alert expr error: org.apache.hertzbeat.common.util.JexlExpressionRunner.compile:79@1:40 tokenization error in '',请问这是什么原因

Lee-1024 avatar Mar 27 '25 08:03 Lee-1024

Root Causes 1.Empty Expression: The error shows tokenization error in '', suggesting an empty string was passed as the expression.

2.Expression Syntax Error: The JEXL (Java Expression Language) expression may contain:

Missing operators

Unmatched parentheses

Unsupported syntax

Incorrect variable reference format

3.Special Character Issue: The expression might contain unescaped special characters.

Recommended Solutions 1.Verify Expression Isn't Empty: Ensure you're not passing an empty string as the alert expression.

2.Validate Expression Syntax:

Use proper JEXL syntax

Check for balanced parentheses

Confirm correct variable reference format (e.g., ${metric} or metric)

3.Test with Simplified Expression:

// Example simple expressions
value > 10
// or
${cpu.usage} > 80``

harshita2626 avatar Mar 27 '25 12:03 harshita2626