diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2022-03-10 16:15:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 16:15:08 +0100 |
commit | 4116afa0756f0c9bb7fad8ffa4a0a2b449ce9875 (patch) | |
tree | bfc03a2de72b1175c6ffd2a33c831987fc30595c | |
parent | 026a875146fccfa79cf5a72f692693feef7e708e (diff) |
minor - fix analytics_build_info (#12354)
-rw-r--r-- | daemon/buildinfo.c | 135 |
1 files changed, 99 insertions, 36 deletions
diff --git a/daemon/buildinfo.c b/daemon/buildinfo.c index 88593d9978..86c586afcb 100644 --- a/daemon/buildinfo.c +++ b/daemon/buildinfo.c @@ -367,41 +367,104 @@ void print_build_info_json(void) { printf("}\n"); }; -//return a list of enabled features for use in analytics -//find a way to have proper | +#define add_to_bi(buffer, str) \ + { if(first) { \ + buffer_strcat (b, str); \ + first = 0; \ + } else \ + buffer_strcat (b, "|" str); } + void analytics_build_info(BUFFER *b) { - if(FEAT_DBENGINE) buffer_strcat (b, "dbengine"); - if(FEAT_NATIVE_HTTPS) buffer_strcat (b, "|Native HTTPS"); - if(FEAT_CLOUD) buffer_strcat (b, "|Netdata Cloud"); - if(FEAT_CLOUD) buffer_strcat (b, "|ACLK Next Generation"); - if(NEW_CLOUD_PROTO) buffer_strcat (b, "|New Cloud Protocol Support"); - if(FEAT_TLS_HOST_VERIFY) buffer_strcat (b, "|TLS Host Verification"); - if(FEAT_ML) buffer_strcat (b, "|Machine Learning"); - if(FEAT_STREAM_COMPRESSION) buffer_strcat (b, "|Stream Compression"); - - if(FEAT_PROTOBUF) buffer_strcat (b, "|protobuf"); - if(FEAT_JEMALLOC) buffer_strcat (b, "|jemalloc"); - if(FEAT_JSONC) buffer_strcat (b, "|JSON-C"); - if(FEAT_LIBCAP) buffer_strcat (b, "|libcap"); - if(FEAT_CRYPTO) buffer_strcat (b, "|libcrypto"); - if(FEAT_LIBM) buffer_strcat (b, "|libm"); - - if(FEAT_TCMALLOC) buffer_strcat(b, "|tcalloc"); - if(FEAT_ZLIB) buffer_strcat(b, "|zlib"); - - if(FEAT_APPS_PLUGIN) buffer_strcat(b, "|apps"); - if(FEAT_CGROUP_NET) buffer_strcat(b, "|cgroup Network Tracking"); - if(FEAT_CUPS) buffer_strcat(b, "|CUPS"); - if(FEAT_EBPF) buffer_strcat(b, "|EBPF"); - if(FEAT_IPMI) buffer_strcat(b, "|IPMI"); - if(FEAT_NFACCT) buffer_strcat(b, "|NFACCT"); - if(FEAT_PERF) buffer_strcat(b, "|perf"); - if(FEAT_SLABINFO) buffer_strcat(b, "|slabinfo"); - if(FEAT_XEN) buffer_strcat(b, "|Xen"); - if(FEAT_XEN_VBD_ERROR) buffer_strcat(b, "|Xen VBD Error Tracking"); - - if(FEAT_KINESIS) buffer_strcat(b, "|AWS Kinesis"); - if(FEAT_PUBSUB) buffer_strcat(b, "|GCP PubSub"); - if(FEAT_MONGO) buffer_strcat(b, "|MongoDB"); - if(FEAT_REMOTE_WRITE) buffer_strcat(b, "|Prometheus Remote Write"); + int first = 1; +#ifdef ENABLE_DBENGINE + add_to_bi(b, "dbengine"); +#endif +#ifdef ENABLE_HTTPS + add_to_bi(b, "Native HTTPS"); +#endif +#ifdef ENABLE_ACLK + add_to_bi(b, "Netdata Cloud|ACLK Next Generation"); +#endif +#ifdef ENABLE_NEW_CLOUD_PROTOCOL + add_to_bi(b, "New Cloud Protocol Support"); +#endif +#if (FEAT_TLS_HOST_VERIFY!=0) + add_to_bi(b, "TLS Host Verification"); +#endif +#ifdef ENABLE_ML + add_to_bi(b, "Machine Learning"); +#endif +#ifdef ENABLE_COMPRESSION + add_to_bi(b, "Stream Compression"); +#endif + +#ifdef HAVE_PROTOBUF + add_to_bi(b, "protobuf"); +#endif +#ifdef ENABLE_JEMALLOC + add_to_bi(b, "jemalloc"); +#endif +#ifdef ENABLE_JSONC + add_to_bi(b, "JSON-C"); +#endif +#ifdef HAVE_CAPABILITY + add_to_bi(b, "libcap"); +#endif +#ifdef HAVE_CRYPTO + add_to_bi(b, "libcrypto"); +#endif +#ifdef STORAGE_WITH_MATH + add_to_bi(b, "libm"); +#endif + +#ifdef ENABLE_TCMALLOC + add_to_bi(b, "tcalloc"); +#endif +#ifdef NETDATA_WITH_ZLIB + add_to_bi(b, "zlib"); +#endif + +#ifdef ENABLE_APPS_PLUGIN + add_to_bi(b, "apps"); +#endif +#ifdef HAVE_SETNS + add_to_bi(b, "cgroup Network Tracking"); +#endif +#ifdef HAVE_CUPS + add_to_bi(b, "CUPS"); +#endif +#ifdef HAVE_LIBBPF + add_to_bi(b, "EBPF"); +#endif +#ifdef HAVE_FREEIPMI + add_to_bi(b, "IPMI"); +#endif +#ifdef HAVE_NFACCT + add_to_bi(b, "NFACCT"); +#endif +#ifdef ENABLE_PERF_PLUGIN + add_to_bi(b, "perf"); +#endif +#ifdef ENABLE_SLABINFO + add_to_bi(b, "slabinfo"); +#endif +#ifdef HAVE_LIBXENSTAT + add_to_bi(b, "Xen"); +#endif +#ifdef HAVE_XENSTAT_VBD_ERROR + add_to_bi(b, "Xen VBD Error Tracking"); +#endif + +#ifdef HAVE_KINESIS + add_to_bi(b, "AWS Kinesis"); +#endif +#ifdef ENABLE_EXPORTING_PUBSUB + add_to_bi(b, "GCP PubSub"); +#endif +#ifdef HAVE_MONGOC + add_to_bi(b, "MongoDB"); +#endif +#ifdef ENABLE_PROMETHEUS_REMOTE_WRITE + add_to_bi(b, "Prometheus Remote Write"); +#endif } |