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

BOM isn't ignored when using vfs.file.contents

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 57 (Oct 2019), Sprint 58 (Nov 2019)
    • Story Points:
      1

      Description

      Steps to reproduce:

      • Create a file in UTF-16 LE encoding
      • run Zabbix Agent for Windows:
        zabbix_agentd.exe -t vfs.file.contents["C:\status.txt",UTF-16] and try to poll with zabbix_get -s <ip> -k vfs.file.contents["C:\status.txt",UTF-16]

      Result:

      zabbix_agent -t

      vfs.file.contents[status.txt,UTF-16]          [t|200]
      

      zabbix_get from Linux to Windows

      200
      

      Zabbix Server, if the type is Numeric(unsigned) and viewing log with less:

      "br:vfs.file.contents["C:\status.txt",UTF-16]" became not supported: Value "<U+FEFF>200" of type "string" is not suitable for value type "Numeric (unsigned)"
      

      so we see that BOM isn't ignored in such case, but if we will watch the log with tail

      "br:vfs.file.contents["C:\status.txt",UTF-16]" became not supported: Value "200" of type "string" is not suitable for value type "Numeric (unsigned)"
      

      And that will be the error message in the frontend which is confusing.

      Workaround:
      Use Value type: Character

      Expected:
      Ignore BOM on both - Linux and Windows.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              arimdjonoks Artjoms Rimdjonoks
              Reporter:
              aleksejs.petrovs Aleksejs Petrovs
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: