mirror of
https://github.com/netdata/netdata.git
synced 2025-04-07 14:55:41 +00:00

* split claiming into multiple files; WIP claiming with api * pidfile is now dynamically allocated * netdata_exe_path is now dynamically allocated * remove ENABLE_CLOUD and ENABLE_ACLK * fix compilation * remove ENABLE_HTTPS and ENABLE_OPENSSL * remove the ability to disable cloud * remove netdata_cloud_enabled variable; split rooms into a json array * global libcurl initialization * detect common claiming errors * more common claiming errors * finished claiming via API * same as before * same as before * remove the old claiming logic that runs the claim script * working claim.conf * cleanup * fix log message; default proxy is env * fix log message * remove netdata-claim.sh from run.sh * remove netdata-claim.sh from everywhere, except kickstart scripts * create cloud.d if it does not exist. * better error handling and logging * handle proxy disable * merged master * fix cmakelists for new files * left-overs removal * Include libcurl in required dependencies. * Fix typo in dependency script. * Use pkg-config for finding cURL. This properly handles transitive dependencies, unlike the FindCURL module. * netdata installer writes claiming info to /etc/netdata/claim.conf * remove claim from netdata * add libcurl to windows packages * add libcurl to windows packages * compile-on-windows.sh installs too * add NODE_ID streaming back to child and INDIRECT cloud status * log child kill on windows * fixes for spawn server on windows to ensure we have a valid pid and the process is properly terminated * better handling to windows processes exit code * pass the cloud url from parents to children * add retries and timeout to claiming curl request * remove FILE * from plugins.d * spawn-tester to unittest spawning processes communication * spawn-tester now tests FILE pointer I/O * external plugins run in posix mode * set blocking I/O on all pipes * working spawn server on windows * latest changes in spawn_popen applied to linux tools * push environment * repeated tests of fds * export variable CYGWIN_BASE_PATH * renamed to NETDATA_CYGWIN_BASE_PATH * added cmd and help to adapt the command and the information to be presented to users during claiming * split spawn server versions into files * restored spawn server libuv based * working libuv based spawn server * fixes in libuv for windows * working spawn server based on posix_spawn() * fix fd leads on all spawn servers * fixed windows spawn server * fix signal handling to ensure proper cooperation with libuv * switched windows to posix_spawn() based spawn server * improvement on libuv version * callocz() event loop * simplification of libuv spawn server * minor fixes in libuv and spawn tester * api split into parts and separated by version; introduced /api/v3; no changes to old /api/v1 and /api/v2 * completed APIs splitting * function renames * remove dead code * split basic functions into a directory * execute external plugins in nofork spawn server with posix_spawn() for improved performance * reset signals when using posix_spawn() * fix spawn server logs and log cmdline in posix server * bearer_get_token() implemented as function * agent cloud status now exposes parent claim_id in indirect mode * fixes for node id streaming from parent to children * extract claimed id to separate file * claim_id is no longer in host structure; there is a global claim_id for this agent and there are parent and origin claim ids in host structure * fix issue on older compilers * implement /api/v3 using calls from v1 and v2 * prevent asan leaks on local-sockets callback * codacy fixes * moved claim web api to web/api/v2 * when the agent is offline, prefer indirect connection when available; log a warning when a node changes node id * improve inheritance of claim id from parent * claim_id for bearer token show match any of the claim ids known * aclk_connected replaced with functions * aclk api can now be limited to node information, implementing [cloud].scope = license manager * comment out most options in stream.conf so that internal defaults will be applied * respect negative matches for send charts matching * hidden functions are not accessible via the API; bearer_get_token function checks the request is coming from Netdata Cloud * /api/v3/settings API * added error logs to settings api * saving and loading of bearer tokens * Fix parameter when calling send_to_plugin * Prevent overflow * expose struct parser and typedef PARSER to enforce strict type checking on send_to_plugin() * ensure the parser will not go away randomly from the receiver - it is now cleared when the receiver lock is acquired; also ensure the output sockets are set in the parser as long as the parser runs * Add newline * Send parent claim id downstream * do not send anything when nodeid is zero * code re-organization and cleanup * add aclk capabilities, nodes summary and api version and protection to /api/v2,3/info * added /api/v3/me which returns information about the current user * make /api/v3/info accessible always * Partially revert "remove netdata-claim.sh from everywhere, except kickstart scripts" Due to how we handle files in our static builds and local builds, we actually need to continue installing `netdata-claim.sh` to enable a seamless transition to the new claiming mechanims without breaking compatibility with existing installs or existing automation tooling that is directly invoking the claiming script. The script itself will be rewritten in a subsequent commit to simply wrap the new claiming methodology, together with some additional changes to ensure that a warning is issued if the script is invoked by anything other than the kickstart script. * Rewrite claiming script to use new claiming method. * Revert "netdata installer writes claiming info to /etc/netdata/claim.conf" Same reasoning as for 2e27bedb3fbf9df523bff407f2e8c8428e350e38. We need to keep the old claiming support code in the kickstart script for the forseeable future so that existing installs can still be claimed, since the kickstart script is _NOT_ versioned with the agent. A later commit will add native support for the new claiming method and use that in preference to the claiming script if it appears to be available. * Add support for new claiming method to kickstart.sh. This adds native support to the kickstart script to use the new claiming method without depending on the claiming script, as well as adding a few extra tweaks to the claiming script to enable it to better handle the transition. Expected behavior is for the kickstart script to use the new claiming code path if the claiming script is either not installed, or does not contain the specific string `%%NEW_CLAIMING_METHOD%%`. This way we will skip the claiming script on systems which have the updated copy that uses the new claiming approach, which should keep kickstart behavior consistent with what Netdata itself supports. * Depend on JSON-C 0.14 as a minimum supported version. Needed for uint64 functions. * Fix claiming option validation in kickstart script. * do not cache auth in web client * reuse bearer tokens when the request to create one matches an existing * dictionaries dfe loops now allow using return statement * bearer token files are now fixed for specific agents by having the machine guid of the agent in them * systemd journal now respects facets and disables the default facets when not given * fixed commands.c * restored log for not openning config file * Fix Netdata group templating for claiming script. * Warn on failed templating in claiming script. * Make `--require-cloud` a slient no-op. We don’t need to warn users that it does nothing, we should just have ti do nothing. * added debugging info to claiming * log also the response * do not send double / at the url * properly remove keyword from parameters * disable debug during claimming * fix log messages * Update packaging/installer/kickstart.sh * Update packaging/installer/kickstart.sh * implemented POST request payload parsing for systemd-journal * added missing reset of facets in json parsing * JSON payload does not need hashes any more. I can accept the raw values --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud> Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
190 lines
5.1 KiB
C
190 lines
5.1 KiB
C
/* This file was generated by CMAKE from config.cmake.h.in */
|
|
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
|
|
#define __always_unused __attribute__((unused))
|
|
#define __maybe_unused __attribute__((unused))
|
|
|
|
#cmakedefine SIZEOF_VOID_P ${SIZEOF_VOID_P}
|
|
|
|
// platform
|
|
#cmakedefine OS_FREEBSD
|
|
#cmakedefine OS_LINUX
|
|
#cmakedefine OS_MACOS
|
|
#cmakedefine OS_WINDOWS
|
|
|
|
// checked headers
|
|
|
|
#cmakedefine HAVE_NETINET_IN_H
|
|
#cmakedefine HAVE_RESOLV_H
|
|
#cmakedefine HAVE_NETDB_H
|
|
#cmakedefine HAVE_SYS_PRCTL_H
|
|
#cmakedefine HAVE_SYS_STAT_H
|
|
#cmakedefine HAVE_SYS_VFS_H
|
|
#cmakedefine HAVE_SYS_STATFS_H
|
|
#cmakedefine HAVE_LINUX_MAGIC_H
|
|
#cmakedefine HAVE_SYS_MOUNT_H
|
|
#cmakedefine HAVE_SYS_STATVFS_H
|
|
#cmakedefine HAVE_INTTYPES_H
|
|
#cmakedefine HAVE_STDINT_H
|
|
#cmakedefine HAVE_SYS_CAPABILITY_H
|
|
#cmakedefine HAVE_ARPA_INET_H
|
|
#cmakedefine HAVE_NETINET_TCP_H
|
|
#cmakedefine HAVE_SYS_IOCTL_H
|
|
#cmakedefine HAVE_GRP_H
|
|
#cmakedefine HAVE_PWD_H
|
|
#cmakedefine HAVE_NET_IF_H
|
|
#cmakedefine HAVE_POLL_H
|
|
#cmakedefine HAVE_SYSLOG_H
|
|
#cmakedefine HAVE_SYS_MMAN_H
|
|
#cmakedefine HAVE_SYS_RESOURCE_H
|
|
#cmakedefine HAVE_SYS_SOCKET_H
|
|
#cmakedefine HAVE_SYS_WAIT_H
|
|
#cmakedefine HAVE_SYS_UN_H
|
|
#cmakedefine HAVE_SPAWN_H
|
|
|
|
#cmakedefine HAVE_CAPABILITY
|
|
#cmakedefine HAVE_PROTOBUF
|
|
#cmakedefine BUNDLED_PROTOBUF
|
|
#cmakedefine HAVE_MONGOC
|
|
#cmakedefine HAVE_LIBDATACHANNEL
|
|
|
|
// checked symbols
|
|
|
|
#cmakedefine MAJOR_IN_SYSMACROS
|
|
#cmakedefine MAJOR_IN_MKDEV
|
|
#cmakedefine HAVE_CLOCK_GETTIME
|
|
#cmakedefine HAVE_STRERROR_R
|
|
#cmakedefine HAVE_FINITE
|
|
#cmakedefine HAVE_ISFINITE
|
|
#cmakedefine HAVE_RECVMMSG
|
|
#cmakedefine HAVE_PTHREAD_GETTHREADID_NP
|
|
#cmakedefine HAVE_PTHREAD_THREADID_NP
|
|
#cmakedefine HAVE_GETTID
|
|
#cmakedefine HAVE_WAITID
|
|
#cmakedefine HAVE_NICE
|
|
#cmakedefine HAVE_GETPRIORITY
|
|
#cmakedefine HAVE_SETENV
|
|
#cmakedefine HAVE_DLSYM
|
|
#cmakedefine HAVE_LIBCURL
|
|
|
|
#cmakedefine HAVE_BACKTRACE
|
|
#cmakedefine HAVE_CLOSE_RANGE
|
|
#cmakedefine HAVE_SCHED_GETSCHEDULER
|
|
#cmakedefine HAVE_SCHED_SETSCHEDULER
|
|
#cmakedefine HAVE_SCHED_GET_PRIORITY_MIN
|
|
#cmakedefine HAVE_SCHED_GET_PRIORITY_MAX
|
|
|
|
#cmakedefine HAVE_SYSTEMD
|
|
#cmakedefine HAVE_SD_JOURNAL_OS_ROOT
|
|
#cmakedefine HAVE_SD_JOURNAL_OPEN_FILES_FD
|
|
#cmakedefine HAVE_SD_JOURNAL_RESTART_FIELDS
|
|
#cmakedefine HAVE_SD_JOURNAL_GET_SEQNUM
|
|
#cmakedefine ENABLE_SYSTEMD_DBUS
|
|
|
|
// checked source compilation
|
|
|
|
#cmakedefine HAVE_PTHREAD_GETNAME_NP
|
|
#cmakedefine HAVE_ACCEPT4
|
|
#cmakedefine STRERROR_R_CHAR_P
|
|
#cmakedefine HAVE_C__GENERIC
|
|
#cmakedefine HAVE_C_MALLOPT
|
|
#cmakedefine HAVE_SETNS
|
|
#cmakedefine HAVE_STRNDUP
|
|
#cmakedefine SSL_HAS_PENDING
|
|
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_FORMAT_GNU_PRINTF
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_FORMAT_PRINTF
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_MALLOC
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_NOINLINE
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_NORETURN
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
|
|
#cmakedefine HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT
|
|
|
|
// enabled features
|
|
|
|
#cmakedefine ENABLE_ML
|
|
#cmakedefine ENABLE_EXPORTING_MONGODB
|
|
#cmakedefine ENABLE_H2O
|
|
#cmakedefine ENABLE_DBENGINE
|
|
#cmakedefine ENABLE_LZ4
|
|
#cmakedefine ENABLE_ZSTD
|
|
#cmakedefine ENABLE_BROTLI
|
|
|
|
#cmakedefine ENABLE_LOGSMANAGEMENT
|
|
#cmakedefine ENABLE_LOGSMANAGEMENT_TESTS
|
|
#cmakedefine ENABLE_PROMETHEUS_REMOTE_WRITE
|
|
|
|
// enabled plugins
|
|
|
|
#cmakedefine ENABLE_PLUGIN_DEBUGFS
|
|
#cmakedefine ENABLE_PLUGIN_APPS
|
|
#cmakedefine ENABLE_PLUGIN_FREEIPMI
|
|
#cmakedefine ENABLE_PLUGIN_NFACCT
|
|
#cmakedefine ENABLE_PLUGIN_XENSTAT
|
|
#cmakedefine ENABLE_PLUGIN_PERF
|
|
#cmakedefine ENABLE_PLUGIN_SLABINFO
|
|
#cmakedefine ENABLE_PLUGIN_CUPS
|
|
#cmakedefine ENABLE_PLUGIN_CGROUP_NETWORK
|
|
#cmakedefine ENABLE_PLUGIN_EBPF
|
|
|
|
// enabled sentry
|
|
|
|
#cmakedefine ENABLE_SENTRY
|
|
#cmakedefine NETDATA_SENTRY_ENVIRONMENT "@NETDATA_SENTRY_ENVIRONMENT@"
|
|
#cmakedefine NETDATA_SENTRY_DIST "@NETDATA_SENTRY_DIST@"
|
|
#cmakedefine NETDATA_SENTRY_DSN "@NETDATA_SENTRY_DSN@"
|
|
// enabled bundling
|
|
|
|
#cmakedefine ENABLE_BUNDLED_JSONC
|
|
#cmakedefine ENABLE_BUNDLED_YAML
|
|
#cmakedefine ENABLE_BUNDLED_PROTOBUF
|
|
|
|
// directory paths
|
|
|
|
#cmakedefine CACHE_DIR "@CACHE_DIR@"
|
|
#cmakedefine CONFIG_DIR "@CONFIG_DIR@"
|
|
#cmakedefine LIBCONFIG_DIR "@LIBCONFIG_DIR@"
|
|
#cmakedefine LOG_DIR "@LOG_DIR@"
|
|
#cmakedefine PLUGINS_DIR "@PLUGINS_DIR@"
|
|
#cmakedefine WEB_DIR "@WEB_DIR@"
|
|
#cmakedefine VARLIB_DIR "@VARLIB_DIR@"
|
|
|
|
// config command, user and version
|
|
|
|
#cmakedefine CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
|
|
#cmakedefine NETDATA_USER "@NETDATA_USER@"
|
|
|
|
#define NETDATA_VERSION_MAJOR "@NETDATA_VERSION_MAJOR@"
|
|
#define NETDATA_VERSION_MINOR "@NETDATA_VERSION_MINOR@"
|
|
#define NETDATA_VERSION_PATCH "@NETDATA_VERSION_PATCH@"
|
|
#define NETDATA_VERSION_TWEAK "@NETDATA_VERSION_TWEAK@"
|
|
#define NETDATA_VERSION_DESCR "@NETDATA_VERSION_DESCR@"
|
|
|
|
#define NETDATA_VERSION "@NETDATA_VERSION_STRING@"
|
|
|
|
#define ENABLE_JSONC 1
|
|
|
|
#cmakedefine HAVE_LIBYAML
|
|
#cmakedefine HAVE_LIBMNL
|
|
|
|
// /* Enable GNU extensions on systems that have them. */
|
|
// #ifndef _GNU_SOURCE
|
|
// # define _GNU_SOURCE 1
|
|
// #endif
|
|
|
|
// #cmakedefine HAVE_CRYPTO
|
|
|
|
// #cmakedefine ENABLE_PROMETHEUS_REMOTE_WRITE
|
|
|
|
// /* NSA spy stuff */
|
|
// #cmakedefine01 HAVE_X509_VERIFY_PARAM_set1_host
|
|
|
|
#define HAVE_CRYPTO
|
|
#define HAVE_X509_VERIFY_PARAM_set1_host 1
|
|
|
|
/* Enable GNU extensions on systems that have them. */
|
|
#ifndef _GNU_SOURCE
|
|
#define _GNU_SOURCE 1
|
|
#endif
|