summaryrefslogtreecommitdiffstats
path: root/collectors
AgeCommit message (Collapse)Author
2024-01-23DYNCFG: dynamically configured alerts (#16779)Costa Tsaousis
* cleanup alerts * fix references * fix references * fix references * load alerts once and apply them to each node * simplify health_create_alarm_entry() * Compile without warnings with compiler flags: -Wall -Wextra -Wformat=2 -Wshadow -Wno-format-nonliteral -Winit-self * code re-organization and cleanup * generate patterns when applying prototypes; give unique dyncfg names to all alerts * eval expressions keep the source and the parsed_as as STRING pointers * renamed host to node in dyncfg ids * renamed host to node in dyncfg ids * add all cloud roles to the list of parsed X-Netdata-Role header and also default to member access level * working functionality * code re-organization: moved health event-loop to a new file, moved health globals to health.c * rrdcalctemplate is removed; alert_cfg is removed; foreach dimension is removed; RRDCALCs are now instanciated only when they are linked to RRDSETs * dyncfg alert prototypes initialization for alerts * health dyncfg split to separate file * cleanup not-needed code * normalize matches between parsing and json * also detect !* for disabled alerts * dyncfg capability disabled * Store alert config part1 * Add rrdlabels_common_count * wip health variables lookup without indexes * Improve rrdlabels_common_count by reusing rrdlabels_find_label_with_key_unsafe with an additional parameter * working variables with runtime lookup * working variables with runtime lookup * delete rrddimvar and rrdfamily index * remove rrdsetvar; now all variables are in RRDVARs inside hosts and charts * added /api/v1/variable that resolves a variable the same way alerts do * remove rrdcalc from eval * remove debug code * remove duplicate assignment * Fix memory leak * all alert variables are now handled by alert_variable_lookup() and EVAL is now independent of alerts * hide all internal structures of EVAL * Enable -Wformat flag Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> * Adjust binding for calculation, warning, critical * Remove unused macro * Update config hash id * use the right info and summary in alerts log * use synchronous queries for alerts * Handle cases when config_hash_id is missing from health_log * remove deadlock from health worker * parsing to json payload for health alert prototypes * cleaner parsing and avoiding memory leaks in case of duplicate members in json * fix left-over rename of function * Keep original lookup field to send to the cloud Cleanup / rename function to store config Remove unused DEFINEs, functions * Use ac->lookup * link jobs to the host when the template is registered; do not accept running a function without a host * full dyncfg support for health alerts, except action TEST * working dyncfg additions, updates, removals * fixed missing source, wrong status updates * add alerts by type, component, classification, recipient and module at the /api/v2/alerts endpoint * fix dyncfg unittest * rename functions * generalize the json-c parser macros and move them to libnetdata * report progress when enabling and disabling dyncfg templates * moved rrdcalc and rrdvar to health * update alarms * added schema for alerts; separated alert_action_options from rrdr_options; restructured the json payload for alerts * enable parsed json alerts; allow sending back accepted but disabled * added format_version for alerts payload; enables/disables status now is also inheritted by the status of the rules; fixed variable names in json output * remove the RRDHOST pointer from DYNCFG * Fix command field submitted to the cloud * do not send updates to creation requests, for DYNCFG jobs --------- Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Co-authored-by: Tasos Katsoulas <tasos@netdata.cloud> Co-authored-by: ilyam8 <ilya@netdata.cloud>
2024-01-20fix verify_netdata_host_prefix log spam (#16814)Ilya Mashchenko
2024-01-19set app_group label automatically (#16810)boxjan
2024-01-17cgroups: containers-vms add CPU throttling % (#16800)Ilya Mashchenko
2024-01-17Update binaries (eBPF) (#16671)thiagoftsm
2024-01-16Use named constants for keyword tokens. (#16787)vkalintiris
* name integer constants in keyword switch. * Update gperf config. - Use initializer suffix to silence warnings when enabling all warnings. - Mark the generated table as const * Fix pointer to bool conversion warwning ``` collectors/plugins.d/pluginsd_parser.c:798:37: warning: address of 'parser->user' will always evaluate to 'true' [-Wpointer-bool-conversion] _Bool can_copy = ((&parser->user) && ((&parser->user)->capabilities & (STREAM_CAP_IEEE754)) == (STREAM_CAP_IEEE754)) == ((&parser->user.v2.stream_buffer) && ((&parser->user.v2.stream_buffer)->capabilities & (STREAM_CAP_IEEE754)) == (STREAM_CAP_IEEE754)); ~~~~~~~~^~~~ ~~ ``` * Revert "Fix pointer to bool conversion warwning" This reverts commit 01171d03126411999764196986ffbf163a7df1f3. * Return parser error when handling an unknown keyword.
2024-01-15Free key and search, replace patterns (#16789)Stelios Fragkakis
Free key and search pattern
2024-01-14diskspace: reworked the cleanup to fix race conditions (#16786)Costa Tsaousis
reworked the cleanup to fix race conditions
2024-01-14diskspace missing mutex use (#16784)Costa Tsaousis
2024-01-13Fix warning. (#16774)vkalintiris
> warning: variable 'm' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
2024-01-12fix thread name on fatal and cgroup netdev rename crash (#16771)Costa Tsaousis
* fix thread name on fatal * fix cgroup missing reference counter dup
2024-01-12Add missing call for aral_freez (eBPF) (#16765)thiagoftsm
fix_missing_aral: Add missing call
2024-01-11Delete memory mode "map" and "save". (#16604)vkalintiris
* Delete memory modes "map" and "save". * Remove unmaintained exporting tests * Remove references of map/save modes in docs. * Remove more references to map/save from docs.
2024-01-11add schemas to /usr/lib/netdata/conf.d/schema.d (#16757)Costa Tsaousis
2024-01-11dyncfg v2 (#16702)Costa Tsaousis
* split rrdfunctions streaming and progress * simplified internal inline functions API * split rrdfunctions inflight management * split rrd functions exporters * renames * base dyncfg structure * config pluginsd * intercept dyncfg function calls * loading and saving of dyncfg metadata and data * save metadata and payload to a single file; added code to update the plugins with jobs and saved configs * basic working unit test * added payload to functions execution * removed old dyncfg code that is not needed any more * more cleanup * cleanup sender for functions with payload * dyncfg functions are not exposed as functions * remaining work to avoid indexing the \0 terminating character in dictionary keys * added back old dyncfg plugins.d commands as noop, to allow plugins continue working * working api; working streaming; * updated plugins.d documentation * aclk and http api requests share the same header parsing logic * added source type internal * fixed crashes * added god mode for tests * fixes * fixed messages * save host machine guids to configs * cleaner manipulation of supported commands * the functions event loop for external plugins can now process dyncfg requests * unified internal and external plugins dyncfg API * Netdata serves schema requests from /etc/netdata/schema.d and /var/lib/netdata/conf.d/schema.d * cleanup and various fixes; fixed bug in previous dyncfg implementation on streaming that was sending the paylod in a way that allowed other streaming commands to be multiplexed * internals go to a separate header file * fix duplicate ACLK requests sent by aclk queue mechanism * use fstat instead of stat * working api * plugin actions renamed to create and delete; dyncfg files are removed only from user actions * prevent deadlock by using the react callback * fix for string_strndupz() * better dyncfg unittests * more tests at the unittests * properly detect dyncfg functions * hide config functions from the UI * tree response improvements * send the initial update with payload * determine tty using stdout, not stderr * changes to statuses, cleanup and the code to bring all business logic into interception * do not crash when the status is empty * functions now propagate the source of the requests to plugins * avoid warning about unused functions * in the count at items for attention, do not count the orphan entries * save source into dyncfg * make the list null terminated * fixed invalid comparison * prevent memory leak on duplicated headers; log x-forwarded-for * more unit tests * added dyncfg unittests into the default unittests * more unit tests and fixes * more unit tests and fixes * fix dictionary unittests * config functions require admin access
2024-01-11fix cpu per core charts priority (#16749)Ilya Mashchenko
2024-01-10cleanup proc net-dev renames (#16745)Costa Tsaousis
* cleanup proc net-dev renames * more cleanup * remove unused variable * fix memory leak in pluginsd parser * fix double-free
2024-01-06fix missing CPU frequency (#16732)Ilya Mashchenko
2024-01-05fix excessive "maximum number of cgroups reached" log messages (#16730)Ilya Mashchenko
2024-01-04cgroups: don't multiply cgroup_check_for_new_every by update_every (#16719)Ilya Mashchenko
2024-01-04update ebpf-socket function name and columns (#16727)Ilya Mashchenko
improve ebpf-socket function
2023-12-29delay collecting double linked network interfaces (#16701)Ilya Mashchenko
2023-12-29cups exit on sigpipe (#16691)Ilya Mashchenko
2023-12-29cmake log2journal netdatacli (#16688)Costa Tsaousis
* log2journal should not be linked against libnetdata; netdatacli is now linked against libnetdata so it does not need to redefine functions in libnetdata * reformatting for smaller width
2023-12-28cmake missing defines (#16680)Costa Tsaousis
* added HAVE_ACCEPT4 * added HAVE_FINITE, HAVE_ISFINITE * added SIZEOF_VOID_P * added HAVE_NICE, HAVE_RECVMMSG, HAVE_GETPRIORITY * added HAVE_C__GENERIC * added HAVE_C_MALLOPT * added HAVE_BACKTRACE, HAVE_CLOSE_RANGE, HAVE_SCHED_GETSCHEDULER, HAVE_SCHED_SETSCHEDULER, HAVE_SCHED_GET_PRIORITY_MIN, HAVE_SCHED_GET_PRIORITY_MAX * added HAVE_DLSYM * added function attributes checks * fix SIZEOF_VOID_P * added HAVE_PTHREAD_GETNAME_NP * fixed compiler warnings
2023-12-27eBPF socket (eBPF) (#16669)thiagoftsm
2023-12-27Fix coverity issues (#16655)Stelios Fragkakis
2023-12-24fix compiler warnings (#16665)Costa Tsaousis
fix compiler warning when compiled without internal checks
2023-12-21increase max response size to 100MiB (#16649)Costa Tsaousis
* increase max response size to 100MiB * do not check the uncompressed message size on aclk
2023-12-20docs: add "Rootless mode" to Docker install guide (#16632)Ilya Mashchenko
* cgroups: update default filter to allow docker rootless containers * add Rootless mode to docker readme
2023-12-19Fix UB of unaligned loads/stores and signed shifts. (#16628)vkalintiris
* Ignore build/ dir. This directory is the default dir for many LSPs and for IDES using cmake. "Reserve" it by ignoring it in .gitignore. * Fix format specifier. * Use unsigned literals when shifting. * Do not sanitize shifts in libjudy. * Fix unaligned loads/stores of dbengine's CRCs * Fix unaligned load when partitioning metrics. * Use unsigned literals when shifting.
2023-12-18Remove includes outside of libnetdata. (#16607)vkalintiris
* Remove includes outside of libnetdata. libnetdata ended up using the header daemon/main.h. This commit tries to resolve this issue by: - Moving the thread tags under libnetdata/threads/threads.h - Dropping the definition of `send_analytics` from libnetdata/ and, thus, the requirement for an extra dummy function. - Adding a new analytics_statistic_send() function. - Changing netdata_cleanup_and_exit() to accept the raw parts of an analytics statistic. After this whole ordeal, only the declaration of netdata_cleanup_and_exit() is required from libnetdata/ * Fix function hidden under NETDATA_INTERNAL_CHECKS * Fix field access. Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> * s/action_data/data/g * Fix analytics statistics for START/CRASH. * Pass all args to netdata_cleanup_and_exit in FreeBSD plugin --------- Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
2023-12-18cgroups: filter lxcfs.service/.control (#16620)Ilya Mashchenko
2023-12-15Queries Progress (#16574)Costa Tsaousis
* track the progress of queries * add query_progress in libnetdata Makefile.am * add acl, response size and response code to the tracking * define the required functions * fix the last commit * added /api/v2/progress?transaction=ID to report the progress of queries * added function to report netdata-queries * track hashtable additions * when resusing a transaction, maintain the counter * keep track of linked and indexing * added X-Forwarded-Host and X-Forwarded-For to logs. X-Forwarded-For is also added in progress tracking * report compact uuids to match logs; register the actual duration of the transaction * added rowOptions to function; now web_client keeps track if it tracks progress or not * add http request method to progress * add tags per function; /api/vX/functions is now not protected * compact the sanitization array * split pluginsd_parser into multiple files * cleanup keyword definitions * code cleanup * extracted rrd_collector to separate files * added http access level to functions * renamed access "all" to "any" * implemented optional protection on functions * add priority to functions, to allow the UI select the best function (lower priority) when the user has not selected a function * added progress report from the plugins to netdata and from children to parents - untested * added progress reporting in systemd-journal * query timeout is now handled by evloop for external plugins * propagate progress reports to children and plugins * fix codeql warning * adapt to cmake * minor changes * extend function timeout when progress is received; added streaming capability to propagate progress reports to parents and send progress requests to children * revert change in dictionary.h * add log when access level is invalid * update access level of functions * added logs when processing progress updates * log when the deferred response is too big * comment out sender progress to find the issue * added missing newline in streaming progress reports * propogate progress reports to functions * fix logs
2023-12-15ndsudo - a helper to run privileged commands (#16614)Costa Tsaousis
* ndsudo command * added help * make ndsudo setuid to root * fix megacli binary name on FreeBSD * move ndsudo to collectors/plugins.d/ * address PR comments * do not print the command line argument, instead print its index --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-12-14Fix coverity issues (#16596)Stelios Fragkakis
* Fix coverity issues * Prevent potential overflow
2023-12-13Cleanup am files (#16597)vkalintiris
* Remove stale automake files. * Remove .inc make files
2023-12-13CMake build system. (#15996)vkalintiris
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud> Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com> Co-authored-by: Emmanuel Vasilakis <mrzammler@mm.st> Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Co-authored-by: netdatabot <bot@netdata.cloud> Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-12-13systemd-journal: exit if unable to locate journal data directories (#16592)Ilya Mashchenko
2023-12-13disable cpu per core metrics by default (#16572)Ilya Mashchenko
2023-12-12code cleanup (#16542)Costa Tsaousis
fixed minor code cleanup warnings
2023-12-12wip documentation about functions table (#16535)Costa Tsaousis
2023-12-08make debugfs exit on sigpipe (#16569)Ilya Mashchenko
* debugfs exit on sigpipe * return 1 on sigpipe
2023-12-07Fix for AMD GPU drm different format proc file (#16561)Emmanuel Vasilakis
2023-12-07Update README.mdCosta Tsaousis
2023-12-06Regenerate integrations.js (#16536)Netdata bot
Co-authored-by: ilyam8 <ilyam8@users.noreply.github.com>
2023-12-06Update README.mdCosta Tsaousis
2023-12-06Update README.mdCosta Tsaousis
2023-12-05Proper Learn-friendly links (#16547)Fotis Voutsas
2023-12-05docs required for release (#16546)Costa Tsaousis
* improve journal plugin docs * added systemd-cat-native.md * updated log2journal docs * added screenshot to log2journal