This PR was created to fix#3414, here I am completing the job initiated by Christopher, among the newest features that we are bring we have
JSON inside the core - We are bringing to the core the capacity to work with JSON files, this is available either using the JSON-C library case it is present in the system or using JSMN library that was incorporated to our core. The preference is to have JSON-C, because it is a more complete library, but case the user does not have the library installed we are keeping the JSMN for we do not lose the feature.
Health LIST - We are bringing more one command to the Health API, now with the LIST it is possible to get in JSON format the alarms active with Netdata.
Health reorganized - Previously we had duplicated code in different files, this PR is fixing this (Thanks @cakrit !), the Health is now better organized.
Removing memory leak - The first implementation of the json.c was creating SILENCERS without to link it in anywhere. Now it has been linked properly.
Script updated - We are bringing some changes to the script that tests the Health.
This PR also fixes the race condition created by the previous new position of the SILENCERS creation, I had to move it to daemon/main.c, because after various tests, it was confirmed that the error could happen in different parts of the code, case it was not initialized before the threads starts.
Component Name
health directory
health-cmd
Additional Information
Fixes#6356 and #3414
* Add perf plugin skeleton
* Initialize events
* Collect data
* Configure default counters
* Add charts for hardware and software counters
* Add charts for cache counters
* Don't show zeroes for non-existent metrics
* Reinit events when stalled
* Do not reinit disabled events
* Update the documentation
* Scale values when multiplexing is happening
* Optimize memory footprint of DB engine
* Update documentation with the new memory requirements of dbengine
* Fixed code style
* Fix code style
* Fix compile error
* Database engine prototype version 0
* Database engine initial integration with netdata POC
* Scalable database engine with file and memory management.
* Database engine integration with netdata
* Added MIN MAX definitions to fix alpine build of travis CI
* Bugfix for backends and new DB engine, remove useless rrdset_time2slot() calls and erroneous checks
* DB engine disk protocol correction
* Moved DB engine storage file location to /var/cache/netdata/{host}/dbengine
* Fix configure to require openSSL for DB engine
* Fix netdata daemon health not holding read lock when iterating chart dimensions
* Optimized query API for new DB engine and old netdata DB fallback code-path
* netdata database internal query API improvements and cleanup
* Bugfix for DB engine queries returning empty values
* Added netdata internal check for data queries for old and new DB
* Added statistics to DB engine and fixed memory corruption bug
* Added preliminary charts for DB engine statistics
* Changed DB engine ratio statistics to incremental
* Added netdata statistics charts for DB engine internal statistics
* Fix for netdata not compiling successfully when missing dbengine dependencies
* Added DB engine functional test to netdata unittest command parameter
* Implemented DB engine dataset generator based on example.random chart
* Fix build error in CI
* Support older versions of libuv1
* Fixes segmentation fault when using multiple DB engine instances concurrently
* Fix memory corruption bug
* Fixed createdataset advanced option not exiting
* Fix for DB engine not working on FreeBSD
* Support FreeBSD library paths of new dependencies
* Workaround for unsupported O_DIRECT in OS X
* Fix unittest crashing during cleanup
* Disable DB engine FS caching in Apple OS X since O_DIRECT is not available
* Fix segfault when unittest and DB engine dataset generator don't have permissions to create temporary host
* Modified DB engine dataset generator to create multiple files
* Toned down overzealous page cache prefetcher
* Reduce internal memory fragmentation for page-cache data pages
* Added documentation describing the DB engine
* Documentation bugfixes
* Fixed unit tests compilation errors since last rebase
* Added note to back-up the DB engine files in documentation
* Added codacy fix.
* Support old gcc versions for atomic counters in DB engine
* Add Kinesis backend
* Separate config file
* Send data in chunks
* Fix minor issues
* Add error handling
* Use existing JSON functions
* Do not retry on send failure
* Implement building with autotools
* Implement building with CMake
* Fix CMake variables
* Fix build when C++ compiler is not available
* Add checks for C++11
* Don't reinitialize API
* Don't reinitialize client
* Minor cleanup
* Fix Codacy warning
* Separate sending records and receiving results
* Add documentation
* Make connection timeout configurable
* Fix operation metrics
* Fix typo
* Change parameter names for credentials
* Allow using the default SDK credentials configuration
* Add xenstat plugin
* Add basic domain charts
* Initialize xl context
* Use domain UUID instead of name
* Make charts obsolete
* Add tmem charts
* Change algorithm for tmem puts and gets
* Add VCPU charts
* Minor formatting for sending charts functions
* Add VBD charts
* Add network charts
* Assemble VCPU metrics in one chart
* Fix chart names
* Make write/sent dimensions negative
* Minor formatting
* Change id and context for domain charts
* Add dashboard info
* Get rid of global variables
* Free libxenstat and libxl resourses
* Free domain_metrics on VM shutdown
* Add domain state chart
* Add debug messages
* Add branch prediction hints
* Minor fix
* Fix chart obsoleting
* Make names more general
* Fix CMake build of nfacct.plugin
* Prepare build configuration
* Prepare plugin for separating
* Add command line options
* Add debug messages
* Use text API
* Minor fixes
* Update the documentation
* Minor documentation formatting
* Fix LGTM alerts
* Fix building with CMake
* Add nfacct and cups plugins to apps.plugin groups
##### Summary
fixes#2673fixes#2149fixes#5017fixes#3830fixes#3187fixes#5154
Implements a command API for health which will accept commands via a socket to selectively suppress health checks.
Allows different ports to accept different request types (streaming, dashboard, api, registry, netdata.conf, badges, management)
Removes support for multi-threaded and single-threaded web servers.
##### Component Name
health, daemon
* Add power supply module
* Use linked list
* Add charts for all properties
* Organize charts menu
* Fix line endings
* Keep files open
* Add options for chart disabling
* Final cleanup
* Add documentation, disable python module
* Fix file attributes
* Mark python module as obsolete
* Allow symbolic links to power source directories
* optimized ses and added des
* added coefficient of variation
* fix bug identified by @vlvkobal: use all available points when resampling is required and the timeframe is not enough for a single point
* modularized exporters
* modularized API data queries
* optimized queries
* modularized API data reduction methods
* modularized api queries
* added new directories in makefiles
* added median db query
* moved all RRDR_GROUPING related to query.h
* added stddev query
* operational median and stddev
* working simple exponential smoothing
* too complex to do it right
* fixed ses
* fixed ses
* rewrote query engine
* fix double-exponential-smoothing
* cleanup
* fixed bug identified by @vlvkobal at rrdset_first_slot()
* enable freeipmi on systems with libipmimonitoring; #4440
* modularize cgroups and cmake; #4339
* modularized freeipmi.plugin
* added comment about referencing parent files
* modularized apps.plugin
* modularized proc and diskspace
* minor fixes
* modularized plugins: checks, freebsd, idlejitter, nfacct, tc, macos, plugins.d
* minor fixes 2
* modularized statsd
* modularized cgroup-network
* moved cgroup-network-helper.sh and cgroup-name.sh to cgroup.plugin
* modularized health plugin
* move rrd related info to rrd.h
* added libnetdata
* do not corrupt config.h
* use dir-objects instead of static libraries
* fixed cmake for new structure
* use absolute paths to fix LGTM
* enable automake subdir-objects and prettify its output
* use relative files at the src directory for all plugins
* fix compiler warning
* synced automake and cmake
* added config.h to cmake
* abstracted basic os functions in libnetdata/os
* fix zfs_common
* removed apps.plugin dependency on freebsd plugin
* health removed from plugins
* modularized the registry
* modularized the rest of it
* include streaming files in cmake
* use libnetdata as library
* enable silent-rules only when they are available
* makefiles install configs in /usr/lib/netdata/conf.d; #4182
* stock health config in /usr/lib/netdata/conf.d/health.d
* unit test path concatenation
* simplified health file management
* use stream.conf from stock config if it does not exist in /etc/netdata
* indicate loading of user config in function call
* load netdata.conf from stock dir if not found in /etc/netdata
* added NETDATA_USER_CONFIG_DIR
* provide defaults before loading config
* charts.d uses stock files
* fping now uses the stock config files
* tc-qos-helper.sh now uses stock configs
* cgroup-name.sh now uses stock configs too
* simplified cgroup-name.sh for user and stock config
* alarm-notify.sh uses stock configs too
* simplified fping plugin configs loading
* simplified tc-qos-helper.sh configs loading
* added error handling to charts.d.plugin
* apps.plugin used stock configs
* generalized recursive double-directory configs loading
* statsd uses stock configs
* node.d.plugin uses stock configs
* compile-time decision of netdata default paths for all files
* makeself cleans up old stock config files from user configuration directories
* fixed makeself typo
* netdata-installer.sh removes stock files from user configuration directories
* python.d.plugin user/stock configs update
* cleanup stock config files from /etc/netdata, only once
* python.d.plugin log loaded files
* fix permissions of stock config files and provide an "orig" link for quick access
* create help link on stock configs migration for static installations
* create user config directories
* example statsd synthetic charts now state they are examples
* updated configs.signatures
* spec file
* fixes in spec file
* fix typo
* install netdata after cleaning up stock configs from /etc/netdata
* python.d: add cpuidle stock conf
* c code cleanup; eliminate all errors and warning under clion
* removed old server API
* removed obsolete "file" API command
* included common.h everywhere
* fix for github syntax highlighting
* enable CLion to build all netdata binaries
* added locks verification to cmake