def METHOD_NAME(self, hostname, key, data):
    zm = ZabbixMetric(hostname, key, data)
    if self.send_aggregated_metrics:
        self.aggregated_metrics.append(zm)
        if len(self.aggregated_metrics) > self.metrics_chunk_size:
            elastalert_logger.info("Sending: %s metrics" % (len(self.aggregated_metrics)))
            try:
                ZabbixSender(zabbix_server=self.sender_host, zabbix_port=self.sender_port) \
                    .send(self.aggregated_metrics)
                self.aggregated_metrics = []
            except Exception as e:
                elastalert_logger.exception(e)
    else:
        try:
            ZabbixSender(zabbix_server=self.sender_host, zabbix_port=self.sender_port).send([zm])
        except Exception as e:
            elastalert_logger.exception(e)