Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8248

incorrect handling of carriage reload in vfs.file.regexp[] and web.page.regexp[] items

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.3
    • Fix Version/s: 2.2.5rc1, 2.3.2
    • Component/s: Agent (G)
    • Labels:

      Description

      This issue is composed of two recently encountered problems: one for vfs.file.regexp[] and another one for web.page.regexp[].

      (A) If item vfs.file.regexp[] is applied on a file with Windows line endings, then \r symbol prevents the $ symbol from matching.

      For instance, consider the example below:

      $ echo ' C: 8195Mb 5879Mb 2316Mb 28.2' > file.txt

      $ zabbix_agentd -t 'vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])$",,,,\1]'
      vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])$",,,,\1] [s|28.2]

      $ unix2dos file.txt
      unix2dos: converting file file.txt to DOS format ...

      $ zabbix_agentd -t 'vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])$",,,,\1]'
      vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])$",,,,\1] [s|]

      $ zabbix_agentd -t 'vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])",,,,\1]'
      vfs.file.regexp[file.txt,"C.* ([0-9]+\.[0-9])",,,,\1] [s|28.2]

      (B) For web.page.regexp[], the \r character is included into the output by default:

      $ zabbix_agentd -t 'web.page.regexp[localhost,,,.*]'
      ]eb.page.regexp[localhost,,,.*] [s|HTTP/1.1 200 OK

      Note how "w" in "web.page.regexp" was replaced by "]". This shows that \r was included into the output.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              asaveljevs Aleksandrs Saveljevs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: