0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-14 17:48:37 +00:00
netdata_netdata/collectors
thiagoftsm 2f7962c9e1 Fix parsing SSL ACL along with others ()
* sslstream: ACL parser

It was noticed in the issue 6457 that the some ACLs were not parsing
correctly when they were along SSL acl, this commit fixes this'

* sslstream: remove comments

This commit removes the comments that were present while I was testing the code

* sslstream: Tests

This commit adds ACL tests to check the Netdata response to them

* sslstream: Tests

Fix the extension to upload the files

* sslstream: more tests

In this commit I am bringing more tests, including the ssl tests'

* sslstream: leading space

Remove leading space from variable that was creating problem with shellcheck

* sslstream: glob

Remove special character from script

* sslstream: Makefile

The Makefile diretives were pointed to wrong files

* sslstream: Missing stream encrypt

This commit solves the problem of the stream not be encrypted, but
it is not the final solution, because the parser made is incomplete.

* sslstream: Finish encrypt channel

This commit brings the step that I was missing, the complete encryptation
in the communication between Master and Slave

* sslstream: Fix argument in script

After the latest tests, it was verified that two arguments given to a function
inside the script were not correct, with this PR I am fixing this!

* sslstream: Fix argument in info

Instead to call a function to deliver an integer I was passing a size_t value.
Only cmake showed this, but not in my clion! :/

* sslstream: Fix redirect

When we were having different SSL configuration, the system were not applying
the option for all

* sslstream: Update documentation

Our documentation was not clear about the rules according our code
so I am updating the text to explain for the users

* sslstream: Adjust script

With this last commit, I am adjusting the tests to avoid false positive

* sslstream: Missing elif

The previous commit had a missing elif in the shell script

* sslstream: Split ports

Before this commit Netdata was having SSL as a global option, now it has as a real ACL.

* sslstream: reduce context

The stream variable will not be affected in the master side, it is only necessary
on the slave side, so I am reducing the context of it

* sslstream: Force SSL

When the user has certificate and he does not set any SSL flag, it is necessary
to append the SSL=force flag

* sslstream: Default flag

It is necessary to have a default flag when the SSL flags are not SET

* sslstream: remove comments

Remove comments from the scrip

* sslstream: moving flag

It is better the flag to be set inside socket instead everytime there is a new connection

* sslstream: documentation

Fix a sentence in the web/server/README.md
2019-07-25 18:43:04 +02:00
..
apps.plugin Make use of GCC's __attribute__((unused)) () 2019-07-23 14:12:41 +02:00
cgroups.plugin Make use of GCC's __attribute__((unused)) () 2019-07-23 14:12:41 +02:00
charts.d.plugin Pass correct info to run funct. () 2019-05-28 18:25:18 +02:00
checks.plugin Ga () 2018-12-07 11:30:04 +01:00
cups.plugin cups.plugin: Support older versions () 2019-02-11 10:40:16 +01:00
diskspace.plugin Add a statement about permissions for the diskspace plugin () 2019-07-17 11:26:11 +03:00
fping.plugin Update fping version () 2019-03-27 13:47:25 +02:00
freebsd.plugin Add global configuration option for zero metrics () 2019-07-12 15:45:35 +03:00
freeipmi.plugin [freeipmi] Remove id in sensor name when already unique () 2019-06-20 21:38:20 +03:00
idlejitter.plugin Ga () 2018-12-07 11:30:04 +01:00
ioping.plugin Add ioping plugin () 2019-04-23 14:20:00 +03:00
macos.plugin Add global configuration option for zero metrics () 2019-07-12 15:45:35 +03:00
nfacct.plugin Fix typo in nfacct.plugin () 2019-06-13 20:39:47 +03:00
node.d.plugin Remove codacy warnings from sma_webbox () 2019-02-05 13:25:43 +01:00
perf.plugin Perf plugin () 2019-06-20 15:23:29 +03:00
plugins.d Fix parsing SSL ACL along with others () 2019-07-25 18:43:04 +02:00
proc.plugin Add global configuration option for zero metrics () 2019-07-12 15:45:35 +03:00
python.d.plugin smartd_log: Disk __eq__ fix () 2019-07-25 11:43:28 +03:00
statsd.plugin Make use of GCC's __attribute__((unused)) () 2019-07-23 14:12:41 +02:00
tc.plugin Add global configuration option for zero metrics () 2019-07-12 15:45:35 +03:00
xenstat.plugin Add xenstat plugin () 2019-03-27 11:19:24 +02:00
all.h Revert "Add ZRAM collector module to the proc plugin" 2019-07-09 15:20:58 +02:00
Makefile.am Perf plugin () 2019-06-20 15:23:29 +03:00
README.md Perf plugin () 2019-06-20 15:23:29 +03:00

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).
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