summaryrefslogtreecommitdiffstats
path: root/libnetdata
AgeCommit message (Collapse)Author
2020-05-11Enable support for Netdata Cloud.Andrew Moss
This PR merges the feature-branch to make the cloud live. It contains the following work: Co-authored-by: Andrew Moss <1043609+amoss@users.noreply.github.com(opens in new tab)> Co-authored-by: Jacek Kolasa <jacek.kolasa@gmail.com(opens in new tab)> Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud(opens in new tab)> Co-authored-by: James Mills <prologic@shortcircuit.net.au(opens in new tab)> Co-authored-by: Markos Fountoulakis <44345837+mfundul@users.noreply.github.com(opens in new tab)> Co-authored-by: Timotej S <6674623+underhood@users.noreply.github.com(opens in new tab)> Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com(opens in new tab)> * dashboard with new navbars, v1.0-alpha.9: PR #8478 * dashboard v1.0.11: netdata/dashboard#76 Co-authored-by: Jacek Kolasa <jacek.kolasa@gmail.com(opens in new tab)> * Added installer code to bundle JSON-c if it's not present. PR #8836 Co-authored-by: James Mills <prologic@shortcircuit.net.au(opens in new tab)> * Fix claiming config PR #8843 * Adds JSON-c as hard dep. for ACLK PR #8838 * Fix SSL renegotiation errors in old versions of openssl. PR #8840. Also - we have a transient problem with opensuse CI so this PR disables them with a commit from @prologic. Co-authored-by: James Mills <prologic@shortcircuit.net.au(opens in new tab)> * Fix claiming error handling PR #8850 * Added CI to verify JSON-C bundling code in installer PR #8853 * Make cloud-enabled flag in web/api/v1/info be independent of ACLK build success PR #8866 * Reduce ACLK_STABLE_TIMEOUT from 10 to 3 seconds PR #8871 * remove old-cloud related UI from old dashboard (accessible now via /old suffix) PR #8858 * dashboard v1.0.13 PR #8870 * dashboard v1.0.14 PR #8904 * Provide feedback on proxy setting changes PR #8895 * Change the name of the connect message to update during an ongoing session PR #8927 * Fetch active alarms from alarm_log PR #8944
2020-04-14Docs: Standardize links between documentation (#8638)Joel Hans
* Trying out some absolute-ish links * Try one out on installer * Testing logic * Trying out some more links * Fixing links * Fix links in python collectors * Changed a bunch more links * Fix build errors * Another push of links * Fix build error and add more links * Complete first pass * Fix final broken links * Fix links to files * Fix for Netlify * Two more fixes
2020-04-14Fixes compatibility with RH 7.x family (#8694)thiagoftsm
Brings eBPF collector to RH 7.x family.
2020-04-13Revert "Revert changes since v1.21 in pereparation for hotfix release."Austin S. Hemmelgarn
This reverts commit e2874320fc027f7ab51ab3e115d5b1889b8fd747.
2020-04-13Revert changes since v1.21 in pereparation for hotfix release.Austin S. Hemmelgarn
2020-04-06Prometheus web api connector (#8540)Vladimir Kobal
* Fix the Prometheus web API code in the exporting engine * Rename connector types * Remove the conditional compilation of the exporting engine * Use labels instead of tags * Fix the exporter configuration * Document functions * Add unit tests
2020-04-03Change all https://app.netdata.cloud URLs to https://netdata.cloud to ↵Markos Fountoulakis
restore connectivity with netdata cloud.
2020-04-03Fix Coverity Defect CID-349684 (#8586)thiagoftsm
This PR brought a test before to call the function `health_add_params` to avoid memory leak.
2020-04-03Fix Coverity defects (#8579)Andrew Moss
Fix Coverity CID355287 and CID355289: technically it is a false-positive but it is easier to put a pattern in the code that they can recognise as a sanitizer. The compiler will remove it during optimization. Fix CID353973: the security condition is unlikely to occur but we can avoid it completely. Fix resource leak from CID 355286 and CID 355288. Fixing new resource leak introduced by a previous commit (CID355449)
2020-04-03cove355076: Config per section (#8588)thiagoftsm
This commit brings the possibility to search an option directly when we already have a section
2020-03-31Extend TLS Support (#8505)thiagoftsm
* tls13: This commit brings TLS 1.3 to Netdata * tls13: Update variables on slave side * tls13: Fix compilation error for old libraries * tls13: Fix compilation error for old libraries 2 * tls13 remove ciphers * tls13: TLS versions This commit brings the missing tls versions accpeted for Netdata and it also brings documentation update related to these versions * tls13: Remove dupplication This commit removes wrong dupplication of code * tls13: Documentation This commit brings fix for the documentation * tls13: Remove magic number This commit removes the magic number to allow the code to be readable * tls13: TLS version Small adjust with TLS version * tls13: Security Init This commit removes array from the function and overwrite the magic number with a string * tls13: Remove new variable name from stream * tls13: OpenSSL versions and old key name This commit removes the new key names and also update the names used to define openssl version
2020-03-31Improve the behavior of claiming (#8516)Andrew Moss
The default cloud url has been updated to app.netdata.cloud ready for the release. The claiming process now checks the current user executing claiming and refuses to perform the claim for the wrong user. If the current UID is 0 then claiming proceeds but the file ownership is adjusted to be the correct netdata user. The default expected user is `netdata` unless the script can identify the user from the current configuration. After the claiming script is executed the CLI is used to reload the claiming state.
2020-03-30Cleans up cloud config files [agent_cloud_link] -> [cloud] (#8501)Timo
* config move from [agent_cloud_link] to [cloud]
2020-03-23Add high precision timer support for plugins such as idlejitter. (#8441)Markos Fountoulakis
2020-03-18Fixed JSON parsing (#8426)Stelios Fragkakis
* Fixed an issue with the internal JSON parser which made it fail to parse ACLK challenge/response related payloads
2020-03-16Fix streaming scaling (#8375)Markos Fountoulakis
* Disallow multiple streaming connections to the same master agent * Reject multiple streaming connections quickly without blocking * Increase timeout for systemd service shutdown to give time to flush the db. * Optimize page correlation ID to use atomic counter instead of locks * Reduce contention in global configuration mutex * Optimize complexity of inserting configuration sections from O(N) to O(1) * Reduce overhead of clockgettime() by utilizing CLOCK_MONOTONIC_COARSE when applicable. * Fix unit test compile errors
2020-03-12Enconde slave fields (#8216)thiagoftsm
* stream_encode: Enconde slave This commit encodes the messages before to send them from master to slave * stream_encode: Remove comma This commit changes the comma to semi-colon to bring a pattern to code
2020-03-10Bulk add frontmatter to all documentation (#8354)Joel Hans
* Bulk add frontmatter * A few extra edge cases
2020-03-10Improve ACLK according to results of the smoke-test. (#8358)Andrew Moss
* Cleaning up the ACLK part 2 (#8187) * Initial proxy support implementation (#8146) * Implement the ACLK Challenge-Response Authentication (#8317) Co-authored-by: Timo <6674623+underhood@users.noreply.github.com>
2020-02-24Restrict GA message (#8161)thiagoftsm
* restrict_stream_message: Parse message before to send This commit changes the default tag that was sent to GA * Ignore thread problem We are believing that there is a thread problem that we need to dig, while we do not do there, we are only changing the comparison * restrict_stream_message: Remove tabs This commit removes the unecessary tab around the functions changed
2020-02-19Ebpf coverity (#8135)thiagoftsm
* Fix coverity errors on libnetdata/ebpf * Fix coverity warnings inside ebpf collector
2020-02-17eBPF process plugin (#7979)thiagoftsm
* syscall_plugin: Compilation This commit brings the necessaries changes to the compilation files * syscall_plugin: Collector body This commit brings the collector body to files. * syscall_plugin: .gitignore This commit adds syscall.plugin to .gitignore * syscall_plugin: Plugin adjust Fix reference and remove message * syscall_plugin: Remove limit Remove call to setrlimit * syscall: Fix start This commit fixes problems related with start of the plugin * syscall_plugin: Bring heartbeat This commit removes the sleep and changes to heartbeat to avoid plugin receive a SIGTERM * syscall_plugin: Missing semicolon * syscall_plugin: Fix dimension Brings the initial value of chart for the normal dimension of the other values * syscall_plugin: Fix dimension 2 The previous change did not give the expected results, so I am bringing more a fix * syscall_plugin: adjust values Rename function and adjust pid size * syscall_plugin: Remove Chart and fix var this commit removes a chart that will not be created and fix an error when the bytes were calculated * syscall_plugin: Brings error This commit brings a new variable that will be used to identify errors * syscall_plugin: Rename charts This commit starts to rename the charts properly * syscall_plugin: Rename plugin * syscall_plugin: missing changes for rename * syscall_plugin: fix compilation * syscall_plugin: bring new charts * syscall_plugin: Warnings Remove warnings from compilation time * vfs_plugin: Fix Error chart plot There was an error when the chart was being displayed * vfs_plugin: Change family This commit changes the family of the VFS plugin * vfs_plugin: Fix order This PR fixes the wrong order when creating a chart * vfs_plugin: Remove path Remove path from structure * vfs_plugin: From Perf to HASH This commit converts the main source a hash table and also split the data collection per chart * vfs_plugin: Adjusts and exit This commit brings adjusts to the collect and the complete monitor to exit events * vfs_plugin: Start process This commit brings the monitoring of a process start and thread creation to Netdata * vfs_plugin: Visualization and collection Adjust variables to show and to collect data * vfs_plugin: Connection with apps plugin This commit starts to bring the connection with apps. * vfs_plugin: Various This commit brings new label for charts, fix to error chart and adjusts for new charts, I am sorry * vfs_plugin: basis new chart This commit brings the basis of the new charts for the plugin * vfs_plugin: Apps plugin This commit brings the integration with apps.plugin * vfs_plugin:fix counter This commit fixer the difference between apps plugin and counter * ebpf_plugin: rename charts This commit renames the charts * ebpf_plugin: New charts adjusts and log start * ebpf_plugin: Log thread Creates the log thread that will be used to store error message * ebpf_plugin: Rename Web Group This commit reorganize the charts on dashboard * ebpf_plugin: Restore This commit restore the previous status of the collector where we only have a global vision of the problems * ebpf_plugin: kretprobe This commit brings the initial changes for the collector works with both eBPF program * ebpf_plugin: New syscalls This commit brings the new syscalls that we are monitoring * ebpf_plugin: New charts This commit brings new charts to the collector * ebpf_plugin: Parse config This commit starts the parser of the file * ebpf_plugin: collector debug * ebpf_plugin: Global variables from config This commit brings the global variable update from the config file * ebpf_plugin: Clean kprobe_events This commit brings the clean of kprobe_events and also starts the common library for all eBPF collectors * ebpf_plugin: Check kernel version This function brings a check for the kernel version * ebpf_plugin: Start documentation This commit brings the initial documentation for the users * ebpf_plugin: Documentation This commit brings adjust to code and updates for the documentation * ebpf_plugin: this commit brings the developer mode to the collector * ebpf_plugin: Documentation This commit brings more information to the documentation * ebpf_plugin: Documentation This commit brings more information to the documentation * ebpf_plugin: errno to logs Brings errno number to logs * ebpf_plugin: Documentation This commit brings fixes to the collector documentation * ebpf_plugin: Move description This commit move the chart description from the C code to dashboard_info.js * ebpf_plugin: Rename files This commit rename files to the final version * ebpf_plugin: COntinue renaming This commit continue renaming the files to the final version * ebpf_plugin: Renaming process This commit renames the final plugin * ebpf_plugin: Finish rename This commit finishes the rename processing * ebpf_plugin: fix entry charts This commit removes one chart from mode * ebpf_plugin: Fix remove This commit brings a new function to fix the unload of collector when the collector is running in entry mode * ebpf_plugin: Rename on old kernels This commit brings fixes for syscall names * ebpf_plugin: Timestamp to log This commit brings the timestamp to the logs * ebpf_plugin: Remove syscall With the changes on the backend, we are not monitoring more sys_clone * ebpf_plugin: The syscall is important for 5.3 or newer, so I am returning * ebpf_plugin: Remove concurrency This commit adds variables necessary to interact with the new structor of the eBPF program * ebpf_plugin: Ids to dimension This commit fews the functions name as ids for the dimensions * ebpf_plugin: Missing chart This commit brings the missing chart for Netdata * ebpf_plugin: Remove unecessary message Remove unecessary error message from the collector * ebpf_plugin: Rename dimension This commit renames the dimension for something more meaninful * ebpf_plugin: Optional log This commit converts the developer.log in an optional feature * redirect to stdoou This commit starts to bring the capability to redirect everything to stdout * ebpf_plugin: Disable dev mode This commit removes the possibility to load the dev mode file for while * ebpf_plugin: Disable eBPF process By default this plugin won't be enabled * ebpf_plugin: Update debug message * ebpf_plugin: this commit adjusts documentation to next release. * ebpf_plugin: documentation fix. * ebpf_plugin: Percpu hash This commit moves from an unique hash table for various to speed up the collector * ebpf_plugin: Compatibility This commit set compatibility version between kernels
2020-02-14initial MQTT over Secure Websockets support for ACLK (#7988)Timotej Šiškovič
* add aclk_lws_wss_client * shorten the thread name in case more threads are necessary * Draft libmosquitto<->libwebsockets integration * use ringbuffer for recvd data * Some code cleanup * if mqtt connection fails close lws connection and reconect * clear buffers on connection closed * work on better loop integration * move mosquitto read out of loop * remove useless code when using websockets * LWS - make host and port configurable * make default port 9002 as we use MQTT over WSS now * wait for link up before subscribing start query thread after connection has been made * cleanup - remove useless var * if there is anything to write send it immediatelly * cleanup: move buffers into engine instace * allow MQTT IO from multiple threads (although preffered is MQTT IO to be done by single thread) * add warning to future self * add some comments for whoever reviews * add destroy fnc - start work on cleanup * minor - add mosquitto to .gitignore * fix codacy errors * do not reconnect automatically by default * minor - remove outdated comment * tab -> spaces Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> * address thiagoftsm valid comments * add usefull logs in case of trouble * fix -Wall -Wextra -Wformat-signedness warnings * log error when connection fails * update .gitignore to match new installer * Fwd LWS logs to Netdata logs * minor - tabulation fixes * fix comments from thiago * force SSL * move UNUSED to libnetdata.h @thiago correctly pointed out it might be usefull for others * minor - rename function for clarity * minor - remove commented out code Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
2020-02-07Update `api/v1/info ` (#7862)thiagoftsm
* update_info: New variables This commit creates inside script and it reads them to Netdata * update_info: API This commit changes the web api response * update_info: Disk space This commit brings the disk space to info and renames the environment variables inside Netdata * update_info: Rename variable This commit renames the environment variable * update_info: Rename response variable This commit renames a response variable * update_info: Labels This commit creates the missing labels * update_info: test before free * update_info: Doc function This commit brings docummentation to the functions to give instructions to developer * update_info: Fix info message This commit removes some info messages from the error.log * update_info: Remove unecessary ifs, considering free manual
2020-02-01Parse host tags (#7702)Vladimir Kobal
* Fix memory leaks * Check for configuration options * Parse simple tags * Parse JSON tags * Remove an unnecessary check * Parse a JSON object * Parse a JSON array * Update the documentation * Fix host locks
2020-01-28Missing extern (#7877)thiagoftsm
* missing_extern: Fix missing Fix few externs that were missing in global variables * missing_extern: Variables This commit declares the variables inside .c files
2020-01-09Send host labels via exporting connectors (#7554)Vladimir Kobal
* Add labels to the JSON exporting connector * Add labels to the Graphite exporting connector * Add labels to the OpenTSDB telnet exporting connector * Add labels to the OpenTSDB HTTP exporting connector * Replace control characters in JSON strings * Add unit tests
2020-01-02[libnetdata/threads] Change log level on error (#7653)Adrien Mahieux
Reduce error to info. Fixes #7644 where only uv threads were not renamed
2019-12-20Set standard name to non-libnetdata threads (libuv, pthread) (#7584)Adrien Mahieux
* [libnetdata/threads] Add uv_thread_set_name This is inspired from thread_set_name() but for libuv threads. Both are based on pthread, but for uv we need to call it with the uv_thread_t pointer, instead of being the thread that calls the function for itself. * [exporting] Set libuv threadname to "EXPORTING-index" * [database/engine] Set libuv thread name to "DBENGINE" * [daemon/command] Set libuv thread name to "DAEMON-COMMAND" * [collectors/proc] Set pthread name to "PLUGIN[cpuidle]" * Use new 'thread_set_name_np' name
2019-12-16Labels issues (#7515)Andrew Moss
Initial work on host labels from the dedicated branch. Includes work for issues #7096, #7400, #7411, #7369, #7410, #7458, #7459, #7412 and #7408 by @vlvkobal, @thiagoftsm, @cakrit and @amoss.
2019-12-16Fix backend config (#7538)Vladimir Kobal
2019-12-12Implement the main flow for the Exporting Engine (#7149)Vladimir Kobal
* Add top level tests * Add a skeleton for preparing buffers * Initialize graphite instance * Prepare buffers for all instances * Add Grafite collected value formatter * Add support for exporting.conf read and parsing * - Use new exporting_config instead of netdata_config * Implement Grafite worker * Disable exporting engine compilation if libuv is not available * Add mutex locks - Configure connectors as connector_<type> in sections of exporting.conf - Change exporting_select_type to check for connector_ fields * - Override exporting_config structure if there no exporting.conf so that look ups don't fail and we maintain backwards compatibility * Separate fixtures in unit tests * Test exporting_discard_responce * Test response receiving * Test buffer sending * Test simple connector worker - Instance section has the format connector:instance_name e.g graphite:my_graphite_instance - Connectors with : in their name e.g graphite:plaintext are reserved So graphite:plaintext is not accepted because it would activate an instance with name "plaintext" It should be graphite:plaintext:instance_name * - Enable the add_connector_instance to cleanup the internal structure by passing NULL,not NULL arguments * Implement configurable update interval - Add additional check to verify instance uniqueness across connectors * Add host and chart filters * Add the value calculation over a database series * Add the calculated over stored data graphite connector * Add tests for graphite connector * Add JSON connector * Add tests for JSON formatting functions * Add OpenTSDB connector * Add tests for the OpenTSDB connector * Add temporaty notes to the documentation
2019-12-04Implement netdata command server and cli tool (#7325)Markos Fountoulakis
* Checkpoint commit (POC) * Implemented command server in the daemon * Add netdatacli implementation * Added prints in command server setup functions * Make libuv version 1 a hard dependency for the agent * Additional documentation * Improved accuracy of names and documentation * Fixed documentation * Fixed buffer overflow * Added support for exit status in cli. Added prefixes for exit code, stdout and stderr. Fixed parsers. * Fix compilation errors * Fix compile errors * Fix compile errors * Fix compile error * Fix linker error for muslc
2019-11-14Updating the Travis pipeline (issue 7189) (#7312)Andrew Moss
Added a linting pass. This is non-blocking but will output a measure of how much each .c and .h file deviates from our current .clang format. Changed the standard build to include all of the warning that we are using in dev. Added the dependencies for dbengine and confirmed that the standard build enables dbengine. Fixed the original warnings.
2019-11-11Makefile.am files indentation (#7252)Konstantinos Natsakis
* Use 4 spaces for indentation of non-recipe lines in Makefile.am files * Be more consistent in the use of space before = in Makefile.am files
2019-10-30Fix counter reset detection (#7220)Markos Fountoulakis
* Removed support for 16-bit and 8-bit counter overflow * Improve behaviour of counter overflow detection versus counter resets. * Added support for signed 32-bit and 64-bit limits for counter overflows. * Fixed signed incremental counter issues and added unit tests.
2019-10-29include limits.h before using LONG_MAX (#7224)Marcin Niestroj
This fixes build with musl standard C library. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2019-10-24Fixing DNS-lookup performance issue on FreeBSD. (#7132)Andrew Moss
Our default configuration includes: allow connections from = localhost * allow management from = localhost The problem occurs when a connection is received that passes the `allow connections` pattern match, but fails the ACL check for `allow management`. During the failure processing path the DNS lookup is triggered to allow the FQDN to be checked against the pattern. On a FreeBSD system this lookup fails more slowly than linux and causes a visible performance problem during stress-testing. The fix adds a heuristic to analyse the patterns and determine if it is possible to match a DNS name, or only match a numeric IP address (either IPv4 or IPv6), or only match a constant value. This heuristic is used to disable the DNS checks when they cannot produce anything that may match the pattern. Each heuristic is evaluated once, when the configuration is loaded, not per-connection to the agent. Because the heuristic is not exact it can be overridden using the new config options for each of the ACL connection filters to set it to "yes", "no" or "heuristic". The default for everything *except* the netdata.conf ACL is "heuristic". Because of the numeric-patterns in the netdata.conf ACL the default is set to "no".
2019-10-21Netdata not returning correct value for unknow variables (#6984)thiagoftsm
* health_nan: fix result The expression evaluate was keeping the value zero when there was a wrong variable, but according our documentation the correct result would be NAN, this commit fixes this * health_nan: mapping * health_nan: Set variable After few tests, I am setting the NAN value to the variable in the correct place
2019-10-17feat(reaper): Add process reaper support (#7059)Steven Hartland
##### Summary Add a child process reaper to the main netdata app if running as init (pid = 1). This prevents zombie processes when a child is re-parented to netdata when its running in a container. Also: * Few style cleanups to match surrounding code. Fixes: #6033 ##### Component Name netdata binary ##### Additional Information This re-purposes old commented out code in `popen.c`, which already implemented part of the required process tracking. Without this on a standard netdata docker install we saw at least one zombie `timeout` process straight after the container was started.
2019-10-15Clang warnings (#7090)thiagoftsm
* clang_warnings: Fix unecessary comparison Netdata was verifying whether a pointer that will never be NULL could be NULL. This commit removes this * clang_warnings: Fix unecessary comparison Netdata was doing another unecessary comparison in other file * clang_warnings: Unecessary parenthesis This commit removes the excess of parenthesis in a file * clang_warnings: Remove unecessary initialization Remove from json file a initial set that is overwritten few lines late * clang_warnings: Comments Fix comments on top of the function * clang_warnings: Missing Cast Volatile variable generates warnings with Clang sometimes, so it was necessary to cast variables * clang_warnings: Return from previous Considering the possible problems given by the solution, I am returning for the previous stage
2019-10-15Add CMocka unit tests (#6985)Vladimir Kobal
* Add str2ld test * Build test with Autotools * Add storage_number test * Configure tests in CMake
2019-10-02Coverity 20190924 (#6941)thiagoftsm
* coverity_20190924: Fix 215633 In the switch the library stops case this pointer is NULL, so there is not necessity to processed with tests * coverity_20190924: Fix 338067 The current code tries to copy the same size of the variable, another possible solution would be to use a function to sanitize the code, I will try this first * coverity_20190924: Fix 348638 Considering that we are testing the variable value one line above The division will always happen * coverity_20190924: Fix 348640 For this specific case we do not have the possibility to have memory leak, valgrind confirms this, but I am adding a new variable here to the stack to discard the warning
2019-09-25Fix a memory leak (#6945)Vladimir Kobal
2019-09-20Fix some errors reported by Coverity (#6797)thiagoftsm
* coverity_20190905: Fix reported bugs This commit has fixes for some bugs reported by Coverity in the present day * coverity_20190905: Fix missing report FIx a missing report of error * coverity_20190905: Pipe close The previous fix had an error that wolud allow a socket continue opened, this commit fixes this * coverity_20190905: Error pattern The call of perror would generate a different error report, instead I am using strerror() to keep pattern * coverity_20190905: Error function Rewrite the call to error function * coverity_20190905: Fix missing tests The previous fix did not have correct tests after to clean the variables * coverity_20190905: Fix readable I changed for an else instead a new if, it is more clean this way * coverity_20190905: remove unecessary test This commit is removing an unecessary test for a variable that will never be NULL. * coverity_20190905: Add neccessary NULLL After to clean the variable, I am setting NULL to variable to avoid clean again * coverity_20190905: Remove false error The condition added to fix Coverity was generating false positives, so we are changing to debug * coverity_20190905: Remove false error The condition added to fix Coverity was generating false positives, so we are changing to debug * coverity_20190905: Bring else to avoid error Bring an else to solve the problem to read a FD not opened * coverity_20190905: Return After to analyse the last changes, I decided to return, because they were not necessary * coverity_20190905: Remove NULL Remove unecessary set of variable to NULL
2019-09-18Allow hostnames in Access Control Lists (#6796)Andrew Moss
##### Summary The Access Control List (ACL) configuration parameters can now use hostnames with simple patterns. Incoming connections are resolved using reverse DNS to obtain the hostname. Where a hostname is resolved, forward DNS resolution is performed to check the IP address is really associated with the hostname. If the checks pass then the patterns supplied are checked. Any patterns supplied for numeric ip addresses are also checked. ##### Component Name daemon ##### Additional Information Fixes #6438 * Reverse lookup on ip to get hostname * Forward lookup on hostname to get IP addresses. * Validation that the incomming ip is associated with the host. If these checks fail the hostname is discarded so it cannot match against the access-list patterns. If these checks validate the ip successfully then the resolved hostname is pattern-matched as described in the previous commit.
2019-09-04[libnetdata/thread] Set thread name from tag (#6745)Adrien Mahieux
* [libnetdata/thread] Set thread name from tag When calling netdata_thread_create, you can provide a tag to identify the thread in the error message This patch uses this tag to rename the thread if supported by the pthread distribution to allow better identification of the thread. This have helped identify the bug #6741 Sample output: ps -L -o tid,pid,comm,args -p $(pgrep netdata) TID PID COMMAND COMMAND 5123 5123 netdata ./netdata -D 5133 5123 PLUGIN[proc] ./netdata -D 5134 5123 netdata ./netdata -D 5135 5123 PLUGIN[cgroups] ./netdata -D 5136 5123 netdata ./netdata -D 5137 5123 STATSD ./netdata -D 5138 5123 BACKENDS ./netdata -D 5139 5123 netdata ./netdata -D 5140 5123 PLUGINSD ./netdata -D 5141 5123 netdata ./netdata -D 5142 5123 HEALTH ./netdata -D 5143 5123 netdata ./netdata -D 5145 5123 netdata ./netdata -D 5146 5123 PLUGINSD ./netdata -D 5147 5123 PLUGINSD[apps] ./netdata -D 5148 5123 netdata ./netdata -D 5150 5123 netdata ./netdata -D 5151 5123 STATSD ./netdata -D * [libnetdata/thread] Improve set thread title Added error check and fixed limit of 15 chars for thread name. ``` ps -L -o tid,pid,comm,args -p $(pgrep netdata) TID PID COMMAND COMMAND 14521 14521 netdata ./netdata -D 14531 14521 PLUGIN[proc] ./netdata -D 14532 14521 PLUGIN[diskspac ./netdata -D 14533 14521 PLUGIN[cgroups] ./netdata -D 14534 14521 PLUGIN[idlejitt ./netdata -D 14535 14521 STATSD ./netdata -D 14536 14521 BACKENDS ./netdata -D 14537 14521 WEB_SERVER[stat ./netdata -D 14538 14521 PLUGINSD ./netdata -D 14539 14521 HEALTH ./netdata -D 14540 14521 WEB_SERVER[stat ./netdata -D 14541 14521 WEB_SERVER[stat ./netdata -D 14542 14521 WEB_SERVER[stat ./netdata -D 14543 14521 WEB_SERVER[stat ./netdata -D 14544 14521 WEB_SERVER[stat ./netdata -D 14546 14521 STATSD_COLLECTO ./netdata -D 14547 14521 PLUGINSD[python ./netdata -D 14548 14521 PLUGINSD[apps] ./netdata -D ``` * [libnetdata/thread] Moved code to dedicated func * [libnetdata/thread] Wrong return value for thread_set_name * [libnetdata/thread] Remove lval for FreeBSD as defined void * [libnetdata/thread] Change allocation method to stack
2019-08-29Display uptime for processes (#6654)Vladimir Kobal
* Get process uptime * Calculate target uptime * Update charts * Show collected data * Fix chart names * Update the documentation * Fix a flag value * Add an explanation note for the 'carried over uptime' chart * Move the functions for getting uptime to libnetdata * Rename the function for geting uptime * Remove redundant code * Fix starttime calculation * More accurate definition for the carried over uptime * fix group starttime calculation * Fix typo
2019-08-15Fix Markdown Lint warnings (#6664)Promise Akpan
* make remark access all directories * detailed fix after autofix by remark lint * cross check autofix for this set of files * crosscheck more files * crosschecking and small fixes * crosscheck autofixed md files
2019-08-13 Change "netdata" to "Netdata" in all docs (#6621)Joel Hans
* First pass of changing netdata to Netdata * Second pass of netdata -> Netdata * Starting work on netdata with no whitespace after * Pass for netdata with no whitespace at the end * Pass for netdata with no whitespace at the front