0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-16 18:37:50 +00:00
netdata_netdata/aclk
vkalintiris 2d5f3acf71
Do not force internal collectors to call rrdset_next. ()
* Remove calls to rrdset_next().

* Rm checks plugin

* Update documentantion

* Call rrdset_next from within rrdset_done

This wraps up the removal of rrdset_next from internal collectors, which
removes a lot of unecessary code and the need for if/else clauses in
every place.

The pluginsd parser is the only component that calls rrdset_next*()
functions because it's not strictly speaking a collector but more of a
collector manager/proxy.

With the current changes it's possible to simplify the API we expose
from RRD significantly, but this will be follow-up work in the future.

* Remove stale reference to checks.plugin

* Fix RRD unit test

rrdset_next is not meant to be called from these tests.

* Fix db engine unit test.

* Schedule rrdset_next when we have completed at least one collection.

* Mark chart creation clauses as unlikely.

* Add missing brace to fix FreeBSD plugin.
2022-11-22 04:52:15 +02:00
..
aclk-schemas@3252118bd5 Rrdcontext () 2022-07-24 22:33:09 +03:00
helpers Inject costallocz to mqtt_websockets library and its children () 2022-10-17 17:12:56 +02:00
schema-wrappers Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk.c Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk.h Remove option to use MQTT 3 () 2022-10-28 14:36:12 +02:00
aclk_alarm_api.c Remove option to use MQTT 3 () 2022-10-28 14:36:12 +02:00
aclk_alarm_api.h Adds new alarm status protocol messages () 2021-10-15 12:48:03 +02:00
aclk_capas.c Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk_capas.h Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk_contexts_api.c Remove Chart/Dim based communication () 2022-09-27 18:31:24 +02:00
aclk_contexts_api.h Remove Chart/Dim based communication () 2022-09-27 18:31:24 +02:00
aclk_otp.c fix warning when -Wfree-nonheap-object is used () 2022-10-11 14:01:04 +02:00
aclk_otp.h Remove warnings when openssl 3 is used. () 2022-06-30 07:11:23 +00:00
aclk_proxy.c Allows ACLK NG and Legacy to coexist () 2021-06-14 10:38:58 +02:00
aclk_proxy.h Allows ACLK NG and Legacy to coexist () 2021-06-14 10:38:58 +02:00
aclk_query.c minor - silence misleading error () 2022-11-18 14:24:57 +02:00
aclk_query.h minor - silence misleading error () 2022-11-18 14:24:57 +02:00
aclk_query_queue.c Remove option to use MQTT 3 () 2022-10-28 14:36:12 +02:00
aclk_query_queue.h Revert "Query queue only for queries" () 2022-07-28 23:59:32 +03:00
aclk_rrdhost_state.h Removes Legacy JSON Cloud Protocol Support In Agent () 2022-06-27 16:03:20 +02:00
aclk_rx_msgs.c Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk_rx_msgs.h Better ACLK debug communication log () 2022-07-08 10:33:43 +02:00
aclk_stats.c Do not force internal collectors to call rrdset_next. () 2022-11-22 04:52:15 +02:00
aclk_stats.h Revert "Query queue only for queries" () 2022-07-28 23:59:32 +03:00
aclk_tx_msgs.c Add 'funcs' capability () 2022-11-15 23:05:33 +02:00
aclk_tx_msgs.h Removes Legacy JSON Cloud Protocol Support In Agent () 2022-06-27 16:03:20 +02:00
aclk_util.c Remove aclk_api.[ch] () 2022-08-24 10:41:14 +02:00
aclk_util.h Rrdcontext () 2022-07-24 22:33:09 +03:00
https_client.c Fix compilation warnings on macOS () 2022-02-21 12:23:48 +02:00
https_client.h implements ACLK env endpoint () 2021-04-19 17:52:40 +02:00
README.md Remove option to use MQTT 3 () 2022-10-28 14:36:12 +02:00

Agent-cloud link (ACLK)

The Agent-Cloud link (ACLK) is the mechanism responsible for securely connecting a Netdata Agent to your web browser through Netdata Cloud. The ACLK establishes an outgoing secure WebSocket (WSS) connection to Netdata Cloud on port 443. The ACLK is encrypted, safe, and is only established if you connect your node.

The Cloud App lives at app.netdata.cloud which currently resolves to the following list of IPs:

  • 54.198.178.11
  • 44.207.131.212
  • 44.196.50.41

:::caution

This list of IPs can change without notice, we strongly advise you to whitelist following domains api.netdata.cloud, mqtt.netdata.cloud, if this is not an option in your case always verify the current domain resolution (e.g via the host command).

:::

For a guide to connecting a node using the ACLK, plus additional troubleshooting and reference information, read our get started with Cloud guide or the full connect to Cloud documentation.

Data privacy

Data privacy is very important to us. We firmly believe that your data belongs to you. This is why we don't store any metric data in Netdata Cloud.

All the data that you see in the web browser when using Netdata Cloud, is actually streamed directly from the Netdata Agent to the Netdata Cloud dashboard. The data passes through our systems, but it isn't stored.

However, to be able to offer the stunning visualizations and advanced functionality of Netdata Cloud, it does store a limited number of metadata.

Read more about Data privacy in the Netdata Cloud in the documentation.

Enable and configure the ACLK

The ACLK is enabled by default, with its settings automatically configured and stored in the Agent's memory. No file is created at /var/lib/netdata/cloud.d/cloud.conf until you either connect a node or create it yourself. The default configuration uses two settings:

[global]
  enabled = yes
  cloud base url = https://api.netdata.cloud

If your Agent needs to use a proxy to access the internet, you must set up a proxy for connecting to cloud.

You can configure following keys in the netdata.conf section [cloud]:

[cloud]
  statistics = yes
  query thread count = 2
  • statistics enables/disables ACLK related statistics and their charts. You can disable this to save some space in the database and slightly reduce memory usage of Netdata Agent.
  • query thread count specifies the number of threads to process cloud queries. Increasing this setting is useful for nodes with many children (streaming), which can expect to handle more queries (and/or more complicated queries).

Disable the ACLK

You have two options if you prefer to disable the ACLK and not use Netdata Cloud.

Disable at installation

You can pass the --disable-cloud parameter to the Agent installation when using a kickstart script (kickstart.sh, or a manual installation from Git.

When you pass this parameter, the installer does not download or compile any extra libraries. Once running, the Agent kills the thread responsible for the ACLK and connecting behavior, and behaves as though the ACLK, and thus Netdata Cloud, does not exist.

Disable at runtime

You can change a runtime setting in your cloud.conf file to disable the ACLK. This setting only stops the Agent from attempting any connection via the ACLK, but does not prevent the installer from downloading and compiling the ACLK's dependencies.

The file typically exists at /var/lib/netdata/cloud.d/cloud.conf, but can change if you set a prefix during installation. To disable the ACLK, open that file and change the enabled setting to no:

[global]
    enabled = no

If the file at /var/lib/netdata/cloud.d/cloud.conf doesn't exist, you need to create it.

Copy and paste the first two lines from below, which will change your prompt to cat.

cd /var/lib/netdata/cloud.d
cat > cloud.conf << EOF

Copy and paste in lines 3-6, and after the final EOF, hit Enter. The final line must contain only EOF. Hit Enter again to return to your normal prompt with the newly-created file.

To get your normal prompt back, the final line must contain only EOF.

[global]
    enabled = no
    cloud base url = https://api.netdata.cloud
EOF

You also need to change the file's permissions. Use grep "run as user" /etc/netdata/netdata.conf to figure out which user your Agent runs as (typically netdata), and replace netdata:netdata as shown below if necessary:

sudo chmod 0770 cloud.conf
sudo chown netdata:netdata cloud.conf

Restart your Agent to disable the ACLK.

Re-enable the ACLK

If you first disable the ACLK and any Cloud functionality and then decide you would like to use Cloud, you must either reinstall Netdata with Cloud enabled or change the runtime setting in your cloud.conf file.

If you passed --disable-cloud to netdata-installer.sh during installation, you must reinstall your Agent. Use the same method as before, but pass --require-cloud to the installer. When installation finishes you can connect your node.

If you changed the runtime setting in your var/lib/netdata/cloud.d/cloud.conf file, edit the file again and change enabled to yes:

[global]
    enabled = yes

Restart your Agent and connect your node.