summaryrefslogtreecommitdiffstats
path: root/collectors/cgroups.plugin
AgeCommit message (Collapse)Author
2020-08-12Fix for ignored LXC containers (#9645)Vladimir Kobal
2020-07-02Fix a coverity defect (#9462)Vladimir Kobal
2020-07-01autodetects cgroupsv2 on systems with systemd (#9249)Timotej S
2020-06-30Show cgroups/containers ran by kubelet without access to kubernetes cluster ↵Chris Akritidis
information (#9321)
2020-06-10Ensures we get consistent kubernetes cgroup container names, regardless of ↵Chris Akritidis
whether netdata runs from within a kubernetes pod, or directly on the host machine. (#9303) Fixes #8044 Ensures we get consistent kubernetes cgroup container names, regardless of whether netdata runs from within a kubernetes pod, or directly on the host machine. Additional Information Fixes a bug that was originally fixed in #6885 and re-introduced in #7416. Fixes the seemingly non-functional selector in #7416
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-03-10Bulk add frontmatter to all documentation (#8354)Joel Hans
* Bulk add frontmatter * A few extra edge cases
2020-03-05Added ability to get pod name from cgroup with kubectl in bare metal ↵Chris Akritidis
deployment (#7416) * Ability to get pod name with kubectl in cgroup * added $KUBE_CONFIG variable * shellcheck disable=SC2086
2020-01-16Filter out lxc cgroups which are not useful (#7760)Vladimir Kobal
2019-12-02proc.plugin: add pressure stall information (#7209)Haochen Tong
* proc.plugin: add pressure stall information * dashboard_info: add "Pressure" section * proc.plugin: mention PSI collector in doc * dashboard_info: fix grammar in PSI section * proc_pressure: fix wrong line name for "full" metrics * proc_pressure: fix copypasta * proc_pressure: refactor to prepare for cgroup changes * cgroups.plugin: add pressure monitoring * add proc_pressure.h to targets * Makefile.am: fix indentation * cgroups.plugin: remove a useless comment * cgroups.plugin: fix pressure config name * proc.plugin: arrange pressure charts under corresponding sections * dashboard_info: rearrange pressure chart descriptions * dashboard_info: reword PSI descriptions
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-30cgroup-network-helper doesn't work on Proxmox 6 (#7037)Valery Kartel
Found that cgroup path does not contain 'emulator' subdirectory. - add a check for 'emulator' subdirectory - make 'c' variable contains full cgroup-path with 'cgroup.procs' filename
2019-09-18Get all k8s container names (#6885)Chris Akritidis
Fixes #6878 All containers in a kubernetes pod were not being resolved, as there was a hard-limit on the first item in `containerStatuses[]` Thanks to @majodev for the catch and the fix
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-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
2019-07-26Safer container names (#6441)Ian
* Allow building without pushing This enables easier local testing * Refactor fetching Docker container names to be safer Fixes #5680 * Wrap shell variable with quotes And change spaces to tabs * Make cgroup-name quieter * Make DOCKER_USR overridable * Update documentation to explain safe usage * Remove recommended image for docker socket proxy * Add capability to pass in a privileged GID * Fix some documentation typos * Update documentation to remove socket reference and clean up wording
2019-07-23Make use of GCC's __attribute__((unused)) (#6392)Andrew Clayton
* configure.ac: Add support for GCC's __attribute__((unused)) When compiling under GCC with -Wextra (along with -Wall) there are a lot of compiler warnings such as collectors/cgroups.plugin/cgroup-network.c:89:45: warning: unused parameter ‘scope’ [-Wunused-parameter] 89 | struct iface *read_proc_net_dev(const char *scope, const char *prefix) { | ~~~~~~~~~~~~^~~~~ Some arguments may be able to be got rid off, others won't. GCC (and at least clang[0]) provide an __attribute__((unused)) annotation that can be used on function parameters (also on variables, functions, labels, enums, structs etc) to inform the compiler of such and will squash warnings of the above nature. A check is added to configure.ac for the use of GCC (I believe $GCC will be set to 'yes' for clang also) and if found it creates __always_unused & __maybe_unused #define's set to __attribute__((unused)) otherwise it just sets them empty. If other compilers have a similar feature this check can be adjusted to accommodate them. The reason for the two defines is that some variables may always be unused in a function, others may or may not depending on #ifdef's for example. So we are able to document both cases. Subsequent commits will start making use of these to squash such compiler warnings. [0]: https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * collectors/statsd.plugin: Mark a function argument as __maybe_unused In collectors/statsd.plugin/statsd.c the app function argument to STATSD_APP_CHART_DIM() might be unused if NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's used in from libnetdata/log/log.h will be defined to a dummy function where none of the arguments are used. This fixes a compiler warning [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * collectors/apps.plugin: Mark a function argument as __maybe_unused In collectors/apps.plugin/apps_plugin.c the function debug_print_process_tree() takes an argument 'msg' that might be unused if NETDATA_INTERNAL_CHECKS is not defined, then debug_log() will be set to a dummy function that takes no arguments. This fixes a compiler warning [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * libnetdata/locks/locks: Mark function arguments as __maybe_unused In libnetdata/locks/locks.c there a number of functions that take arguments 'file', 'function' & 'line' that might be unused if NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's used in from libnetdata/log/log.h will be defined to a dummy function where none of the arguments are used. This fixes compiler warnings [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * libnetdata/socket/security: Mark a function argument as __maybe_unused In libnetdata/socket/security.c the function security_info_callback() takes an argument 'ret' that might be unused if NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's used in from libnetdata/log/log.h will be defined to a dummy function where none of the arguments are used. This fixes a compiler warning [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * collectors/cgroups.plugin: Mark a function argument as __maybe_unused In collectors/cgroups.plugin/cgroup-network.c the function read_proc_net_dev() takes an argument 'scope' that might be unused if the NETDATA_INTERNAL_CHECKS is not defined. This fixes a compiler warning [-Wunused-parameter] when compiling with -Wextra *and* -Wall". Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * database/rrddim: Mark function arguments as __maybe_unused In database/rrddim.c there a couple of functions that take a 'st' argument that might be unused if NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's used in from libnetdata/log/log.h will be defined to a dummy function where none of the arguments are used. This fixes compiler warnings [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net> * database/rrdvar: Mark a function argument as __maybe_unused In database/rrdvar.c the function rrdvar_create_and_index() take an argument 'scope' that might be unused if NETDATA_INTERNAL_CHECKS is not defined, then the debug() macro that it's used in from libnetdata/log/log.h will be defined to a dummy function where none of the arguments are used. This fixes a compiler warning [-Wunused-parameter] when compiling with -Wextra *and* -Wall. Signed-off-by: Andrew Clayton <andrew@zeta.digital-domain.net>
2019-07-12Add global configuration option for zero metrics (#6419)Vladimir Kobal
* Add global configuration option for zero metrics * Add the option to the cgroup plugin * Add the option to the proc plugin (diskstats, meminfo, net_dev, netstat, sctp_snmp, snmp, snmp6, sockstat, sockstat6, synproxy, vmstat, system_edac_mc, system_node, btrfs, ksm, zfs) * Add the option to the macos plugin * Add the option to the freebsd plugin (devstat, getifaddrs, getmntinfo, sysctl) * Change the option behaviour with the 'auto' value * Add the option to the tc plugin * Update the documentation
2019-06-20Update the documentation on charts with zero metrics (#6314)Vladimir Kobal
2019-06-04Increase the cpu_limit chart precision (#6172)Vladimir Kobal
2019-05-10Implement unified cgroup cpu limit (#5895)skrzyp1
* WiP unified cgroup support * add cpu usage support and disk iops support * memory limits * WIP working memory charts * detailed memory chart * docs change * cpu limit function * review changes
2019-04-17netdata/collectors/cgroups.plugin: When jq not available, prompt the user he ↵Paul Emm. Katsoulakis
may have to install jq (#5848) * netdata/collectors/cgroups.plugin: When jq not available, pop a warning to let the user know he might have to install jq. We still support him with alternative way of retrieving the docker name, but there may be cases the user prefers the API approach * netdata/collectors/cgroups.plugin: Missed one more jq call to handle
2019-04-09unified cgroup support (#5407)skrzyp1
* WiP unified cgroup support * add cpu usage support and disk iops support * memory limits * WIP working memory charts * detailed memory chart * docs change
2019-03-25add 'containers priority' option to cgroups plugin (#5700)Ilya Mashchenko
* add 'containers priority' option to cgroups plugin * rename var to cgroup_containers_chart_priority * minor
2019-03-13When running from within a k8s pod, use the k8s API to get the cgroup name ↵Chris Akritidis
(#5576) * When running from within a k8s pod, use the k8s API to get the pod name * Check the last part of an underscore-delimited or slash-delimited container id * Add a docker image builder that adds a single image to a user-specified registry, for use in k8s * When running in k8s, disable cgroups that the pod API does not return * Use longer name for k8s containers * Add reference to build-test.sh to packaging/docker/README.md * Anonymous statistics should not break when /proc/1/sched is not available
2019-03-12Use total_* memory counters for cgroups (#5592)Vladimir Kobal
2019-03-12Fix a bug in cgroups renaming (#5612)Vladimir Kobal
2019-03-09Delay renaming for docker containers (#5557)Vladimir Kobal
Fixes #5512 * Delay cgroup renaming * Restrict renaming delay to problematic containers only * Use pending_renames instead of needs_renaming * Use an exit code instead of a parameter
2019-03-05Minor fixes around plugin_directories initialization (#5536)Paul Katsoulakis
* Daemon minor cleanups: 1) pull in plugin directories logic, inside the pluginsd where it belongs and call a method from the daemon to do so, 2) Magic numbers are evil, give a meaningful definition for that plugin directories retrieval * Rename netdata_configured_plugins_dir -> netdata_configured_primary_plugins_dir. We allow multiple plugin directories and this is actually the primary (or stock?) directory, just make it clear to avoid confusion * In this new wrapper, just return whatever the string splitter would return * Reduce the scope - consider moving this to somewhere else in a common place if needed by other modules later
2019-02-21Fix SEGV by removing free of vars of charts that do not exist (#5455)Chris Akritidis
2019-02-21Fix Coverity defects (#5394)Vladimir Kobal
* Fix Checked Return issue * Fix Unintended Integer Division issue
2019-02-18remove redudant pipes (#5417)Costa Tsaousis
2019-02-18use netnsid for detecting cgroup networks; fixes #5383 (#5413)Costa Tsaousis
2019-02-11Add cgroup cpu and memory limits and alarms (#5172)Vladimir Kobal
* Add memory limit variables * Add memory usage alarms * Add CPU limit variables * Add cpu usage alarm * Fix quota calculation, minor cleanup * Update the documentation * Add charts with limits * Fix Codacy issues * Change units for the mem_usage_limit chart * Change the behaviour of the cpu_limit chart
2019-02-07Fix cgroups Codacy issue (#5340)Vladimir Kobal
* Fix cgroups Codacy issue * Fix codacy issue
2019-01-30Minor updates to anonymous statistics (#5295)Chris Akritidis
2019-01-27Anonymous statistics (#5113)Chris Akritidis
* Added shell and dashboard anonymous statistics * Check for environment var NETDATA_REGISTRY_UNIQUE_ID * Fix indentation * Removed health-cmdapi-test * docs/anonymous-statistics.md
2019-01-14Lint cgroup name.sh.in (#5162)Paweł Krupa
* lint cgroup-name.sh script * run automatic shfmt linter
2018-12-30Add systemd pattern list parameter to the documentation (#5077)Vladimir Kobal
* Add systemd pattern list parameter to the documentation * Remove newline in code fragment
2018-12-17Update cgroup-name.sh.in (#4991)Nate
get the container name on ECS
2018-12-17Make units compliant with IEC standard (#4985)Vladimir Kobal
* Change GB to GiB * Change MB to MiB in apps.plugin * Change MB to MiB in cgroups.plugin * Change MB to MiB in freebsd.plugin and macos.plugin * Change MB to MiB in proc.plugin * Change KB to KiB * Change kB to KiB for divisor 1024 * Fix units for memory.failcnt * Fix other units * Change CPU time percentage * Change kilobytes to KiB in apps.plugin * Small fixes
2018-12-07Ga (#4938)Chris Akritidis
* Added GA tags to markdowns * Add GA tags to mds
2018-11-22Documentation links sanity checker (#4701)Chris Akritidis
* Fix broken links * Fixed link * Added links checker * link updates from the link checker * Final corrections to allow checklinks to run without errors * Removed whitespace * Fixed codacy errors/warnings
2018-11-16Updates in various READMEs while testing the link checker (#4671)Chris Akritidis
* Add checklinks.sh to validate links in MD files and fix them for both the repo and html static site * Add checklinks.sh to validate links in MD files and fix them for both the repo and html static site * Minor link fixes, based on output from the linkchecker * About 50% done * Converted absolute links to relative * Close to being functional... * Getting closer... * Corrected edit files link from htmldoc branch to master * Replaced absolute links with relative and fixed incorrect heading hierarchy * Seems to be working. Will do all wiki conversions and then commit the final version * Wiki links replaced by the link checker for test * Replacement work fine, but correct location for simple patterns has moved to libnetdata/simple_pattern * Corrected wiki links in READMEs, but most are in code files * More simple pattern link replacements * Want to merge current changes first and then continue with the link checker * Add checklinks.sh to validate links in MD files and fix them for both the repo and html static site * Minor link fixes, based on output from the linkchecker * About 50% done * Converted absolute links to relative * Close to being functional... * Getting closer... * Corrected edit files link from htmldoc branch to master * Replaced absolute links with relative and fixed incorrect heading hierarchy * Seems to be working. Will do all wiki conversions and then commit the final version * Wiki links replaced by the link checker for test * Replacement work fine, but correct location for simple patterns has moved to libnetdata/simple_pattern * Corrected wiki links in READMEs, but most are in code files * More simple pattern link replacements * Want to merge current changes first and then continue with the link checker * ./# converted to #
2018-10-23modularize the query api (#4443)Costa Tsaousis
* 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
2018-10-18moved related wiki pages into the repo (#4428)Costa Tsaousis
* moved related wiki pages into the repo * updated web server docs * fixed typos
2018-10-15modularized all source code (#4391)Costa Tsaousis
* modularized all external plugins * added README.md in plugins * fixed title * fixed typo * relative link to external plugins * external plugins configuration README * added plugins link * remove plugins link * plugin names are links * added links to external plugins * removed unecessary spacing * list to table * added language * fixed typo * list to table on internal plugins * added more documentation to internal plugins * moved python, node, and bash code and configs into the external plugins * added statsd README * fix bug with corrupting config.h every 2nd compilation * moved all config files together with their code * more documentation * diskspace info * fixed broken links in apps.plugin * added backends docs * updated plugins readme * move nc-backend.sh to backends * created daemon directory * moved all code outside src/ * fixed readme identation * renamed plugins.d.plugin to plugins.d * updated readme * removed linux- from linux plugins * updated readme * updated readme * updated readme * updated readme * updated readme * updated readme * fixed README.md links * fixed netdata tree links * updated codacy, codeclimate and lgtm excluded paths * update CMakeLists.txt * updated automake options at top directory * libnetdata slit into directories * updated READMEs * updated READMEs * updated ARL docs * updated ARL docs * moved /plugins to /collectors * moved all external plugins outside plugins.d * updated codacy, codeclimate, lgtm * updated README * updated url * updated readme * updated readme * updated readme * updated readme * moved api and web into webserver * web/api web/gui web/server * modularized webserver * removed web/gui/version.txt