[ZBX-16051] When an invalid Line break character is used it is processed in the error message Created: 2019 Apr 29  Updated: 2019 Apr 29

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sergejs Olonkins Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: errormessage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GIF File line_break_error_message.gif    

 Description   

In case if an incompatible line break option is used when testing a preprocessing step, in the error message the invalid line break character breaks the error message text into two lines without displaying the actual invalid character, thus, making the error message misleading for the user.

Steps to reproduce:

  1. Navigate to Configuration => Hosts => <Your Host name> => Items and open any existing item (or create a new one)
  2. Open Preprocessing Tab and add a "Phrometheus pattern" preprocessing step.
  3. Specify valid parameters for this preprocessing step (for example "free_bites {volume="D:"} == 9e+13" and "volume")
  4. Press button "Test" or "Test all steps"
  5. In the opened pop-up window specify field "Value" (should contain multiple lines) , set "End of line sequence" to "CRLF" and press "Test" button.

Result: The test has failed and the error message states that there is an invalid character, but the invalid character is not present in the error message and the message itself is broken into separate lines (newline character was not interpreted as string and was processed):

cannot apply Prometheus pattern: data parsing error at row 2 "free_bites{volume="D:"} 9e+13
": invalid character '
' following metric value

Expected: The invalid line break character should be interpreted as sting - it should be shown in the error message and should not cause line breaks in the message itself.

Example:


Generated at Fri Apr 04 11:52:51 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.