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

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

XMLWordPrintable

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

      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.

            ak Andrejs Kozlovs
            neogan Andrei Gushchin (Inactive)
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: