ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7766

Webcheck scenario required status codes is not accepting usermacro's

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.4rc1, 2.3.0
    • Component/s: Frontend (F)
    • 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.

        Activity

        Hide
        Krists Krigers (Inactive) added a comment - - edited

        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".'

        Ivo Kurzemnieks REOPENED. Please, revert this message back to original.

        Krists Krigers RESOLVED in r45281.

        Ivo Kurzemnieks CLOSED.

        Show
        Krists Krigers (Inactive) added a comment - - edited 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".' Ivo Kurzemnieks REOPENED. Please, revert this message back to original. Krists Krigers RESOLVED in r45281. Ivo Kurzemnieks CLOSED.
        Hide
        Ivo Kurzemnieks added a comment - - edited

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

        Krists Krigers RESOLVED in r45299.

        Ivo Kurzemnieks 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}".'

        Krists Krigers RESOLVED in r45337.

        Ivo Kurzemnieks 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".'

        Krists Krigers RESOLVED in r45346.

        Ivo Kurzemnieks 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.

        Krists Krigers CLOSED.

        Show
        Ivo Kurzemnieks added a comment - - edited (2) It's possible to enter {$MACRO1},{$MACRO1} and {$MACRO1}-{$MACRO2} But this field is meant for only one macro. Krists Krigers RESOLVED in r45299. Ivo Kurzemnieks 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}".' Krists Krigers RESOLVED in r45337. Ivo Kurzemnieks 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".' Krists Krigers RESOLVED in r45346. Ivo Kurzemnieks 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. Krists Krigers CLOSED.
        Hide
        Krists Krigers (Inactive) added a comment - - edited

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

        Ivo Kurzemnieks CLOSED.

        Show
        Krists Krigers (Inactive) added a comment - - edited (3) Translation string 'Invalid response code range "%1$s".' is not used anymore. Ivo Kurzemnieks CLOSED.
        Hide
        Ivo Kurzemnieks added a comment -

        TESTED.

        If (2) is OK, you can merge.

        Show
        Ivo Kurzemnieks added a comment - TESTED. If (2) is OK, you can merge.
        Hide
        Krists Krigers (Inactive) added a comment -

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

        Show
        Krists Krigers (Inactive) added a comment - Fixed in pre-2.2.4rc1 r45395 and pre-2.3.0 (trunk) r45397.
        Hide
        Ivo Kurzemnieks added a comment - - edited

        (4) REOPENED.

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

        Krists Krigers RESOLVED. Updated API changelog.

        Ivo Kurzemnieks CLOSED.

        Show
        Ivo Kurzemnieks added a comment - - edited (4) REOPENED. trunk ChangeLog has duplicate entry. (Since this was bothering me, I already removed duplicate entry in r45425.) API changes should be documented. Krists Krigers RESOLVED. Updated API changelog. Ivo Kurzemnieks CLOSED.

          People

          • Assignee:
            Unassigned
            Reporter:
            Frank
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: