summaryrefslogtreecommitdiffstats
path: root/src/daemon/buildinfo.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/daemon/buildinfo.c (renamed from daemon/buildinfo.c)147
1 files changed, 56 insertions, 91 deletions
diff --git a/daemon/buildinfo.c b/src/daemon/buildinfo.c
index 41af56af8..4ee5b43de 100644
--- a/daemon/buildinfo.c
+++ b/src/daemon/buildinfo.c
@@ -57,8 +57,6 @@ typedef enum __attribute__((packed)) {
BIB_DB_DBENGINE,
BIB_DB_ALLOC,
BIB_DB_RAM,
- BIB_DB_MAP,
- BIB_DB_SAVE,
BIB_DB_NONE,
BIB_CONNECTIVITY_ACLK,
BIB_CONNECTIVITY_HTTPD_STATIC,
@@ -69,17 +67,14 @@ typedef enum __attribute__((packed)) {
BIB_LIB_LZ4,
BIB_LIB_ZSTD,
BIB_LIB_ZLIB,
- BIB_LIB_JUDY,
- BIB_LIB_DLIB,
+ BIB_LIB_BROTLI,
BIB_LIB_PROTOBUF,
BIB_LIB_OPENSSL,
BIB_LIB_LIBDATACHANNEL,
BIB_LIB_JSONC,
BIB_LIB_LIBCAP,
BIB_LIB_LIBCRYPTO,
- BIB_LIB_LIBM,
- BIB_LIB_JEMALLOC,
- BIB_LIB_TCMALLOC,
+ BIB_LIB_LIBYAML,
BIB_PLUGIN_APPS,
BIB_PLUGIN_LINUX_CGROUPS,
BIB_PLUGIN_LINUX_CGROUP_NETWORK,
@@ -539,7 +534,7 @@ static struct {
.category = BIC_DATABASE,
.type = BIT_BOOLEAN,
.analytics = "dbengine",
- .print = "dbengine",
+ .print = "dbengine (compression)",
.json = "dbengine",
.value = NULL,
},
@@ -559,22 +554,6 @@ static struct {
.json = "ram",
.value = NULL,
},
- [BIB_DB_MAP] = {
- .category = BIC_DATABASE,
- .type = BIT_BOOLEAN,
- .analytics = NULL,
- .print = "map",
- .json = "map",
- .value = NULL,
- },
- [BIB_DB_SAVE] = {
- .category = BIC_DATABASE,
- .type = BIT_BOOLEAN,
- .analytics = NULL,
- .print = "save",
- .json = "save",
- .value = NULL,
- },
[BIB_DB_NONE] = {
.category = BIC_DATABASE,
.type = BIT_BOOLEAN,
@@ -655,22 +634,13 @@ static struct {
.json = "zlib",
.value = NULL,
},
- [BIB_LIB_JUDY] = {
- .category = BIC_LIBS,
- .type = BIT_BOOLEAN,
- .analytics = NULL,
- .print = "Judy (high-performance dynamic arrays and hashtables)",
- .json = "judy",
- .status = true,
- .value = "bundled",
- },
- [BIB_LIB_DLIB] = {
- .category = BIC_LIBS,
- .type = BIT_BOOLEAN,
- .analytics = NULL,
- .print = "dlib (robust machine learning toolkit)",
- .json = "dlib",
- .value = NULL,
+ [BIB_LIB_BROTLI] = {
+ .category = BIC_LIBS,
+ .type = BIT_BOOLEAN,
+ .analytics = NULL,
+ .print = "Brotli (generic-purpose lossless compression algorithm)",
+ .json = "brotli",
+ .value = NULL,
},
[BIB_LIB_PROTOBUF] = {
.category = BIC_LIBS,
@@ -720,29 +690,13 @@ static struct {
.json = "libcrypto",
.value = NULL,
},
- [BIB_LIB_LIBM] = {
- .category = BIC_LIBS,
- .type = BIT_BOOLEAN,
- .analytics = "libm",
- .print = "libm (mathematical functions)",
- .json = "libm",
- .value = NULL,
- },
- [BIB_LIB_JEMALLOC] = {
- .category = BIC_LIBS,
- .type = BIT_BOOLEAN,
- .analytics = "jemalloc",
- .print = "jemalloc",
- .json = "jemalloc",
- .value = NULL,
- },
- [BIB_LIB_TCMALLOC] = {
- .category = BIC_LIBS,
- .type = BIT_BOOLEAN,
- .analytics = "tcmalloc",
- .print = "TCMalloc",
- .json = "tcmalloc",
- .value = NULL,
+ [BIB_LIB_LIBYAML] = {
+ .category = BIC_LIBS,
+ .type = BIT_BOOLEAN,
+ .analytics = "libyaml",
+ .print = "libyaml (library for parsing and emitting YAML)",
+ .json = "libyaml",
+ .value = NULL,
},
[BIB_PLUGIN_APPS] = {
.category = BIC_PLUGINS,
@@ -1083,10 +1037,10 @@ static void build_info_set_status(BUILD_INFO_SLOT slot, bool status) {
}
__attribute__((constructor)) void initialize_build_info(void) {
- build_info_set_value(BIB_PACKAGING_NETDATA_VERSION, program_version);
+ build_info_set_value(BIB_PACKAGING_NETDATA_VERSION, NETDATA_VERSION);
build_info_set_value(BIB_PACKAGING_CONFIGURE_OPTIONS, CONFIGURE_COMMAND);
-#ifdef COMPILED_FOR_LINUX
+#ifdef OS_LINUX
build_info_set_status(BIB_FEATURE_BUILT_FOR, true);
build_info_set_value(BIB_FEATURE_BUILT_FOR, "Linux");
build_info_set_status(BIB_PLUGIN_LINUX_CGROUPS, true);
@@ -1094,16 +1048,26 @@ __attribute__((constructor)) void initialize_build_info(void) {
build_info_set_status(BIB_PLUGIN_LINUX_DISKSPACE, true);
build_info_set_status(BIB_PLUGIN_LINUX_TC, true);
#endif
-#ifdef COMPILED_FOR_FREEBSD
+#ifdef OS_FREEBSD
build_info_set_status(BIB_FEATURE_BUILT_FOR, true);
build_info_set_value(BIB_FEATURE_BUILT_FOR, "FreeBSD");
build_info_set_status(BIB_PLUGIN_FREEBSD, true);
#endif
-#ifdef COMPILED_FOR_MACOS
+#ifdef OS_MACOS
build_info_set_status(BIB_FEATURE_BUILT_FOR, true);
build_info_set_value(BIB_FEATURE_BUILT_FOR, "MacOS");
build_info_set_status(BIB_PLUGIN_MACOS, true);
#endif
+#ifdef OS_WINDOWS
+ build_info_set_status(BIB_FEATURE_BUILT_FOR, true);
+#if defined(__CYGWIN__) && defined(__MSYS__)
+ build_info_set_value(BIB_FEATURE_BUILT_FOR, "Windows (MSYS)");
+#elif defined(__CYGWIN__)
+ build_info_set_value(BIB_FEATURE_BUILT_FOR, "Windows (CYGWIN)");
+#else
+ build_info_set_value(BIB_FEATURE_BUILT_FOR, "Windows");
+#endif
+#endif
#ifdef ENABLE_ACLK
build_info_set_status(BIB_FEATURE_CLOUD, true);
@@ -1124,9 +1088,6 @@ __attribute__((constructor)) void initialize_build_info(void) {
build_info_set_status(BIB_FEATURE_STREAMING_COMPRESSION, true);
-#ifdef ENABLE_BROTLI
- build_info_append_value(BIB_FEATURE_STREAMING_COMPRESSION, "brotli");
-#endif
#ifdef ENABLE_ZSTD
build_info_append_value(BIB_FEATURE_STREAMING_COMPRESSION, "zstd");
#endif
@@ -1134,6 +1095,9 @@ __attribute__((constructor)) void initialize_build_info(void) {
build_info_append_value(BIB_FEATURE_STREAMING_COMPRESSION, "lz4");
#endif
build_info_append_value(BIB_FEATURE_STREAMING_COMPRESSION, "gzip");
+#ifdef ENABLE_BROTLI
+ build_info_append_value(BIB_FEATURE_STREAMING_COMPRESSION, "brotli");
+#endif
build_info_set_status(BIB_FEATURE_CONTEXTS, true);
build_info_set_status(BIB_FEATURE_TIERING, true);
@@ -1144,11 +1108,15 @@ __attribute__((constructor)) void initialize_build_info(void) {
#ifdef ENABLE_DBENGINE
build_info_set_status(BIB_DB_DBENGINE, true);
+#ifdef ENABLE_ZSTD
+ build_info_append_value(BIB_DB_DBENGINE, "zstd");
+#endif
+#ifdef ENABLE_LZ4
+ build_info_append_value(BIB_DB_DBENGINE, "lz4");
+#endif
#endif
build_info_set_status(BIB_DB_ALLOC, true);
build_info_set_status(BIB_DB_RAM, true);
- build_info_set_status(BIB_DB_MAP, true);
- build_info_set_status(BIB_DB_SAVE, true);
build_info_set_status(BIB_DB_NONE, true);
build_info_set_status(BIB_CONNECTIVITY_HTTPD_STATIC, true);
@@ -1171,6 +1139,9 @@ __attribute__((constructor)) void initialize_build_info(void) {
#ifdef ENABLE_ZSTD
build_info_set_status(BIB_LIB_ZSTD, true);
#endif
+#ifdef ENABLE_BROTLI
+ build_info_set_status(BIB_LIB_BROTLI, true);
+#endif
build_info_set_status(BIB_LIB_ZLIB, true);
@@ -1203,17 +1174,11 @@ __attribute__((constructor)) void initialize_build_info(void) {
#ifdef HAVE_CRYPTO
build_info_set_status(BIB_LIB_LIBCRYPTO, true);
#endif
-#ifdef STORAGE_WITH_MATH
- build_info_set_status(BIB_LIB_LIBM, true);
-#endif
-#ifdef ENABLE_JEMALLOC
- build_info_set_status(BIB_LIB_JEMALLOC, true);
-#endif
-#ifdef ENABLE_TCMALLOC
- build_info_set_status(BIB_LIB_TCMALLOC, true);
+#ifdef HAVE_LIBYAML
+ build_info_set_status(BIB_LIB_LIBYAML, true);
#endif
-#ifdef ENABLE_APPS_PLUGIN
+#ifdef ENABLE_PLUGIN_APPS
build_info_set_status(BIB_PLUGIN_APPS, true);
#endif
#ifdef HAVE_SETNS
@@ -1225,28 +1190,28 @@ __attribute__((constructor)) void initialize_build_info(void) {
build_info_set_status(BIB_PLUGIN_IDLEJITTER, true);
build_info_set_status(BIB_PLUGIN_BASH, true);
-#ifdef ENABLE_DEBUGFS_PLUGIN
+#ifdef ENABLE_PLUGIN_DEBUGFS
build_info_set_status(BIB_PLUGIN_DEBUGFS, true);
#endif
-#ifdef HAVE_CUPS
+#ifdef ENABLE_PLUGIN_CUPS
build_info_set_status(BIB_PLUGIN_CUPS, true);
#endif
-#ifdef HAVE_LIBBPF
+#ifdef ENABLE_PLUGIN_EBPF
build_info_set_status(BIB_PLUGIN_EBPF, true);
#endif
-#ifdef HAVE_FREEIPMI
+#ifdef ENABLE_PLUGIN_FREEIPMI
build_info_set_status(BIB_PLUGIN_FREEIPMI, true);
#endif
-#ifdef HAVE_NFACCT
+#ifdef ENABLE_PLUGIN_NFACCT
build_info_set_status(BIB_PLUGIN_NFACCT, true);
#endif
-#ifdef ENABLE_PERF_PLUGIN
+#ifdef ENABLE_PLUGIN_PERF
build_info_set_status(BIB_PLUGIN_PERF, true);
#endif
-#ifdef ENABLE_SLABINFO
+#ifdef ENABLE_PLUGIN_SLABINFO
build_info_set_status(BIB_PLUGIN_SLABINFO, true);
#endif
-#ifdef HAVE_LIBXENSTAT
+#ifdef ENABLE_PLUGIN_XENSTAT
build_info_set_status(BIB_PLUGIN_XEN, true);
#endif
#ifdef HAVE_XENSTAT_VBD_ERROR
@@ -1499,7 +1464,7 @@ void print_build_info(void) {
print_build_info_category_to_console(BIC_PLUGINS, "Plugins");
print_build_info_category_to_console(BIC_EXPORTERS, "Exporters");
print_build_info_category_to_console(BIC_DEBUG_DEVEL, "Debug/Developer Features");
-};
+}
void build_info_to_json_object(BUFFER *b) {
populate_packaging_info();
@@ -1533,7 +1498,7 @@ void print_build_info_json(void) {
buffer_json_finalize(b);
printf("%s\n", buffer_tostring(b));
buffer_free(b);
-};
+}
void analytics_build_info(BUFFER *b) {
populate_packaging_info();