code: function itemsForCounter(flushInterval, host, key, value) {
    const avg = value / (flushInterval / 1000); // calculate "per second" rate
  
    return [
      {
        host,
        key: `${key}[total]`,
        value,
      },
      {
        host,
        key: `${key}[avg]`,
        value: avg,
      },
    ];
  }
docs: Generate items for a counter.
  @param {number} flushInterval How long stats were collected, for calculating average.
  @param {string} host Hostname in Zabbix.
  @param {string} key Item key in Zabbix.
  @param {number} value Total collected during interval.
  @returns {array} Array of {host, key, value} objects.