summaryrefslogtreecommitdiffstats
path: root/aclk/aclk_api.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:11 +0000
commit483926a283e118590da3f9ecfa75a8a4d62143ce (patch)
treecb77052778df9a128a8cd3ff5bf7645322a13bc5 /aclk/aclk_api.h
parentReleasing debian version 1.31.0-4. (diff)
downloadnetdata-483926a283e118590da3f9ecfa75a8a4d62143ce.tar.xz
netdata-483926a283e118590da3f9ecfa75a8a4d62143ce.zip
Merging upstream version 1.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/aclk_api.h')
-rw-r--r--aclk/aclk_api.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/aclk/aclk_api.h b/aclk/aclk_api.h
new file mode 100644
index 00000000..9958b0e1
--- /dev/null
+++ b/aclk/aclk_api.h
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+#ifndef ACLK_API_H
+#define ACLK_API_H
+
+#include "libnetdata/libnetdata.h"
+
+#include "aclk_proxy.h"
+
+// TODO get rid global vars as soon as
+// ACLK Legacy is removed
+extern int aclk_connected;
+extern int aclk_kill_link;
+
+extern usec_t aclk_session_us;
+extern time_t aclk_session_sec;
+
+extern int aclk_disable_runtime;
+extern int aclk_disable_single_updates;
+
+extern int aclk_stats_enabled;
+extern int aclk_alert_reloaded;
+
+extern int aclk_ng;
+
+#ifdef ENABLE_ACLK
+void *aclk_starter(void *ptr);
+
+void aclk_single_update_disable();
+void aclk_single_update_enable();
+
+void aclk_alarm_reload(void);
+
+int aclk_update_chart(RRDHOST *host, char *chart_name, int create);
+int aclk_update_alarm(RRDHOST *host, ALARM_ENTRY *ae);
+
+void aclk_add_collector(RRDHOST *host, const char *plugin_name, const char *module_name);
+void aclk_del_collector(RRDHOST *host, const char *plugin_name, const char *module_name);
+
+void aclk_host_state_update(RRDHOST *host, int connect);
+
+#define NETDATA_ACLK_HOOK \
+ { .name = "ACLK_Main", \
+ .config_section = NULL, \
+ .config_name = NULL, \
+ .enabled = 1, \
+ .thread = NULL, \
+ .init_routine = NULL, \
+ .start_routine = aclk_starter },
+
+#endif
+
+struct label *add_aclk_host_labels(struct label *label);
+char *aclk_state(void);
+char *aclk_state_json(void);
+
+#endif /* ACLK_API_H */