summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)Author
2023-02-08Add markdown files in Learn (#14466)Fotis Voutsas
* add metadata for learn * first batch of adding metadata to md files * second batch of adding metadata to md files * third batch of adding metadata to md files * test one sidebar_label * add missing sidebar_labels * add missing sidebar_labels to files left behind * test, ansible doc is stubborn * fix * fix * fix * don't use questionmarks in the sidebar label * don't use exclamation marks and symbols in the sidebar label * fix style guide * fixes * fixes
2023-02-02Covert our documentation links to GH absolute links (#14344)Tasos Katsoulas
Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-01-25Assorted infrastructure cleanup. (#14223)Austin S. Hemmelgarn
* Remove old documentation check related config files. These are no longer used by any of our CI as far as I can tell. * Purge LGTM configuration and references. It has been fully shut down, so none of this works anymore. * Purge Travis CI config, scripts, and references. We are no longer using Travis CI, so all of this is useless. * Pureg config for other CI tools we are no longer using. * Remove old packaging related test scripts. These haven’t been used in years, and are potentially confusing for new contributors. * Restore MLC configuration. It is, in fact, still in use. * Fix bogus CI config in dist files. * Fix botched merge in CODEOWNERS.
2023-01-04Finish renaming the `--install` option to `--install-prefix`. (#13881)Austin S. Hemmelgarn
* Finish renaming the `--install` option to `--install-prefix`. * Fix remaining references to `--install` option.
2022-12-09remove deprecated fping.plugin in accordance with v1.37.0 deprecation notice ↵Ilya Mashchenko
(#14073)
2022-10-24app to api netdata cloud (#13856)Timotej S
2022-09-23Specify paths to source files for out-of-tree build. (#11475)Tomáš Kopal
* Specify paths to source files for out-of-tree build. * Update also dashboard makefile generation script. * Sync submodules with master
2022-09-19RRD structures managed by dictionaries (#13646)Costa Tsaousis
* rrdset - in progress * rrdset optimal constructor; rrdset conflict * rrdset final touches * re-organization of rrdset object members * prevent use-after-free * dictionary dfe supports also counting of iterations * rrddim managed by dictionary * rrd.h cleanup * DICTIONARY_ITEM now is referencing actual dictionary items in the code * removed rrdset linked list * Revert "removed rrdset linked list" This reverts commit 690d6a588b4b99619c2c5e10f84e8f868ae6def5. * removed rrdset linked list * added comments * Switch chart uuid to static allocation in rrdset Remove unused functions * rrdset_archive() and friends... * always create rrdfamily * enable ml_free_dimension * rrddim_foreach done with dfe * most custom rrddim loops replaced with rrddim_foreach * removed accesses to rrddim->dimensions * removed locks that are no longer needed * rrdsetvar is now managed by the dictionary * set rrdset is rrdsetvar, fixes https://github.com/netdata/netdata/pull/13646#issuecomment-1242574853 * conflict callback of rrdsetvar now properly checks if it has to reset the variable * dictionary registered callbacks accept as first parameter the DICTIONARY_ITEM * dictionary dfe now uses internal counter to report; avoided excess variables defined with dfe * dictionary walkthrough callbacks get dictionary acquired items * dictionary reference counters that can be dupped from zero * added advanced functions for get and del * rrdvar managed by dictionaries * thread safety for rrdsetvar * faster rrdvar initialization * rrdvar string lengths should match in all add, del, get functions * rrdvar internals hidden from the rest of the world * rrdvar is now acquired throughout netdata * hide the internal structures of rrdsetvar * rrdsetvar is now acquired through out netdata * rrddimvar managed by dictionary; rrddimvar linked list removed; rrddimvar structures hidden from the rest of netdata * better error handling * dont create variables if not initialized for health * dont create variables if not initialized for health again * rrdfamily is now managed by dictionaries; references of it are acquired dictionary items * type checking on acquired objects * rrdcalc renaming of functions * type checking for rrdfamily_acquired * rrdcalc managed by dictionaries * rrdcalc double free fix * host rrdvars is always needed * attempt to fix deadlock 1 * attempt to fix deadlock 2 * Remove unused variable * attempt to fix deadlock 3 * snprintfz * rrdcalc index in rrdset fix * Stop storing active charts and computing chart hashes * Remove store active chart function * Remove compute chart hash function * Remove sql_store_chart_hash function * Remove store_active_dimension function * dictionary delayed destruction * formatting and cleanup * zero dictionary base on rrdsetvar * added internal error to log delayed destructions of dictionaries * typo in rrddimvar * added debugging info to dictionary * debug info * fix for rrdcalc keys being empty * remove forgotten unlock * remove deadlock * Switch to metadata version 5 and drop chart_hash chart_hash_map chart_active dimension_active v_chart_hash * SQL cosmetic changes * do not busy wait while destroying a referenced dictionary * remove deadlock * code cleanup; re-organization; * fast cleanup and flushing of dictionaries * number formatting fixes * do not delete configured alerts when archiving a chart * rrddim obsolete linked list management outside dictionaries * removed duplicate contexts call * fix crash when rrdfamily is not initialized * dont keep rrddimvar referenced * properly cleanup rrdvar * removed some locks * Do not attempt to cleanup chart_hash / chart_hash_map * rrdcalctemplate managed by dictionary * register callbacks on the right dictionary * removed some more locks * rrdcalc secondary index replaced with linked-list; rrdcalc labels updates are now executed by health thread * when looking up for an alarm look using both chart id and chart name * host initialization a bit more modular * init rrdlabels on host update * preparation for dictionary views * improved comment * unused variables without internal checks * service threads isolation and worker info * more worker info in service thread * thread cancelability debugging with internal checks * strings data races addressed; fixes https://github.com/netdata/netdata/issues/13647 * dictionary modularization * Remove unused SQL statement definition * unit-tested thread safety of dictionaries; removed data race conditions on dictionaries and strings; dictionaries now can detect if the caller is holds a write lock and automatically all the calls become their unsafe versions; all direct calls to unsafe version is eliminated * remove worker_is_idle() from the exit of service functions, because we lose the lock time between loops * rewritten dictionary to have 2 separate locks, one for indexing and another for traversal * Update collectors/cgroups.plugin/sys_fs_cgroup.c Co-authored-by: Vladimir Kobal <vlad@prokk.net> * Update collectors/cgroups.plugin/sys_fs_cgroup.c Co-authored-by: Vladimir Kobal <vlad@prokk.net> * Update collectors/proc.plugin/proc_net_dev.c Co-authored-by: Vladimir Kobal <vlad@prokk.net> * fix memory leak in rrdset cache_dir * minor dictionary changes * dont use index locks in single threaded * obsolete dict option * rrddim options and flags separation; rrdset_done() optimization to keep array of reference pointers to rrddim; * fix jump on uninitialized value in dictionary; remove double free of cache_dir * addressed codacy findings * removed debugging code * use the private refcount on dictionaries * make dictionary item desctructors work on dictionary destruction; strictier control on dictionary API; proper cleanup sequence on rrddim; * more dictionary statistics * global statistics about dictionary operations, memory, items, callbacks * dictionary support for views - missing the public API * removed warning about unused parameter * chart and context name for cloud * chart and context name for cloud, again * dictionary statistics fixed; first implementation of dictionary views - not currently used * only the master can globally delete an item * context needs netdata prefix * fix context and chart it of spins * fix for host variables when health is not enabled * run garbage collector on item insert too * Fix info message; remove extra "using" * update dict unittest for new placement of garbage collector * we need RRDHOST->rrdvars for maintaining custom host variables * Health initialization needs the host->host_uuid * split STRING to its own files; no code changes other than that * initialize health unconditionally * unit tests do not pollute the global scope with their variables * Skip initialization when creating archived hosts on startup. When a child connects it will initialize properly Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> Co-authored-by: Vladimir Kobal <vlad@prokk.net>
2022-06-28netdata doubles (#13217)Costa Tsaousis
* netdata doubles * fix cmocka test * fix cmocka test again * fix left-overs of long double to NETDATA_DOUBLE * RRDDIM detached from disk representation; db settings in [db] section of netdata.conf * update the memory before saving * rrdset is now detached from file structures too * on memory mode map, update the memory mapped structures on every iteration * allow RRD_ID_LENGTH_MAX to be changed * granularity secs, back to update every * fix formatting * more formatting
2022-05-03Remove node.d.plugin and relevant files (#12769)Suraj Neupane
* Remove node.d.plugin and relevant files * fix build packages * remove node.d related words/phrases from docs and tests
2022-03-15Remove backends subsystem (#12146)Vladimir Kobal
2022-03-14Remove owner check from webserver (#12339)thiagoftsm
2022-02-22remove deprecated node.d modules (#12047)Ilya Mashchenko
2022-02-17Docs: Removed Google Analytics tags (#12145)Tina Luedtke
2022-01-19Compute platform-specific list of static_threads at runtime. (#11955)vkalintiris
Compute array of static threads at runtime.
2022-01-18Initial release of new kickstart script. (#11764)Austin S. Hemmelgarn
* Replace existing kickstart scripts with kickstart-ng. This change looks more complicated than it actually is due to git not sanely recognizing the rename. * Fix CI for new kickstart script. * Initial revision of install documentation. * Further documentation updates. * Even more documentation updates. * Fix telemetry event handling if neither curl nor wget are installed. * Remove dependence on `pgrep` for claiming. * Fix fatal error message handling. * Formally outline our support policy. * Updates to platform support doc. * Platform support doc updates. * Minor documentation updates. * Remove accidentally commited file from rebase process. * Apply suggestions from code review, part 1. Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com> * Made one-line installer consistent. * Apply suggestions from code review, part 2. * Update architecture list for static builds. * Restructure platform support doc so that things are clearer. Especially for cases of linking directly to the section on a specific support category. * Apply suggestions from code review, part 3. Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com> * Apply suggestions from code review, part 4 Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com> * Further updates to platform support document. * Further documentation updates. * Rework update documentation. Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
2022-01-18Use libnetdata/required_dummies.h in collectors. (#11971)vkalintiris
2021-11-16Fix typos (#11782)Dimitris Apostolou
Co-authored-by: ilyam8 <ilya@netdata.cloud>
2021-09-20Update libbpf (#11480)thiagoftsm
2021-04-14Spelling tests (#10920)Josh Soref
2021-04-14Add a plugin for the system clock synchronization state (#10895)Vladimir Kobal
Co-authored-by: Joel Hans <joel.g.hans@gmail.com>
2021-04-05Spelling build (#10428)Josh Soref
* spelling: alleviate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: berkeley Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: centos Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: context Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: continuously Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: correlate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: defaults Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: dependencies Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: dependency Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: different Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: doesn't Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: example Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: forbidden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: nightly Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: normally Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: notification Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: packet Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: program Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: prompted for Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: proxyadmin Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: red hat Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: relative Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: script Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: scriptlet Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: somewhere Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: spinning Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: substitution Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: success Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: successfully Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: sysadmin Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: tarball Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: telemetry Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: temporary Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: timeout Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unsupported Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: updates Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: useful Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: way Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * Update kickstart script checksums in documentation Co-authored-by: Vladimir Kobal <vlad@prokk.net>
2021-01-07Docs housekeeping for SEO and syntax, part 1 (#10388)Joel Hans
* First pass to get the script working right * Finish adding analytics tags
2020-09-10Correctly fix handling of CI Slack notifications. (#9902)Austin S. Hemmelgarn
2020-08-27Ensure Arch Linux images are up to date in CI before running checks. (#9825)Austin S. Hemmelgarn
2020-06-03Add a random offset to the update script when running non-interactively. (#9245)Austin S. Hemmelgarn
* Revert "Revert "Introduce a random sleep in the Netdata updater (#9079)" (#9161)" This reverts commit e92d2ce7a155a33ee6b0acfd928f357251c02c69. * Add option to updater to disable randomized delay. Primarily intended for CI, also useful for automated deployment tools like Ansible. * Use correct paths in CI. * Mke variable name match option name.
2020-05-26Revert "Introduce a random sleep in the Netdata updater (#9079)" (#9161)James Mills
This reverts commit cea8a3fcbb3b48fce545d19bce2b5cf920c6794d.
2020-05-26Introduce a random sleep in the Netdata updater (#9079)James Mills
* Introduce a random sleep in the Netdata updater * Only sleep if we're not a tty (e.g: cron) and use a random interval between 30m-60m * Set lower bound to 1s * Disable random sleep / netdata-updater splay in lifecycle tests
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-14Explicitly include libffi on ArchLinux CI tests. (#8699)Austin S. Hemmelgarn
The `make` command depends on it but does not pull it in as a dependency. This isn't likely to affect user systems in most cases as they will almost certainly have Python installed, which also depends on libffi and pulls it in correctly. This is a workaround for an upstream bug in Arch.
2020-04-03Change all https://app.netdata.cloud URLs to https://netdata.cloud to ↵Markos Fountoulakis
restore connectivity with netdata cloud.
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-14Migrate Tests from Travis CI to Github Workflows (#8331)James Mills
* Migrate Tests from Travis CI to Github Workflows * Use GHA path filters * Make a unit test fail * Run new cmocka based unit tests * Revert "Make a unit test fail" This reverts commit 15500c59e4d49cb478ef27289de0366a543815c5. * Make a cmocka unit test fail * Work around a bug in libbson-1.0 on Ubuntu 18.04 * Add DCMAKE_BUILD_TYPE=Debug to make dbengine tests pass * Upload LastTest.log to GHA Artifact storage * Revert "Make a cmocka unit test fail" This reverts commit 920f56a03d0479bec1a67dc8c242df189f702177. * Remove Artifacts Validation stage
2020-03-10Bulk add frontmatter to all documentation (#8354)Joel Hans
* Bulk add frontmatter * A few extra edge cases
2020-03-06Fixed dependency names for Arch Linux. (#8334)Austin S. Hemmelgarn
* Fix package names for Archlinux. * Use a specific implementation of netcat on Arch. * Use install-required-pacakges.sh from local branch instead of master. * Use local copy of kickstart.sh instead of downloading it.
2020-01-27Docs: Overhaul of installation documentation (#7841)Joel Hans
* Initial commit to bring new branch up to speed with previous work * Initial commit to bring new branch up to speed with previous work * Pass through for grammar and typos * Pass through for grammar and typos * First additions * Improvements to installation page plus new separate kickstart page * Lots of new pages, lots of improvements * Continued work * Fixing the install grid * Added methods to nav * Fix typo and add kickstart to nav * CSS cleanup * Various cleanup * Cleanup on update/uninstall pages * Add responsiveness to install grid * Update checking of the kickstart files MD5 checksusm. This updates the CI script used to verify the MD5 checksums of the kickstart files as being correct in the documentation to use the new locations for the respective checksums. This is more involved than a simple path update because the existing script assumes that both checksums are listed in the same file, which is no longer the case. Any future updates that move the location of the checksums just need to modify the lines in tests/installer/checksums.sh that start with `check_checksum` to point to the correct files. * Added Alpine package for James * Add packages to top of installation page * Fix for Chris * Telemetry fixes * Trying to fix CI * Changing checksums * Fix CI checks for kickstart checksums. The changed wording was confusing the code that parsed the checksum out of the documentation, this fixes the code to handle this new wording correctly. * Update kickstart-static64 checksum * Update 64 checksum Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
2020-01-18Do not alert the #automation channel on checksum failures that will fail a ↵James Mills
PR in CI anyway (#7733)
2020-01-16Move the script for installing required packages into the main repo. (#7563)Austin S. Hemmelgarn
* Move the script for installing required packages into the main repo. Based on discussion with Costa. Most of what this script is actually used for directly is in the main repo anyway, so it makes more sense to have it there so that any changes get reviewed properly. * Fix typo in RPM package build setup.
2019-12-16updater_checks.sh: Fix issue with ↵Konstantinos Natsakis
ca-certificates-mozilla-2.34-lp151.2.6.1.noarch in OpenSUSE 15.1
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-11-04Building a fuzzer against the API (issue #7163) (#7210)Andrew Moss
New testing tool for the web API. We are calling this a "fuzzer" until a better name is suggested. This tool reads the swagger definitions of the API and parses the format of the requests and responses. The tool can generate randomized requests, which are sent to a netdata host, and then validate the json responses against the schema defined in the swagger. A traditional fuzzer only produces a single bit of information about each test (did the target system crash). This tool verifies that the call into the API produced a valid response structure, which produces more information about the correct functioning of the host. This current version performs a small sweep through the API calls as that is sufficient to find some incorrect response codes, and for testing the URL parser in the next issue (#7229) . A future update (in the next sprint) will add options to perform a deeper scan that brute-forces the parameter-space of the API, and combine it with our standard approach to stress-testing.
2019-09-29Common pattern for web and alarms together with two bug fixes (#6783)thiagoftsm
* script_pattern: Fix script and bring pattern This commit fixes the error given by shellckeck on stress.sh and brings a pattern for the other scripts, no less important its given the possibility to change the url from outside of the scripts * script_pattern: shellcheke Correct the request.sh after to change it to avoid warning errors from shellchecker * script_pattern: Remove of garbage value With this PR I am removing the garbage value of a script * script_pattern: Restore color These 3 scripts changed in this commit was not restoring the terminal color, this commit fixes this
2019-09-27Create a template for all dimensions (#6560)thiagoftsm
* health_connection: Comments inside Health Config To try to understand better what is necessary to change and where it is necessary to change anything inside the health, I commented the functions inside this file" " * health_connection: Comments about Health in other files This commit brings the rest of the comments that were missed for health" * health_connection: Comments on health_log I had to append more comments on health_log * health_connection: Create a new variable New variable is created to work with foreach * health_connection: Fix new option and doc The first implementation of the 'foreach' had a problem, this fixes the error. This commit also brings the updates for the documentation * health_connection: Understanding health This commit is to save the place that I am working, it has the map to understand all the alam process * health_connection: Update map I changed the position of the error message to identify the correct place to add new alarms * health_connection: End of simple alarm This commit finishes what is necessary to bring the same lookup for different dimensions in one unique line * health_connection: Documentation and template steps This commit brings the documentation missed for template and comments to help in the next step of apply a template to create an alarm. * health_connection: Restoring After some tests, it was detected that the alarms were not working as expected * health_connection: Fix bug and bring dimension to template This commit brings a fix for an old Netdata bug, before this the Netdata always tried to create a new entry in an index with the same id raising an error. It also brings the possibility to use 'foreach' in template * health_connection: Fix cmake compilation There was a problem with cmake compilation fixed by this commit * health_connection: shell script Finilize the shell script to test the PR * health_connection: Remove debug message During the development, I used some messages to understand the code this commit removes the last message * health_connection: Fix bugs This commits fix bugs reported by tests * health_connection: Alarm working This commit brings the necessary change for the alarms work, but it is missing the unlink from the newest list * health_connection: Template code written This commit finishes the creation of alarm from template, but it was not tested yet. * health_connection: Remove comments I am removing the comments from this PR to bring back late * health_connection: Remove lines Another commit to restore the files before they to be commented * health_connection: New alarm and remove messages I am bringing a new alarm to test template with SP and removing comments used during the development * health_connection: Functional test review After to review the functional test script, it was necessary to small adjust to test all the features available with the new version * health_connection: Free structure I am moving the free list for the correct place, the previous place was not safe * health_connection: ShellCheck This commit fixes the problems with shellcheck * health_connection: FIx hash This commit fix the hash calculation that was using wrong input * health_connection: Fix message error The system was showing a wronge message, because when we have foreach the alarm created with templated is added in a second stage to the index * health_connection: Fix documentation In this commit I am fixing the grammar of the previous doc and bringing two examples * health_connection: Fix examples This commit fix the last two examples that was brought in this PR * health_connection: Fix example doc When I brought the correct grammar in the last commit, I lost a mark * health_connection: Grammar fix Fixing grammar of the documentation * health_connection: Memory leak This commit fixes the memory leak that was present in the PR * health_connection: Reload This commit fix the problem that the alarms were not linked after to receive a SIGUSR2 * health_connection: False Positive from codacy Codacy was given a false positive, I changed the function to avoid it. * health_connection: dead code Remove dead code from the code. * health_connection: Memory Leak Remove memory leak when clean simple pattern * health_connection: Script format With this commit I am formatting the last message to return for the default color on terminal * health_connection: Script format 2 With this commit I am formatting the last message to return for the default color on terminal * health_connection: Script format 3 With this commit I am formatting the error message to return for the default color on terminal
2019-09-25check for curl to not get wrong error message (#6931)Timo
2019-09-17Cppcheck fixes (#6386)Andrew Clayton
* collector: cgroups: Fix a cppcheck warning Cppcheck was throwing the following warning in collectors/cgroups.plugin/cgroup-network.c [collectors/cgroups.plugin/cgroup-network.c:233]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? One of the arguments to switch_namespace() is 'const char *prefix', in this function we were checking if prefix was NULL and if so setting it (local scope wise) to "". While this wasn't technically incorrect in this context. It is also unnecessary as the prefix variable is only passed to the proc_pid_fd() function where the same check happens, so we can simply remove the offending line. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * tests/profile: Remove somewhat redundant code cppcheck was throwing a warning in benchmark-line-parsing.c [tests/profile/benchmark-line-parsing.c:648]: (warning) Unnecessary comparison of static strings, this comes from (void)strcmp("1", "2"); in main() That is amongst a group of three function calls preceded by the comment // cache functions But then test1() which uses strcmp() is called twice anyway with the timing result of just the second one used, so the dummy strcmp() call would seem superfluous. I would say the same is true for the call to strtoull() (void)strtoull("123", NULL, 0); as that is also used in test1(). I actually ran this benchmark with and without the calls to all three functions, i.e // cache functions (void)simple_hash2("hello world"); (void)strcmp("1", "2"); (void)strtoull("123", NULL, 0); With the above functions being called test1() average time = 7801604 test2() average time = 1333162 Without those three function calls test1() average time = 7779905 test2() average time = 1321438 Those are the averages of three runs. test1() uses strcmp() & strtoull() and test2() uses simple_hash2(), so in that run, not calling the three functions initially was actually quicker. Subsequent runs of each show similar numbers with each edging the other out, however the difference is in the noise. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
2019-09-03Fix clear notification missing (#6638)thiagoftsm
* alarm_clear: Mapping In this PR I mapped all the necessary steps to discover the solution for the ISSUE 6581 * alarm_clear: Documentation and fixes This commit fixes the problem that were present in Netdata and it also updates the documentation of the functions and Netdata. * alarm_clear: shell script The original implementation did not have a shell script, here I begin to fix this * alarm_clear: shell script It is necessay to verify why make is not producing the same binary than cmake and finish the changes in the script * alarm_clear: adjust in health.c I rewrote the health.c to be more readable, but I discovered the problem I had in the last few hours were due kernel update * alarm_clear: script changes In this commit I am bringing the final version of the script that test the alarm repetition * alarm_clear: script fix and remove comments IN this commit I am fixing the shellcheck errors and removing some debug messages that were present in the code while I was developing * alarm_clear: Format The health.c had wrong tabulation, this PR brings back the pattern of space as tab for this file * alarm_clear: Script The script was using killlall that is not more present in all Linux distribution this commit removes this and bring the new way to stop Netdata * alarm_clear: return to previous tabulation I am bringing back the old tabulation here and I will create a new PR exclusively for this * alarm_clear: Remove comments I am removing comments from this PR to keep the focus in the major problem * alarm_clear: Remove comments 2 I forgot one comment * alarm_clear: New variable I am appending a new variable in the check before the rebase, because the health.c changed in other file has a direct relationship with what I did here until now * alarm_clear: Fix clear repetition With this last commit, I am bringing a new way to raise the clear alarm, but it is not repeating more with this fix, it displayed one time when it is cleaned and it will display the message again, if and only if, the alarm was raised.
2019-08-15fix_compilation_test: Eliminate git messages (#6660)thiagoftsm
When it was the merge of different PRs related to web server, there was a garbage in the Makefile this PR removes this garbage
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-09netdata/packaging: Bare OS validations (#6574)Paul Emm. Katsoulakis
* netdata/packaging: complete the list of bare OS validations, to be extra sure all cases are covered * netdata/packaging: centos 6 has a different release file * netdata/ci: [ci skip] no centos 8 yet * netdata/ci: [ci skip] dont run for Debian 7 - its dead * trigger travis * netdata/ci: remove Debian 8 as bats not available with the standard repos - we will revisit our strategy on how we execute tests anyway