Closed aitting closed 3 hours ago
The notification template cannot implement line wrapping. How to wrap can cause errors in the JSON data submitted when pushing the webhook.
this is my notification template text:
content: Event【 ${title} 】 id: {id}
This is the JSON data push format after line wrapping:
{ "target": "hedou_service_esc.event-detail.title", "alarmId": 447211236329472, "thresholdId": 87, "priority": 1, "content": "content: Event【 my event title 】 id: 30d0b4e5-fbe6-be07-0d18-3a163b7d36da", "status": 0, "times": 1, "triggerTime": "2024-11-15T16:27:10", "tags": { "app": "hedou_service_esc", "monitorId": "447172690212864", "thresholdId": "87", "monitorHost": "192.168.3.24" }, "extraProperties": {} }
Correct format:
{ "target": "hedou_service_esc.event-detail.title", "alarmId": 447211236329472, "thresholdId": 87, "priority": 1, "content": "content: Event【 my event title 】 \r\n id: 30d0b4e5-fbe6-be07-0d18-3a163b7d36da", "status": 0, "times": 1, "triggerTime": "2024-11-15T16:27:10", "tags": { "app": "hedou_service_esc", "monitorId": "447172690212864", "thresholdId": "87", "monitorHost": "192.168.3.24" }, "extraProperties": {} }
No response
HertzBeat version(s):1.5.0
After upgrading to version 1.6.1, it worked normally
1.6.1
Is there an existing issue for this?
Current Behavior
The notification template cannot implement line wrapping. How to wrap can cause errors in the JSON data submitted when pushing the webhook.
this is my notification template text:
This is the JSON data push format after line wrapping:
Expected Behavior
Correct format:
Steps To Reproduce
No response
Environment
Debug logs
No response
Anything else?
No response