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:
authorMiks Kronkalns <miks.kronkalns@zabbix.com>2021-04-07 14:24:10 +0300
committerMiks Kronkalns <miks.kronkalns@zabbix.com>2021-04-07 14:24:10 +0300
commit81c00cdcceb9251623ee4c249f815983357e580f (patch)
treea5dd1e9d0c39987bbf2c02b6ee034f27b7dcfd4d /include
parent6e11afe5b7cb700a41b6c3ac7e3c803048a7a6d9 (diff)
parent028835860931ffab16ce9354c8dec156e0b6707f (diff)
.......... [ZBXNEXT-2976] updated to latest from master; Resolved conflicts in:
create/src/schema.tmpl create/src/templates.tmpl include/zbxjson.h src/libs/zbxdbupgrade/dbupgrade_5030.c templates/app/elasticsearch_http/template_app_elasticsearch_http.yaml templates/app/haproxy_agent/template_app_haproxy_agent.yaml templates/app/haproxy_http/template_app_haproxy_http.yaml templates/app/jenkins/template_app_jenkins.yaml templates/app/rabbitmq_agent/template_app_rabbitmq_agent.yaml templates/app/rabbitmq_http/template_app_rabbitmq_http.yaml templates/db/mssql_odbc/template_db_mssql_odbc.yaml templates/db/postgresql/template_db_postgresql.yaml templates/db/postgresql_agent2/template_db_postgresql_agent2.yaml templates/module/host_resources_snmp/template_module_host_resources_snmp.yaml templates/module/interfaces_simple_snmp/template_module_interfaces_simple_snmp.yaml templates/module/interfaces_snmp/template_module_interfaces_snmp.yaml templates/module/interfaces_win_snmp/template_module_interfaces_win_snmp.yaml templates/net/mellanox_snmp/template_net_mellanox_snmp.yaml templates/os/linux/template_os_linux.yaml templates/os/linux_active/template_os_linux_active.yaml templates/os/linux_prom/template_os_linux_prom.yaml templates/os/windows_agent/template_os_windows_agent.yaml templates/os/windows_agent_active/template_os_windows_agent_active.yaml templates/tel/asterisk_http/template_tel_asterisk_http.yaml ui/app/controllers/CControllerProfileUpdate.php ui/app/views/js/reports.auditlog.list.js.php ui/app/views/monitoring.dashboard.view.php ui/include/classes/api/managers/CItemPrototypeManager.php ui/include/classes/api/services/CHost.php ui/include/classes/api/services/CHostGeneral.php ui/include/classes/export/CConfigurationExportBuilder.php ui/include/classes/import/converters/C52ImportConverter.php ui/include/classes/screens/CScreenBase.php ui/include/classes/screens/CScreenDataOverview.php ui/include/classes/screens/CScreenTriggersOverview.php ui/include/defines.inc.php ui/include/views/monitoring.screen.constructor.edit.php ui/js/init.js ui/screenedit.php ui/tests/api_json/testAuditLog.php ui/tests/api_json/xml/testDeleteMissingForLinkedTemplateApplication.xml
Diffstat (limited to 'include')
-rw-r--r--include/common.h26
-rw-r--r--include/dbcache.h2
-rw-r--r--include/proxy.h4
-rw-r--r--include/version.h4
-rw-r--r--include/zbxalgo.h43
-rw-r--r--include/zbxjson.h4
-rw-r--r--include/zbxserver.h18
7 files changed, 71 insertions, 30 deletions
diff --git a/include/common.h b/include/common.h
index 85f9c76ea24..0ed86170393 100644
--- a/include/common.h
+++ b/include/common.h
@@ -404,24 +404,6 @@ const char *zbx_dservice_type_string(zbx_dservice_type_t service);
#define EVENT_TYPE_TRIGGER_UNKNOWN 4
/* #define EVENT_TYPE_TRIGGER_NORMAL 5 deprecated */
-#define SCREEN_RESOURCE_GRAPH 0
-#define SCREEN_RESOURCE_SIMPLE_GRAPH 1
-#define SCREEN_RESOURCE_MAP 2
-#define SCREEN_RESOURCE_PLAIN_TEXT 3
-#define SCREEN_RESOURCE_HOST_INFO 4
-#define SCREEN_RESOURCE_TRIGGER_INFO 5
-#define SCREEN_RESOURCE_SERVER_INFO 6
-#define SCREEN_RESOURCE_CLOCK 7
-#define SCREEN_RESOURCE_SCREEN 8
-#define SCREEN_RESOURCE_TRIGGER_OVERVIEW 9
-#define SCREEN_RESOURCE_DATA_OVERVIEW 10
-#define SCREEN_RESOURCE_URL 11
-#define SCREEN_RESOURCE_ACTIONS 12
-#define SCREEN_RESOURCE_EVENTS 13
-#define SCREEN_RESOURCE_HOSTGROUP_TRIGGERS 14
-#define SCREEN_RESOURCE_SYSTEM_STATUS 15
-#define SCREEN_RESOURCE_HOST_TRIGGERS 16
-
typedef enum
{
SYSMAP_ELEMENT_TYPE_HOST = 0,
@@ -855,9 +837,12 @@ zbx_script_t;
#define ZBX_SCRIPT_TYPE_IPMI 1
#define ZBX_SCRIPT_TYPE_SSH 2
#define ZBX_SCRIPT_TYPE_TELNET 3
-#define ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT 4
#define ZBX_SCRIPT_TYPE_WEBHOOK 5
+#define ZBX_SCRIPT_SCOPE_ACTION 1
+#define ZBX_SCRIPT_SCOPE_HOST 2
+#define ZBX_SCRIPT_SCOPE_EVENT 4
+
#define ZBX_SCRIPT_EXECUTE_ON_AGENT 0
#define ZBX_SCRIPT_EXECUTE_ON_SERVER 1
#define ZBX_SCRIPT_EXECUTE_ON_PROXY 2 /* fall back to execution on server if target not monitored by proxy */
@@ -919,7 +904,8 @@ while (0)
\
do \
{ \
- zbx_error("ERROR [file:%s,line:%d] Something impossible has just happened.", __FILE__, __LINE__); \
+ zbx_error("ERROR [file and function: <%s,%s>, revision:%s, line:%d] Something impossible has just" \
+ " happened.", __FILE__, __func__, ZABBIX_REVISION, __LINE__); \
zbx_backtrace(); \
} \
while (0)
diff --git a/include/dbcache.h b/include/dbcache.h
index aaadf0c1aa9..6f252b4fd44 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -1006,4 +1006,6 @@ void zbx_db_trigger_queue_unlock(void);
void zbx_get_host_interfaces_availability(zbx_uint64_t hostid, zbx_agent_availability_t *agents);
+int zbx_hc_check_proxy(zbx_uint64_t proxyid);
+
#endif
diff --git a/include/proxy.h b/include/proxy.h
index 2d045c2aa75..246e47c6f0c 100644
--- a/include/proxy.h
+++ b/include/proxy.h
@@ -33,6 +33,10 @@
#define ZBX_PROXY_DATA_DONE 0
#define ZBX_PROXY_DATA_MORE 1
+#define ZBX_PROXY_UPLOAD_UNDEFINED 0
+#define ZBX_PROXY_UPLOAD_DISABLED 1
+#define ZBX_PROXY_UPLOAD_ENABLED 2
+
int get_active_proxy_from_request(struct zbx_json_parse *jp, DC_PROXY *proxy, char **error);
int zbx_proxy_check_permissions(const DC_PROXY *proxy, const zbx_socket_t *sock, char **error);
int check_access_passive_proxy(zbx_socket_t *sock, int send_response, const char *req);
diff --git a/include/version.h b/include/version.h
index ad2adb10e7b..e7cf328aeac 100644
--- a/include/version.h
+++ b/include/version.h
@@ -24,7 +24,7 @@
#define ZBX_STR(str) ZBX_STR2(str)
#define APPLICATION_NAME "Zabbix Agent"
-#define ZABBIX_REVDATE "18 February 2021"
+#define ZABBIX_REVDATE "22 March 2021"
#define ZABBIX_VERSION_MAJOR 5
#define ZABBIX_VERSION_MINOR 4
#define ZABBIX_VERSION_PATCH 0
@@ -36,7 +36,7 @@
# define ZABBIX_VERSION_RC_NUM {ZABBIX_RC_NUM}
# endif
#endif
-#define ZABBIX_VERSION_RC "beta1"
+#define ZABBIX_VERSION_RC "rc1"
#define ZABBIX_VERSION ZBX_STR(ZABBIX_VERSION_MAJOR) "." ZBX_STR(ZABBIX_VERSION_MINOR) "." \
ZBX_STR(ZABBIX_VERSION_PATCH) ZABBIX_VERSION_RC
#define ZABBIX_REVISION ZBX_STR(ZABBIX_VERSION_REVISION)
diff --git a/include/zbxalgo.h b/include/zbxalgo.h
index 4e016a9171c..a3ac1de008c 100644
--- a/include/zbxalgo.h
+++ b/include/zbxalgo.h
@@ -413,6 +413,49 @@ void zbx_queue_ptr_push(zbx_queue_ptr_t *queue, void *value);
void *zbx_queue_ptr_pop(zbx_queue_ptr_t *queue);
void zbx_queue_ptr_remove_value(zbx_queue_ptr_t *queue, const void *value);
+/* list item data */
+typedef struct list_item
+{
+ struct list_item *next;
+ void *data;
+}
+zbx_list_item_t;
+
+/* list data */
+typedef struct
+{
+ zbx_list_item_t *head;
+ zbx_list_item_t *tail;
+ zbx_mem_malloc_func_t mem_malloc_func;
+ zbx_mem_realloc_func_t mem_realloc_func;
+ zbx_mem_free_func_t mem_free_func;
+}
+zbx_list_t;
+
+/* queue item data */
+typedef struct
+{
+ zbx_list_t *list;
+ zbx_list_item_t *current;
+ zbx_list_item_t *next;
+}
+zbx_list_iterator_t;
+
+void zbx_list_create(zbx_list_t *queue);
+void zbx_list_create_ext(zbx_list_t *queue, zbx_mem_malloc_func_t mem_malloc_func, zbx_mem_free_func_t mem_free_func);
+void zbx_list_destroy(zbx_list_t *list);
+void zbx_list_append(zbx_list_t *list, void *value, zbx_list_item_t **inserted);
+void zbx_list_insert_after(zbx_list_t *list, zbx_list_item_t *after, void *value, zbx_list_item_t **inserted);
+void zbx_list_prepend(zbx_list_t *list, void *value, zbx_list_item_t **inserted);
+int zbx_list_pop(zbx_list_t *list, void **value);
+int zbx_list_peek(const zbx_list_t *list, void **value);
+void zbx_list_iterator_init(zbx_list_t *list, zbx_list_iterator_t *iterator);
+int zbx_list_iterator_next(zbx_list_iterator_t *iterator);
+int zbx_list_iterator_peek(const zbx_list_iterator_t *iterator, void **value);
+void zbx_list_iterator_clear(zbx_list_iterator_t *iterator);
+int zbx_list_iterator_equal(const zbx_list_iterator_t *iterator1, const zbx_list_iterator_t *iterator2);
+int zbx_list_iterator_isset(const zbx_list_iterator_t *iterator);
+void zbx_list_iterator_update(zbx_list_iterator_t *iterator);
#endif
diff --git a/include/zbxjson.h b/include/zbxjson.h
index 3157cd480b5..e066d0a2bff 100644
--- a/include/zbxjson.h
+++ b/include/zbxjson.h
@@ -166,6 +166,7 @@
#define ZBX_PROTO_TAG_EXPRESSION "expression"
#define ZBX_PROTO_TAG_CLIENTIP "clientip"
#define ZBX_PROTO_TAG_ITEM_TAGS "item_tags"
+#define ZBX_PROTO_TAG_PROXY_UPLOAD "upload"
#define ZBX_PROTO_VALUE_FAILED "failed"
#define ZBX_PROTO_VALUE_SUCCESS "success"
@@ -198,6 +199,9 @@
#define ZBX_PROTO_VALUE_PREPROCESSING_TEST "preprocessing.test"
#define ZBX_PROTO_VALUE_EXPRESSIONS_EVALUATE "expressions.evaluate"
+#define ZBX_PROTO_VALUE_PROXY_UPLOAD_ENABLED "enabled"
+#define ZBX_PROTO_VALUE_PROXY_UPLOAD_DISABLED "disabled"
+
typedef enum
{
ZBX_JSON_TYPE_UNKNOWN = 0,
diff --git a/include/zbxserver.h b/include/zbxserver.h
index 33e350977e9..4db94678138 100644
--- a/include/zbxserver.h
+++ b/include/zbxserver.h
@@ -51,6 +51,8 @@
#define MACRO_TYPE_EVENT_NAME 0x02000000 /* event name in trigger configuration */
#define MACRO_TYPE_EXPRESSION 0x04000000 /* macros in expression macro */
#define MACRO_TYPE_SCRIPT_PARAMS_FIELD 0x08000000
+#define MACRO_TYPE_SCRIPT_NORMAL 0x10000000
+#define MACRO_TYPE_SCRIPT_RECOVERY 0x20000000
#define MACRO_EXPAND_NO 0
#define MACRO_EXPAND_YES 1
@@ -63,15 +65,15 @@ void get_functionids(zbx_vector_uint64_t *functionids, const char *expression);
int evaluate_function(char **value, DC_ITEM *item, const char *function, const char *parameter,
const zbx_timespec_t *ts, char **error);
-int substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event,
- zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item,
- DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type, char *error,
- int maxerrlen);
+int substitute_simple_macros(const zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event,
+ const zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item,
+ const DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type,
+ char *error, int maxerrlen);
-int substitute_simple_macros_unmasked(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event,
- zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item,
- DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type, char *error,
- int maxerrlen);
+int substitute_simple_macros_unmasked(const zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event,
+ const zbx_uint64_t *userid, const zbx_uint64_t *hostid, const DC_HOST *dc_host, const DC_ITEM *dc_item,
+ const DB_ALERT *alert, const DB_ACKNOWLEDGE *ack, const char *tz, char **data, int macro_type,
+ char *error, int maxerrlen);
void evaluate_expressions(zbx_vector_ptr_t *triggers);