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

Key system.sw.os[name] return \S

    XMLWordPrintable

Details

    • Team C
    • Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)
    • 0.25

    Description

      Steps to reproduce:
      Change /etc/os-release file with removing double quotes from

      PRETTY_NAME="CentOS"
      

      to

      PRETTY_NAME=CentOS
      

      So agent will try to get value for key system.sw.os[name] from other file /etc/issue.net
      Which could have strange value

      # cat /etc/issue.net
      \S
      Kernel \r on an \m
      

      Which will be reported instead PRETTY_NAME value

      Result:

      mendeleev ~]# zabbix_get -s 127.1 -k system.sw.os[name]
      \S
      

      Expected:

      PRETTY_NAME=CentOS
      mendeleev ~]# zabbix_get -s 127.1 -k system.sw.os[name]
      CentOS
      

      SYSTEM_SW_OS() searches values only inside double-quotes. But VAR=VALUE (with VALUE not enclosed in double-quotes if it doesn't contain white spaces) is also a valid shell syntax and must be supported.

      Attachments

        Activity

          People

            ak Andrejs Kozlovs
            neogan Andrei Gushchin
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: