Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] <title>webhook send alter message error #2524

Closed
1 task done
Ykubernetes opened this issue Aug 14, 2024 · 5 comments · Fixed by #2532
Closed
1 task done

[BUG] <title>webhook send alter message error #2524

Ykubernetes opened this issue Aug 14, 2024 · 5 comments · Fixed by #2532
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Ykubernetes
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

During alarm recovery, sending a message containing a threshold expression causes the content field to contain special characters
for example:
{
"alarmId": 76456,
"target": "${target}",
"thresholdId": 33455,
"priority": 0,
"content": "alert **** , status("up")",
"status": 0,
"times": 1,
"triggerTime": "2022-02-25T13:32:13",
"tags": {
"app": "windows",
"monitorId": "180427708350720",
"metrics": "availability",
"code": "UN_CONNECTABLE",
"thresholdId": "112",
"monitorName": "WINDOWS_192.168.124.12"
}
}

"content" is not a valid JSON format and has not been escaped

Expected Behavior

No response

Steps To Reproduce

No response

Environment

HertzBeat version(s): 1.6.0

Debug logs

no logs

Anything else?

No response

@Ykubernetes
Copy link
Author

hertzbeat 用于Apache Jexl处理表情,你可以详细了解它的使用方法,或者参考

!equals(status,"UP")
There are double quotes. When sending notification recovery, adding this expression to the content field will cause a json format error.

@pwallk
Copy link
Contributor

pwallk commented Aug 15, 2024

sorry,Reply wrong

@tomsun28 tomsun28 added the good first issue Good for newcomers label Aug 15, 2024
@Ykubernetes
Copy link
Author

Why no one replied

@tomsun28
Copy link
Contributor

Hi, this should be a problem caused by inserting special content into the json template. We will fix it by escaping it later.

@Ykubernetes
Copy link
Author

你好,这应该是在 json 模板中插入特殊内容导致的问题,我们稍后会通过转义来修复。

好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Development

Successfully merging a pull request may close this issue.

3 participants