[ZBX-7766] Webcheck scenario required status codes is not accepting usermacro's Created: 2014 Feb 07  Updated: 2017 May 30  Resolved: 2014 May 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.1
Fix Version/s: 2.2.4rc1, 2.3.0

Type: Incident report Priority: Major
Reporter: Frank Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: macros, webmonitoring
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04, Zabbix 2.2.1 via Zabbix apt repository



 Description   

According to the documentation (https://www.zabbix.com/documentation/2.2/manual/web_monitoring) the Required Status codes in the webcheck scenario configuration should support user macro's:

Starting with Zabbix 2.2, user macros can be used in this field.

However, entering {$STATUS1} results in an error:

Field "status_codes" is not integer list or range.



 Comments   
Comment by Krists Krigers (Inactive) [ 2014 May 07 ]

Fixed in r45119 and r45121, branch svn://svn.zabbix.com/branches/dev/ZBX-7766.

(1) Changed translatable string:

  • 'Invalid response code "%1$s".' to 'Invalid response code or user macro "%1$s".'

iivs REOPENED. Please, revert this message back to original.

kristsk RESOLVED in r45281.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 May 09 ]

(2) It's possible to enter {$MACRO1},{$MACRO1} and {$MACRO1}-{$MACRO2}
But this field is meant for only one macro.

kristsk RESOLVED in r45299.

iivs REOPENED.
Error message should display what user has entered. Entering "{$MACRO1},{$MACRO1}", the error message now only displays the first part 'Invalid response code "{$MACRO1}".'

kristsk RESOLVED in r45337.

iivs REOPENED.

  • Problem still exists when entering invalid string containing commas or slashes. For example status code "ZBX-7766" will display error: Invalid response code "ZBX".
  • Status code "asd{$MACRO1}asd" will say: 'Invalid response code range "asd{$MACRO1}asd"'. Range is something else. We discussed this and decided to remove separate range message, leaving only 1 message: 'Invalid response code "%1$s".'

kristsk RESOLVED in r45346.

iivs The check on lines: 636-638 was redundant and second check could've been unified under one IF clause.
I sligthly refactored the code r45362. Please review.

kristsk CLOSED.

Comment by Krists Krigers (Inactive) [ 2014 May 10 ]

(3) Translation string 'Invalid response code range "%1$s".' is not used anymore.

iivs CLOSED.

Comment by Ivo Kurzemnieks [ 2014 May 12 ]

TESTED.

If (2) is OK, you can merge.

Comment by Krists Krigers (Inactive) [ 2014 May 13 ]

Fixed in pre-2.2.4rc1 r45395 and pre-2.3.0 (trunk) r45397.

Comment by Ivo Kurzemnieks [ 2014 May 13 ]

(4) REOPENED.

  • trunk ChangeLog has duplicate entry. (Since this was bothering me, I already removed duplicate entry in r45425.)
  • API changes should be documented.

kristsk RESOLVED. Updated API changelog.

iivs CLOSED.

Generated at Fri Apr 19 08:43:24 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.