Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2021-11-18 10:19:37 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2021-11-18 10:19:37 +0300
commit7dfeddba5411df136bd48186ef537d4334d12caa (patch)
tree384881046d835e1cc82af32ec1163854cdcaee35 /include/zbxprometheus.h
parent70915df59cdf8089b0be3fcd931a77a089f52a6f (diff)
........S. [ZBXNEXT-7049] added preprocessing cache for prometheus pattern step
Diffstat (limited to 'include/zbxprometheus.h')
-rw-r--r--include/zbxprometheus.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/zbxprometheus.h b/include/zbxprometheus.h
index 74eaf6efb07..14ff6c00b9e 100644
--- a/include/zbxprometheus.h
+++ b/include/zbxprometheus.h
@@ -20,6 +20,8 @@
#ifndef ZABBIX_ZBXPROMETHEUS_H
#define ZABBIX_ZBXPROMETHEUS_H
+#include "zbxalgo.h"
+
int zbx_prometheus_pattern(const char *data, const char *filter_data, const char *output, char **value,
char **error);
int zbx_prometheus_to_json(const char *data, const char *filter_data, char **value, char **error);
@@ -27,4 +29,15 @@ int zbx_prometheus_to_json(const char *data, const char *filter_data, char **val
int zbx_prometheus_validate_filter(const char *pattern, char **error);
int zbx_prometheus_validate_label(const char *label);
+typedef struct
+{
+ zbx_vector_ptr_t rows;
+}
+zbx_prometheus_t;
+
+int zbx_prometheus_init(zbx_prometheus_t *prom, const char *data, char **error);
+void zbx_prometheus_clear(zbx_prometheus_t *prom);
+int zbx_prometheus_pattern_ex(zbx_prometheus_t *prom, const char *filter_data, const char *output, char **value,
+ char **error);
+
#endif