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

Precision of API hostinterface. methods documentation, starting with 5.0

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 6.0 (plan)
    • 5.0.17, 5.4.7
    • Documentation (D)
    • None
    • Team B
    • Sprint 82 (Nov 2021)
    • 1

      1. https://www.zabbix.com/documentation/5.0/manual/api/changes_4.4_-_5.0
      SNMP setting was transferred from items(in 4.0) to interfaces(in 5.0). Details section(which describes SNMP setting) was added to all hostinterface methods, not only to hostinterface.get.
      Also would be nice to add Example of such interface creation to hostinterface.create method documentation. Example below:

      {
          "jsonrpc": "2.0",
          "method": "hostinterface.create",
          "params": {
              "hostid": "10456",
              "main": "0",
              "type": "2",
              "useip": "1",
              "ip": "127.0.0.1",
              "dns": "",
              "port": "1601",
              "details": {
                  "version": "2",
                  "bulk": "1",
                  "community": "{$SNMP_COMMUNITY}"
              }
          },
          "auth": "038e1d7b1735c6a5436ee9eae095879e",
          "id": 1
      }
      

      It will save time to create it for first time.

      2. https://www.zabbix.com/documentation/5.0/manual/api/reference/hostinterface/object
      To create SNMP interface for version 1 and 2c "community" field is REQUIRED! Without it API will get response : "Incorrect arguments passed to function." Which is not self explanatory.
      In documentation confusion comes from word used. It is better to change to required

      Property Type Description
      community string SNMP community. Used - Required only by SNMPv1 and SNMPv2 interfaces.

            martins-v Martins Valkovskis
            atocko Andrey Tocko
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: