Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3025

printing supported item keys without values

    XMLWordPrintable

    Details

    • Type: Change Request
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0alpha3
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Labels:

      Description

      Zabbix agent supports "-p" or "--print" option to print the list of supported items:

      $ zabbix_agentd -p | head -20
      agent.hostname                                [s|Zabbix server]
      agent.ping                                    [u|1]
      agent.version                                 [s|3.0.0alpha4]
      system.localtime[utc]                         [u|1446017639]
      system.run[echo test]                         [m|ZBX_NOTSUPPORTED] [Remote commands are not enabled.]
      web.page.get[localhost,,80]                   [t|HTTP/1.1 200 OK
      Date: Wed, 28 Oct 2015 07:33:59 GMT
      Server: Apache/2.4.10 (Debian)
      Vary: Accept-Encoding
      Content-Length: 7830
      Connection: close
      Content-Type: text/html;charset=UTF-8
      
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
      ...
      

      This is useful for manual execution, but for automated parsing it might be useful to omit the values. One example use case might be Zabbix bash completion, see https://github.com/zabbix/zabbix-bash-completion .

      Printing values (e.g., for web.page.get[] above) makes it harder to parse item keys out of that list. Also, there are potential problems when item values are expensive to obtain, give errors or that simply hang with default parameters.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            asaveljevs Aleksandrs Saveljevs
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: