ret = process_log_check(NULL, agent2_result, regexps, metric, process_value_cb, lastlogsize_sent, mtime_sent, error,
** Copyright (C) 2001-2025 Zabbix SIA
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
#cgo CFLAGS: -I${SRCDIR}/../../../../include
#include "../src/zabbix_agent/metrics/metrics.h"
#include "../src/zabbix_agent/logfiles/logfiles.h"
#include "zbx_item_constants.h"
#include "../src/libs/zbxnix/fatal.h"
typedef zbx_active_metric_t* ZBX_ACTIVE_METRIC_LP;
typedef zbx_vector_ptr_t * zbx_vector_ptr_lp_t;
typedef zbx_vector_expression_t * zbx_vector_expression_lp_t;
typedef char * char_lp_t;
typedef zbx_vector_pre_persistent_t * zbx_vector_pre_persistent_lp_t;
zbx_active_metric_t *new_metric(zbx_uint64_t itemid, char *key, zbx_uint64_t lastlogsize, int mtime, int flags)
zbx_active_metric_t *metric = malloc(sizeof(zbx_active_metric_t));
memset(metric, 0, sizeof(zbx_active_metric_t));
metric->lastlogsize = lastlogsize;
metric->flags = (unsigned char)flags;
metric->skip_old_data = (0 != metric->lastlogsize ? 0 : 1);
metric->persistent_file_name = NULL; // initialized but not used in Agent2
void metric_set_nextcheck(zbx_active_metric_t *metric, int nextcheck)
metric->nextcheck = nextcheck;
void metric_get_meta(zbx_active_metric_t *metric, zbx_uint64_t *lastlogsize, int *mtime)
*lastlogsize = metric->lastlogsize;
void metric_set_unsupported(zbx_active_metric_t *metric)
metric->state = ITEM_STATE_NOTSUPPORTED;
metric->start_time = 0.0;