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:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-06-03 18:37:21 +0400
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2013-06-03 18:37:21 +0400
commit40b1890187d07f25bb0fdab5b15be1d1edcdc900 (patch)
treeb238f4189d21ada73d56150ff80a39605bb12c5c /include/module.h
parent0fe03e574cbea6b83c87571acbfdd3b30043a2f0 (diff)
...G...PS. [ZBXNEXT-1633] added support of multiple log records in the AGENT_RESULT structure
Diffstat (limited to 'include/module.h')
-rw-r--r--include/module.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/module.h b/include/module.h
index 032cc68036d..dd760623cb7 100644
--- a/include/module.h
+++ b/include/module.h
@@ -52,6 +52,18 @@ typedef struct
}
AGENT_REQUEST;
+typedef struct
+{
+ char *value;
+ char *source;
+ zbx_uint64_t lastlogsize;
+ int timestamp;
+ int severity;
+ int logeventid;
+ int mtime;
+}
+zbx_log_t;
+
/* agent return structure */
typedef struct
{
@@ -61,6 +73,9 @@ typedef struct
char *str;
char *text;
char *msg;
+
+ /* null-terminated list of pointers */
+ zbx_log_t **logs;
}
AGENT_RESULT;
@@ -69,7 +84,8 @@ AGENT_RESULT;
#define AR_DOUBLE 0x02
#define AR_STRING 0x04
#define AR_TEXT 0x08
-#define AR_MESSAGE 0x10
+#define AR_LOG 0x10
+#define AR_MESSAGE 0x20
/* SET RESULT */
@@ -100,6 +116,13 @@ AGENT_RESULT;
)
/* NOTE: always allocate new memory for val! DON'T USE STATIC OR STACK MEMORY!!! */
+#define SET_LOG_RESULT(res, val) \
+( \
+ (res)->type |= AR_LOG, \
+ (res)->logs = (zbx_log_t **)(val) \
+)
+
+/* NOTE: always allocate new memory for val! DON'T USE STATIC OR STACK MEMORY!!! */
#define SET_MSG_RESULT(res, val) \
( \
(res)->type |= AR_MESSAGE, \