Tom Buck 3fdf18dcb6 add support for am2320 sensor (#7024) 5 years ago
..
apps.plugin e2d151d592 Fix CPU charts in apps plugin on FreeBSD (#7115) 5 years ago
cgroups.plugin a3a46cb6d5 Get all k8s container names (#6885) 5 years ago
charts.d.plugin 2cd5f08007 Remove Dollar sign from Bash code in documentation and fix remark-lint warnings (#6880) 5 years ago
checks.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
cups.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
diskspace.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
fping.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
freebsd.plugin e1309c2cf3 Add VMware VMXNET3 driver to the default interafaces list (#7109) 5 years ago
freeipmi.plugin 2d248dfa22 fix(freeipmi): Update frequency config check (#7078) 5 years ago
idlejitter.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
ioping.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
macos.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
nfacct.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
node.d.plugin 344d3ed9c3 Improve documentation for the SNMP collector (#6915) 5 years ago
perf.plugin f5006d51e8 Fix Markdown Lint warnings (#6664) 5 years ago
plugins.d 7ff016ea74 feat(reaper): Add process reaper support (#7059) 5 years ago
proc.plugin 0b7ba99b5e [collector/proc.plugin] Add /proc/pagetypeinfo parser (#6843) 5 years ago
python.d.plugin 3fdf18dcb6 add support for am2320 sensor (#7024) 5 years ago
slabinfo.plugin 9370833598 Disable slabinfo plugin by default (#7056) 5 years ago
statsd.plugin 8ee605861c Fix segmentation fault in FreeBSD (#7102) 5 years ago
tc.plugin 7ff016ea74 feat(reaper): Add process reaper support (#7059) 5 years ago
xenstat.plugin 31116639d6 xenstat.plugin: check xenstat_vbd_error presence (#7103) 5 years ago
Makefile.am 0942680f85 Collector slabinfo (#6800) 5 years ago
README.md 0942680f85 Collector slabinfo (#6800) 5 years ago
all.h 0b7ba99b5e [collector/proc.plugin] Add /proc/pagetypeinfo parser (#6843) 5 years ago

README.md

Data collection plugins

Netdata supports internal and external data collection plugins:

  • internal plugins are written in C and run as threads inside the netdata` daemon.

  • external plugins may be written in any computer language and are spawn as independent long-running processes by the netdata daemon. They communicate with the netdata daemon via pipes (stdout communication).

To minimize the number of processes spawn for data collection, Netdata also supports plugin orchestrators.

  • plugin orchestrators are external plugins that do not collect any data by themeselves. Instead they support data collection modules written in the language of the orchestrator. Usually the orchestrator provides a higher level abstraction, making it ideal for writing new data collection modules with the minimum of code.

    Currently Netdata provides plugin orchestrators BASH v4+ charts.d.plugin, node.js node.d.plugin and python v2+ (including v3) python.d.plugin.

Netdata Plugins

plugin lang O/S runs as modular description
apps.plugin C linux, freebsd external - monitors the whole process tree on Linux and FreeBSD and breaks down system resource usage by process, user and user group.
cgroups.plugin C linux internal - collects resource usage of Containers, libvirt VMs and systemd services, on Linux systems
charts.d.plugin BASH v4+ any external yes a plugin orchestrator for data collection modules written in BASH v4+.
checks.plugin C any internal - a debugging plugin (by default it is disabled)
cups.plugin C any external - monitors CUPS
diskspace.plugin C linux internal - collects disk space usage metrics on Linux mount points
fping.plugin C any external - measures network latency, jitter and packet loss between the monitored node and any number of remote network end points.
ioping.plugin C any external - measures disk read/write latency.
freebsd.plugin C freebsd internal yes collects resource usage and performance data on FreeBSD systems
freeipmi.plugin C linux, freebsd external - collects metrics from enterprise hardware sensors, on Linux and FreeBSD servers.
idlejitter.plugin C any internal - measures CPU latency and jitter on all operating systems
macos.plugin C macos internal yes collects resource usage and performance data on MacOS systems
nfacct.plugin C linux external - collects netfilter firewall, connection tracker and accounting metrics using libmnl and libnetfilter_acct
xenstat.plugin C linux external - collects XenServer and XCP-ng metrics using libxenstat
perf.plugin C linux external - collects CPU performance metrics using performance monitoring units (PMU).
node.d.plugin node.js any external yes a plugin orchestrator for data collection modules written in node.js.
plugins.d C any internal - implements the external plugins API and serves external plugins
proc.plugin C linux internal yes collects resource usage and performance data on Linux systems
python.d.plugin python v2+ any external yes a plugin orchestrator for data collection modules written in python v2 or v3 (both are supported).
slabinfo.plugin C linux external - collects kernel SLAB details on Linux systems
statsd.plugin C any internal - implements a high performance statsd server for Netdata
tc.plugin C linux internal - collects traffic QoS metrics (tc) of Linux network interfaces

Enabling and Disabling plugins

Each plugin can be enabled or disabled via netdata.conf, section [plugins].

At this section there a list of all the plugins with a boolean setting to enable them or disable them.

The exception is statsd.plugin that has its own [statsd] section.

Once a plugin is enabled, consult the page of each plugin for additional configuration options.

All external plugins are managed by plugins.d, which provides additional management options.

Internal Plugins

Each of the internal plugins runs as a thread inside the netdata daemon. Once this thread has started, the plugin may spawn additional threads according to its design.

Internal Plugins API

The internal data collection API consists of the following calls:

collect_data() {
    // collect data here (one iteration)

    collected_number collected_value = collect_a_value();

    // give the metrics to Netdata

    static RRDSET *st = NULL; // the chart
    static RRDDIM *rd = NULL; // a dimension attached to this chart

    if(unlikely(!st)) {
        // we haven't created this chart before
        // create it now
        st = rrdset_create_localhost(
                "type"
                , "id"
                , "name"
                , "family"
                , "context"
                , "Chart Title"
                , "units"
                , "plugin-name"
                , "module-name"
                , priority
                , update_every
                , chart_type
        );

        // attach a metric to it
        rd = rrddim_add(st, "id", "name", multiplier, divider, algorithm);
    }
    else {
        // this chart is already created
        // let Netdata know we start a new iteration on it
        rrdset_next(st);
    }

    // give the collected value(s) to the chart
    rrddim_set_by_pointer(st, rd, collected_value);

    // signal Netdata we are done with this iteration
    rrdset_done(st);
}

Of course, Netdata has a lot of libraries to help you also in collecting the metrics. The best way to find your way through this, is to examine what other similar plugins do.

External Plugins

External plugins use the API and are managed by plugins.d.

[analytics](<>)