summaryrefslogtreecommitdiffstats
path: root/libnetdata
AgeCommit message (Collapse)Author
2023-10-16disable logging to syslog by default (#16214)Ilya Mashchenko
* disable logging to syslog * set to 0 the rest of log_syslog vars
2023-10-16allow patterns in journal queries (#16210)Costa Tsaousis
2023-10-15add order in available histograms (#16204)Costa Tsaousis
2023-10-14journal timeout (#16195)Costa Tsaousis
* stop the query 250ms before the timeout, to allow sending back partial responses * on timeout return partial responses * give it 500ms * give some additional timeout to plugins.d garbage collection * define an extension to the timeout for all intermediate hops * hunting for the crash... * set value name and len to zero * remove unneeded memset()
2023-10-14Faster facets (#16190)Costa Tsaousis
* do not copy values, unless needed * linear probing hashtables * abstract hashtable implementation to avoid dereferencing pointers to compare the hash * use 2 hashes and linear probing on hashtable collisions * turn bool flags into an enum, to speed up reseting between rows
2023-10-13functions columns (#16184)Costa Tsaousis
* make all columns wrap * do not show that many default columns on processes
2023-10-12facets: do not corrupt the index when doubling the hashtable (#16171)Costa Tsaousis
do not corrupt the index when doubling the hashtable
2023-10-10Fix compilation warnings (#16158)Stelios Fragkakis
Drop warning when parent is not accepting job status updates
2023-10-09journal: updates (#16150)Costa Tsaousis
* dynamic facets hashtables; more facets fields for journal; enforce the facets blacklist * enable fstat caching per thread * enable fstat caching to speed up journal queries
2023-10-06Code improvements (#16104)Stelios Fragkakis
* Remove unused functions * No need for prepare statement because the function is not used frequently * Remove db_meta check, already assumed valid * Remove D_ACLK_SYNC and D_METADATALOG, fix log message * Reuse prepared statements per run to avoid sql parsing all the time * Keep rowid in charts and dimensions * Host and chart labels keep rowids * Don't store internal flags * Remove commented out code * Formatting * Fix algorithm when updating dimension
2023-10-06fix random crashes on pthread_detach() (#16137)Costa Tsaousis
2023-10-06Remove family from alerts (#16025)Emmanuel Vasilakis
* remove loading and storing families from alert configs * remove families from silencers * remove from alarm log * start remove from alarm-notify.sh.in * fix test alarm * rebase * remove from api/v1/alarm_log * remove from alert stream * remove from config stream * remove from more * remove from swagger for health api * revert md changes * remove from health cmd api test
2023-10-05fix journal help and mark debug keys in the output (#16133)Costa Tsaousis
* fix journal help and mark debug keys in the output * updated help
2023-10-04journal: fix the 1 second latency in play mode (#16123)Costa Tsaousis
provide a relative_to_absolute function that does not touch the current realtime time
2023-10-03journal: respect anchor on non-data-only queries (#16109)Costa Tsaousis
respect anchor on non-data-only queries
2023-10-03Documentation for Dynamic Configuration (#15643)Timotej S
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-10-03a simple journal optimization (#16099)Costa Tsaousis
2023-10-03journal: fix incremental queries (#16098)Costa Tsaousis
fix if_modified_since to not return empty responses and no overlapping data
2023-10-03external plugins: respect env NETDATA_LOG_SEVERITY_LEVEL (#16089)Ilya Mashchenko
* func to set global log sev level for ext plugins * apps: set log sev level * cgroup-network: set log sev level * cups: set log sev level * debugfs: set log sev level * freeipmi: set log sev level * nfacct: set log sev level * perf: set log sev level * slabinfo: set log sev level * xenstat: set log sev level * cgroup-name.sh: handle log sev level * alarm-notify.sh: handle log sev level * systemd-journal: set log sev e level * ebpf.plugin: set log sev level * ioping: handle log sev level * cgroup-network-helper.sh: handle log sev level * fix for cgroup-network-helper.sh
2023-10-02Severity level for logs (#14727)thiagoftsm
* log_level: Add new data type and variable used to control log level * log_level: Add helper and constants used to simplify user life when they are setting log level. I initially thought to create a log_select_log_level as void, but I thought the worse would be to have a variable defined inside a function, instead tto set outside like other calls inside log_init is doing. * log_level: Modify option name to match https://github.com/netdata/netdata/issues/14388#issuecomment-1412188747 * log_level: Modify function info_int to store data according user defintion for new variable * log_level: Modify function error_int to match new variable configuration. * documentation_adjust_code: After to clarify goals, I am removing level that is not necessary. * documentation_adjust_code: Pass serverity-level as argument for plugins. I had to modify the argument in this commit, because plugins like apps have specific algorithm to parse the arguments. * documentation_adjust_code: As informed in previous commit, to avoid modify all plugins, I am renaming configuration option. * documentation_adjust_code: Add new helper to modify log level from collectors and also modify the first collector (apps.plugin) * documentation_adjust_code: Modify cgroup-network to use severity-level * documentation_adjust_code: Add missing documentation for apps plugin * documentation_adjust_code: Modify cups.plugin to use severity-level * documentation_adjust_code: Modify ebpf.plugin to use severity-level * documentation_adjust_code: Modify freeimpi.plugin to use severity-level * documentation_adjust_code: Modify nfacct.plugin to use severity-level * documentation_adjust_code: Modify perf.plugin to use severity-level * documentation_adjust_code: Modify slab.plugin to use severity-level * documentation_adjust_code: Fix python.plugin * log_level: Revert condition added for info_int, because in any situation we will have INFO data * log_level: Rename function to match new circustances and add an argument instead to create another function that would have the same algorithm * log_level: The eBPF.plugin without this commit will not work properly with new variables, on the other hand the proper solution needs more than 14 lines of code. So I am pushing this commit to achieve the goal and simplify my reviewers. * log_level: Add additional information for our documentation * log_level: Bring initial changes for Plugin classes * log_level: Rename log_level to use_severity_level to simplify code read * log_level: Rename functions for a more meaningful name and also add a new function to pass the same value for all collectors * log_level: Modify all collectors to receive string as argument instead integer, this will simplify for developers that want to work with dictionary, and also we will have one unique common value for core/collectors. * log_level: Modify cgroup to inform cgroup_network what is the current severity_level * log_level: Modify class JobsConfigBuilder to use external severity level * log_level: Modify PythonDLogger class and add arguments for callers * log_level: Address flake8 * log_level: Modify daemon/config/README.md adding information about new log file and also new option * log_level: Accept suggestion given in https://github.com/netdata/netdata/pull/14727#pullrequestreview-1361221097 * log_level: Add informatin about tags with a link to configuration doc * ebpf_functions: Fix rebase. * rename_error_fcnt: Fix previous rebase and rebase again * log_level: Moddfy charts. * log_level: Modify tc-qos-helper to dispach message according security-level * log_level: Fix charts.d and typo * log_level: Remove unnecesary cast * log_level: Fix rebase * Fix rebase * log_level: Fix shellcheck * log_level: Remove severity level for external plugins * log_level: Remove severity level for external plugins (2) * log_level: Remove severity level for external plugins (cgrooup) * log_level: Restore cgroup line * log_level: Only set severity when developers do not need message * log_level: Add environment variable to communicate with external plugin and modify default level. * log_level: Modify functions to use severity level * Apply suggestions from code review fix sev level/global sev level comparison * rename var and add err short str * simplify logic in log level cmp * update docs * fix log_severity_level_to_severity_string * Update daemon/README.md --------- Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-10-02functions: prevent a busy wait loop (#16086)Costa Tsaousis
prevent a busy wait loop
2023-10-02systemd-Journal by file (#16038)Costa Tsaousis
* query journal file by file: 17% faster * maintain a registry of journal files in memory and support multiple journal directories; offer sources of journal directories * fixes * overloaded libc fstat64() call to speed up libsystemd * do not just copy unset values, there is a flag that tracks them * optimize facets_row_finished() * use container name in ND_JOURNAL_PROCESS * fix compatibility with versions of libsystemd without sd_journal_open_files_fd() * added more statistics about the time spent per journal file * optimize facets_row_finished() * optimize facets_rows_begin() * tuning * progress reporting * fix journal seek to precisely match log timestamps * support remote sources and namespaces * jf_is_mine() as function * fixes * fixes 2 * fixes 3 * added debug * fixed log * added source for fqs * fix all source names * fix jf_is_mine() to return a value * add rows_useful to journal files * sorted list of all sources * make hostname visible by default * rename sources * increase number of columns * updated apps_groups.conf * support view only transformations * add support for slicing * add support for older versions of systemd * cleanup * added ordering of key values * convert remote IPs to hostnames * fix for hostname resolution * standardize the source name length * added versions * added sources pills and info * fix plural * better formatting for durations * support dynamic unset value * fix sorting * errno to still show numeric values * maintain a used hashes registry * fixed severity * updated function help message with all current parameters accepted * remove internal error * always return null as empty values in data * add default sd_journal_open flags * validate anchor * fix compiler warning * calculate journal vs realtime delta per journal file * up to 2 minutes journal vs realtime delta * more detailed message * do not log zero anchor * fixed message * fix seek to db * request details and dump of all journal files in response * sort files before processing them * do not sort if fewer than 2 files * documentation * added documentation about performance * added field transformations documentation and annotated _CAP_EFFECTIVE * updated docs * updated docs * annotated SOURCE_REALTIME_TIMESTAMP * updated docs * workaround for old systems * updated docs * updated docs * updated docs * updated docs * more fields to show by default * filter data-only query by libsystemd on slice mode * better tail * restore operation of full queries * updated docs * updated docs * added smart field _BOOT_ID to automatically extract the timestamp of the first message of this boot_id * do not seek to anchor on full queries * added tail and delta * alphabetical sort on calculated columns * simplify sorting of facet values * fix sorting of transformed values * simplify code * numeric values for capabilities that do not exist in old systems * do not log if directories do not exist or are not directories
2023-09-29Dyncfg add streaming support (#15791)Timotej S
* dyncfg fncnames as constants * add helper macros to know parser streaming/plugin * plugins dictionary per RRDHOST * api_request_v2_config add support for /host/ * streamify pluginsd_register_plugin * streamify pluginsd_register_module * streamify report_job_status * streamify dyncfg get functions * module_type2str * add job type and flags * add DYNCFG_REGISTER_JOB * implement register job * push all to parent at startup * add helper function is_dyncfg_function * forward virtual functions trough streaming * separate job2json * add api/v2/job_statuses * do cleanup on streaming * streamify set functions * support FUNCTION_PAYLOAD trough streaming * WIP tests * dont attempt loading non-localhost configs * move cfg persistence to proper place * prevent race * properly update job state at runtime * cleanup 1 * job2json add missing reason * add tests * correct HTTP code * add test * streamify delete_job_cb * add DELETE_JOB keyword * job delete over streaming * add tests for create and delete job over parent * rrdpush common checks to macro * add missing forwarders * fix jobs according to test results * more tests * review comment 1 * codacy remove valid warning * codacy ruby fixes * fix wrong rc check * minimal test plugin for child * add test * dict walk insted of master lock * minor - english spelling fixes * thiago comments 1 * minor - rename folder to dynconf * enable only when built with -DNETDATA_TEST_DYNCFG * minor - compiler warning * create dir post daemonization * stricter URL check
2023-09-21remove the line length limit from pluginsd (#16013)pre-integrations-docsCosta Tsaousis
* remove the line length limit from pluginsd * initialize the buffer on every iteration * buffer_tostring inlined * Release buffer --------- Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
2023-09-20fix crash on setting thread name (#16016)Ilya Mashchenko
2023-09-19Update CMakeLists.txt (#16005)Stelios Fragkakis
2023-09-18fix compilation warnings (#16001)Costa Tsaousis
2023-09-18functions cancelling (#15977)Costa Tsaousis
2023-09-16Functions: allow collectors to be restarted (#15983)Costa Tsaousis
2023-09-15Facets: fixes 5 (#15976)Costa Tsaousis
2023-09-14facets histogram: do not send db retention for facets (#15974)Costa Tsaousis
2023-09-14facets histogram when empty (#15970)Costa Tsaousis
2023-09-14eBPF socket function (#15850)thiagoftsm
2023-09-14facets: do not shadow local variable (#15968)Costa Tsaousis
2023-09-14facets: data-only queries (#15961)Costa Tsaousis
2023-09-13facets and journal improvements (#15956)Costa Tsaousis
2023-09-13streaming logs (#15948)Costa Tsaousis
2023-09-12facets optimizations (#15940)Costa Tsaousis
2023-09-11systemd-journal and facets: info and sources (#15928)Costa Tsaousis
2023-09-08systemd-journal and facets improvements (#15926)Costa Tsaousis
2023-09-08don't return `-1` if the socket was closed (#15771)moonbreon
2023-09-01Limit atomic operations for statistics (#15887)Costa Tsaousis
Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
2023-08-31Fix build with --disable-https (#15395)Emmanuel Vasilakis
rebased
2023-08-25allow any field to be a facet (#15880)Costa Tsaousis
2023-08-25use the newer XXH3 128bits algorithm, instead of the classic XXH128 (#15878)Costa Tsaousis
2023-08-21Fix compilation warnings (#15858)Stelios Fragkakis
* Fix compilation warnings * Fix adding compilation warnings when NETDATA_INTERNAL_CHECKS or NETDATA_DEV_MODE is specified
2023-08-21Facets histograms (#15846)Costa Tsaousis
2023-08-21Fix static build SSL (#15842)Costa Tsaousis
2023-08-17Improve dyncfg exit (#15824)Timotej S
2023-08-17Release job message status to avoid memory leak (#15822)Stelios Fragkakis
Release reason if job not found