@cryptotaxi247 / netdata-1 / commits / 592807023

Updated copyright notices (#19256)

* updated copyright notices everywhere (I hope) * Update makeself.lsm * Update coverity-scan.sh * make all newlines be linux, not windows * remove copyright from all files (the take it from the repo), unless it is printed to users

Costa Tsaousis committed Dec 20, 2024 at 15:25 UTC 59280702393306926f0a170ae279e833f7ef5194
107 files changed +1749 -1941
.github/scripts/package_cloud_wrapper.sh
+2 -3
@@ -1,4 +1,5 @@
1 #!/usr/bin/env bash
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # This is a tool to help removal of packages from packagecloud.io
5 # It utilizes the package_cloud utility provided from packagecloud.io
@@ -10,10 +11,8 @@
11 # 1) PKG_CLOUD_TOKEN variable exported
12 # 2) To properly install package_cloud when not found, it requires: ruby gcc gcc-c++ ruby-devel
13 #
13 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
14 -#
15 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
14 #shellcheck disable=SC2068,SC2145
15 +
16 set -e
17 PKG_CLOUD_CONFIG="$HOME/.package_cloud_configuration.cfg"
18
REDISTRIBUTED.md
+1 -1
@@ -1,7 +1,7 @@
1 # Redistributed software
2
3 Netdata copyright info:<br/>
4 -Copyright 2023, Netdata Inc.<br/>
4 +Copyright 2018-2025 Netdata Inc.<br/>
5 Released under [GPL v3 or later](https://raw.githubusercontent.com/netdata/netdata/master/LICENSE).
6
7 Netdata uses SPDX license tags to identify the license for its files.
docs/developer-and-contributor-corner/style-guide.md
+3 -3
@@ -160,15 +160,15 @@ capitalization. In summary:
160 Docker, Apache, NGINX)
161 - Avoid camel case (NetData) or all caps (NETDATA).
162
163 -Whenever you refer to the company Netdata, Inc., or the open-source monitoring Agent the company develops, capitalize both words.
163 +Whenever you refer to the company Netdata Inc., or the open-source monitoring Agent the company develops, capitalize both words.
164
165 However, if you’re referring to a process, user, or group on a Linux system, use lowercase and fence the word in an
166 inline code block: `` `netdata` ``.
167
168 | | |
169 |-----------------|------------------------------------------------------------------------------------------------|
170 -| Not recommended | The netdata agent, which spawns the netdata process, is actively maintained by netdata, inc. |
171 -| **Recommended** | The Netdata Agent, which spawns the `netdata` process, is actively maintained by Netdata, Inc. |
170 +| Not recommended | The netdata agent, which spawns the netdata process, is actively maintained by Netdata Inc. |
171 +| **Recommended** | The Netdata Agent, which spawns the `netdata` process, is actively maintained by Netdata Inc. |
172
173 #### Capitalization of document titles and page headings
174
docs/diagrams/netdata-overview.xml
+1 -1
@@ -294,7 +294,7 @@
294 <mxCell id="110" value="" style="shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.mscae.cloud.api_management;fillColor=#0079D6;fontSize=20;align=center;" parent="1" vertex="1">
295 <mxGeometry x="91" y="562" width="35" height="30" as="geometry" />
296 </mxCell>
297 - <UserObject label="&lt;div style=&quot;text-align: right&quot;&gt;&lt;b&gt;&lt;font style=&quot;font-size: 24px&quot;&gt;netdata&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;simple. effective. awesome!&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;&lt;b&gt;https://netdata.cloud&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;&lt;span style=&quot;font-size: 14px&quot;&gt;&lt;br&gt;(C) Copyright 2023&lt;br&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px&quot;&gt;Netdata, Inc.&lt;/span&gt;&lt;/div&gt;" link="https://netdata.cloud" id="111">
297 + <UserObject label="&lt;div style=&quot;text-align: right&quot;&gt;&lt;b&gt;&lt;font style=&quot;font-size: 24px&quot;&gt;netdata&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;simple. effective. awesome!&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;&lt;b&gt;https://netdata.cloud&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right&quot;&gt;&lt;span style=&quot;font-size: 14px&quot;&gt;&lt;br&gt;(C) Copyright 2018-2025&lt;br&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px&quot;&gt;Netdata Inc.&lt;/span&gt;&lt;/div&gt;" link="https://netdata.cloud" id="111">
298 <mxCell style="text;html=1;resizable=0;points=[];autosize=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=20;" parent="1" vertex="1">
299 <mxGeometry x="994" y="1763.666748046875" width="270" height="160" as="geometry" />
300 </mxCell>
docs/netdata-agent/securing-netdata-agents.md
+130 -130
@@ -1,130 +1,130 @@
1 -# Securing Netdata Agents
2 -
3 -By default, the Agent exposes its **local dashboard** on port `19999`. If the node has a public IP address, the dashboard and metrics are accessible to anyone at `http://NODE:19999`.
4 -
5 -Protect your Agents by implementing any of these security measures:
6 -
7 -**Recommended**:
8 -
9 -- [Disable the local dashboard](#disable-the-local-dashboard): Best for users who monitor their systems through Netdata Cloud dashboards.
10 -- [Use Netdata Parents as Web Application Firewalls](#use-netdata-parents-as-web-application-firewalls): Deploy Parent nodes as border gateways to isolate production systems from direct internet exposure, even when using Netdata Cloud.
11 -
12 -**Alternative Approaches**:
13 -
14 -- [Restrict dashboard access to private LAN](#restrict-dashboard-access-to-private-lan): Suitable for accessing the local dashboard via a LAN connection.
15 -- [Configure granular access control](#configure-granular-access-control): Limit local dashboard access to specific IP addresses, such as trusted static IPs or management LAN connections.
16 -- [Deploy a reverse proxy](#deploy-a-reverse-proxy): Secure your dashboard with password protection and TLS encryption.
17 -
18 -## Disable the local dashboard
19 -
20 -Secure your nodes by disabling local dashboard access while maintaining Cloud monitoring capabilities:
21 -
22 -- Eliminates public exposure of metrics and system information.
23 -- Maintains secure metrics viewing through Netdata Cloud via [ACLK](/src/aclk/README.md).
24 -
25 -Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script:
26 -
27 -```text
28 -[web]
29 - mode = none
30 -```
31 -
32 -Restart your Agent to apply changes. After restart, the local dashboard (http://NODE:19999) will no longer be accessible, but all metrics remain available through Netdata Cloud.
33 -
34 -> **Note**
35 ->
36 -> For Docker deployments, set `NETDATA_HEALTHCHECK_TARGET=cli` in your environment variables.
37 -
38 -## Use Netdata Parents as Web Application Firewalls
39 -
40 -Enhance security by deploying Parent nodes as border gateways, eliminating the need for direct internet access from production Agents. Parent nodes:
41 -
42 -- Act as application firewalls.
43 -- Receive metrics from Child Agents securely.
44 -- Serve dashboard requests using local data.
45 -- Maintain Netdata Cloud connectivity through encrypted connection.
46 -
47 -For more information, see [Observability Centralization Points](/docs/observability-centralization-points/README.md).
48 -
49 -## Restrict dashboard access to private LAN
50 -
51 -Enhance security by binding the Agent to your organization's private management network interface. This limits dashboard access to your administrative LAN only.
52 -
53 -Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script:
54 -
55 -```text
56 -[web]
57 - bind to = 10.1.1.1:19999 localhost:19999
58 -```
59 -
60 -The Agent supports binding to multiple IPs and ports. When using hostnames, all resolved IPs will be used (for example, `localhost` typically resolves to both `127.0.0.1` and `::1`).
61 -
62 -<details><summary>More info for cloud-based installations</summary>
63 -
64 -For cloud environments without private LAN capabilities or multi-cloud deployments, you can create a virtual management network using mesh VPN tools like `tincd` or `gvpe`. These tools enable secure, private communication between servers while allowing administration stations to access management functions across your cloud infrastructure.
65 -
66 -For `gvpe` specifically, we maintain a [deployment tool](https://github.com/netdata/netdata-demo-site/tree/master/gvpe) that includes:
67 -
68 -- Pre-compiled binaries for Linux and FreeBSD.
69 -- macOS compilation script.
70 -- Configuration templates.
71 -
72 -We use this tool to manage our Netdata demo sites across multiple hosting providers.
73 -
74 -</details>
75 -
76 -## Configure granular access control
77 -
78 -Restrict access to your local dashboard while maintaining Netdata Cloud connectivity by using [access lists](/src/web/server/README.md#access-lists).
79 -
80 -Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script.
81 -
82 -Use the `allow connections from` setting to permit specific IP addresses or hostnames:
83 -
84 -```text
85 -[web]
86 - # Allow only localhost connections
87 - allow connections from = localhost
88 -
89 - # Allow only from management LAN running on `10.X.X.X`
90 - allow connections from = 10.*
91 -
92 - # Allow connections only from a specific FQDN/hostname
93 - allow connections from = example*
94 -```
95 -
96 -The default setting `localhost *` allows both localhost and all external connections. You can customize this using Netdata's [simple patterns](/src/libnetdata/simple_pattern/README.md).
97 -
98 -While `allow connections from` globally controls access to all Netdata services, you can set specific permissions for individual features:
99 -
100 -```text
101 -[web]
102 - allow connections from = localhost *
103 - allow dashboard from = localhost *
104 - allow badges from = *
105 - allow streaming from = *
106 - allow netdata.conf from = localhost fd* 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
107 - allow management from = localhost
108 -```
109 -
110 -For additional security:
111 -
112 -- Review detailed access list options in the [Web Server documentation](/src/web/server/README.md#access-lists).
113 -- Consider [enabling SSL](/src/web/server/README.md#enable-httpstls-support) to encrypt local dashboard traffic (Netdata Cloud connections are always TLS-encrypted).
114 -
115 -## Deploy a reverse proxy
116 -
117 -Secure multiple Agents using a single authenticating web server as a reverse proxy. This provides:
118 -
119 -- Unified access through URLs like `http://{HOST}/netdata/{NETDATA_HOSTNAME}/`.
120 -- Single sign-on across all Agents.
121 -- Optional TLS encryption.
122 -
123 -We provide detailed configuration guides for popular web servers:
124 -
125 -- [nginx](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-nginx.md)
126 -- [HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md)
127 -- [Apache](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-apache.md)
128 -- [Lighttpd](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-lighttpd.md)
129 -- [Caddy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-caddy.md)
130 -- [H2O](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-h2o.md)
1 +# Securing Netdata Agents
2 +
3 +By default, the Agent exposes its **local dashboard** on port `19999`. If the node has a public IP address, the dashboard and metrics are accessible to anyone at `http://NODE:19999`.
4 +
5 +Protect your Agents by implementing any of these security measures:
6 +
7 +**Recommended**:
8 +
9 +- [Disable the local dashboard](#disable-the-local-dashboard): Best for users who monitor their systems through Netdata Cloud dashboards.
10 +- [Use Netdata Parents as Web Application Firewalls](#use-netdata-parents-as-web-application-firewalls): Deploy Parent nodes as border gateways to isolate production systems from direct internet exposure, even when using Netdata Cloud.
11 +
12 +**Alternative Approaches**:
13 +
14 +- [Restrict dashboard access to private LAN](#restrict-dashboard-access-to-private-lan): Suitable for accessing the local dashboard via a LAN connection.
15 +- [Configure granular access control](#configure-granular-access-control): Limit local dashboard access to specific IP addresses, such as trusted static IPs or management LAN connections.
16 +- [Deploy a reverse proxy](#deploy-a-reverse-proxy): Secure your dashboard with password protection and TLS encryption.
17 +
18 +## Disable the local dashboard
19 +
20 +Secure your nodes by disabling local dashboard access while maintaining Cloud monitoring capabilities:
21 +
22 +- Eliminates public exposure of metrics and system information.
23 +- Maintains secure metrics viewing through Netdata Cloud via [ACLK](/src/aclk/README.md).
24 +
25 +Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script:
26 +
27 +```text
28 +[web]
29 + mode = none
30 +```
31 +
32 +Restart your Agent to apply changes. After restart, the local dashboard (http://NODE:19999) will no longer be accessible, but all metrics remain available through Netdata Cloud.
33 +
34 +> **Note**
35 +>
36 +> For Docker deployments, set `NETDATA_HEALTHCHECK_TARGET=cli` in your environment variables.
37 +
38 +## Use Netdata Parents as Web Application Firewalls
39 +
40 +Enhance security by deploying Parent nodes as border gateways, eliminating the need for direct internet access from production Agents. Parent nodes:
41 +
42 +- Act as application firewalls.
43 +- Receive metrics from Child Agents securely.
44 +- Serve dashboard requests using local data.
45 +- Maintain Netdata Cloud connectivity through encrypted connection.
46 +
47 +For more information, see [Observability Centralization Points](/docs/observability-centralization-points/README.md).
48 +
49 +## Restrict dashboard access to private LAN
50 +
51 +Enhance security by binding the Agent to your organization's private management network interface. This limits dashboard access to your administrative LAN only.
52 +
53 +Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script:
54 +
55 +```text
56 +[web]
57 + bind to = 10.1.1.1:19999 localhost:19999
58 +```
59 +
60 +The Agent supports binding to multiple IPs and ports. When using hostnames, all resolved IPs will be used (for example, `localhost` typically resolves to both `127.0.0.1` and `::1`).
61 +
62 +<details><summary>More info for cloud-based installations</summary>
63 +
64 +For cloud environments without private LAN capabilities or multi-cloud deployments, you can create a virtual management network using mesh VPN tools like `tincd` or `gvpe`. These tools enable secure, private communication between servers while allowing administration stations to access management functions across your cloud infrastructure.
65 +
66 +For `gvpe` specifically, we maintain a [deployment tool](https://github.com/netdata/netdata-demo-site/tree/master/gvpe) that includes:
67 +
68 +- Pre-compiled binaries for Linux and FreeBSD.
69 +- macOS compilation script.
70 +- Configuration templates.
71 +
72 +We use this tool to manage our Netdata demo sites across multiple hosting providers.
73 +
74 +</details>
75 +
76 +## Configure granular access control
77 +
78 +Restrict access to your local dashboard while maintaining Netdata Cloud connectivity by using [access lists](/src/web/server/README.md#access-lists).
79 +
80 +Edit the `[web]` section in `netdata.conf` using the [`edit-config`](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script.
81 +
82 +Use the `allow connections from` setting to permit specific IP addresses or hostnames:
83 +
84 +```text
85 +[web]
86 + # Allow only localhost connections
87 + allow connections from = localhost
88 +
89 + # Allow only from management LAN running on `10.X.X.X`
90 + allow connections from = 10.*
91 +
92 + # Allow connections only from a specific FQDN/hostname
93 + allow connections from = example*
94 +```
95 +
96 +The default setting `localhost *` allows both localhost and all external connections. You can customize this using Netdata's [simple patterns](/src/libnetdata/simple_pattern/README.md).
97 +
98 +While `allow connections from` globally controls access to all Netdata services, you can set specific permissions for individual features:
99 +
100 +```text
101 +[web]
102 + allow connections from = localhost *
103 + allow dashboard from = localhost *
104 + allow badges from = *
105 + allow streaming from = *
106 + allow netdata.conf from = localhost fd* 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
107 + allow management from = localhost
108 +```
109 +
110 +For additional security:
111 +
112 +- Review detailed access list options in the [Web Server documentation](/src/web/server/README.md#access-lists).
113 +- Consider [enabling SSL](/src/web/server/README.md#enable-httpstls-support) to encrypt local dashboard traffic (Netdata Cloud connections are always TLS-encrypted).
114 +
115 +## Deploy a reverse proxy
116 +
117 +Secure multiple Agents using a single authenticating web server as a reverse proxy. This provides:
118 +
119 +- Unified access through URLs like `http://{HOST}/netdata/{NETDATA_HOSTNAME}/`.
120 +- Single sign-on across all Agents.
121 +- Optional TLS encryption.
122 +
123 +We provide detailed configuration guides for popular web servers:
124 +
125 +- [nginx](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-nginx.md)
126 +- [HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md)
127 +- [Apache](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-apache.md)
128 +- [Lighttpd](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-lighttpd.md)
129 +- [Caddy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-caddy.md)
130 +- [H2O](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-h2o.md)
netdata-installer.sh
+2 -2
@@ -429,7 +429,7 @@ if [ "$(id -u)" -ne 0 ] && [ -z "${NETDATA_PREPARE_ONLY}" ]; then
429 fi
430
431 netdata_banner
432 -progress "real-time performance monitoring, done right!"
432 +progress "monitoring and troubleshooting, transformed!"
433 cat << BANNER1
434
435 You are about to build and install netdata to your system.
@@ -999,7 +999,7 @@ fi
999 # -----------------------------------------------------------------------------
1000 # check if we can re-start netdata
1001
1002 -# TODO(paulfantom): Creation of configuration file should be handled by a build system. Additionally we shouldn't touch configuration files in /etc/netdata/...
1002 +# TODO: Creation of configuration file should be handled by a build system. Additionally we shouldn't touch configuration files in /etc/netdata/...
1003 started=0
1004 if [ ${DONOTSTART} -eq 1 ]; then
1005 create_netdata_conf "${NETDATA_PREFIX}/etc/netdata/netdata.conf"
netdata.spec.in
+2 -2
@@ -120,7 +120,7 @@ AutoReqProv: yes
120 # Filter known bogus deps that would be caught by AutoReqProv.
121 %global __requires_exclude_from ^%{_libdir}/%{name}/system/.*$
122
123 -Summary: Real-time performance monitoring, done right!
123 +Summary: Netdata - Monitoring and troubleshooting, transformed!
124 Name: netdata
125 Version: %{version}
126 Release: 1%{?dist}
@@ -1051,7 +1051,7 @@ fi
1051 - Fix /etc/netdata permissions
1052 * Mon Sep 23 2019 Konstantinos Natsakis <konstantinos.natsakis@gmail.com> 0.0.0-9
1053 - Do not build CUPS plugin subpackage on CentOS 6 and CentOS 7
1054 -* Tue Aug 20 2019 Pavlos Emm. Katsoulakis <paul@netdat.acloud> - 0.0.0-8
1054 +* Tue Aug 20 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-8
1055 - Split CUPS functionality on separate package
1056 * Fri Jun 28 2019 Pavlos Emm. Katsoulakis <paul@netdata.cloud> - 0.0.0-7
1057 - Raise the path overrides to the spec file level, not just the configure.
packaging/check-for-go-toolchain.sh
-2
@@ -1,6 +1,4 @@
1 #!/bin/sh
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
2 # SPDX-License-Identifier: GPL-v3+
3 #
4 # Check if we need to install a Go toolchain.
packaging/cmake/Modules/FindGo.cmake
+2 -4
@@ -1,9 +1,7 @@
1 -# Custom CMake module to find the Go toolchain
2 -#
3 -# Copyright (c) 2024 Netdata Inc
4 -#
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 #
3 +# Custom CMake module to find the Go toolchain
4 +#
5 # This is a relatively orthodox CMake Find Module. It can be used by
6 # simply including it and then invoking `find_package(Go)`.
7 #
packaging/cmake/Modules/NetdataCompilerFlags.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Functions to simplify handling of extra compiler flags.
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Functions to simplify handling of extra compiler flags.
3
4 include(CheckCCompilerFlag)
5 include(CheckCXXCompilerFlag)
packaging/cmake/Modules/NetdataDashboard.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# CMake module to handle fetching and installing the dashboard code
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# CMake module to handle fetching and installing the dashboard code
3
4 include(NetdataUtil)
5
packaging/cmake/Modules/NetdataDetectSystemd.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# CMake Module to handle all the systemd-related checks for Netdata.
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# CMake Module to handle all the systemd-related checks for Netdata.
3
4 macro(detect_systemd)
5 find_library(SYSTEMD_LIBRARY NAMES systemd)
packaging/cmake/Modules/NetdataEBPFCORE.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Handling for eBPF CO-RE files
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Handling for eBPF CO-RE files
3
4 include(ExternalProject)
5
packaging/cmake/Modules/NetdataEBPFLegacy.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Handling for eBPF legacy programs
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Handling for eBPF legacy programs
3
4 include(ExternalProject)
5 include(NetdataUtil)
packaging/cmake/Modules/NetdataFetchContentExtra.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Extra tools for working with FetchContent on older CMake
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Extra tools for working with FetchContent on older CMake
3
4 # FetchContent_MakeAvailable_NoInstall
5 #
packaging/cmake/Modules/NetdataGoTools.cmake
+1 -4
@@ -1,8 +1,5 @@
1 +# SPDX-License-Identifier: GPL-3.0-or-later
2 # Macros and functions to assist in working with Go
2 -#
3 -# Copyright (c) 2024 Netdata Inc
4 -#
5 -# SPDX-License-Identifier: GPL
3
4 if(CMAKE_BUILD_TYPE STREQUAL Debug)
5 set(GO_LDFLAGS "-X github.com/netdata/netdata/go/plugins/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
packaging/cmake/Modules/NetdataJSONC.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Functions and macros for handling of JSON-C
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Functions and macros for handling of JSON-C
3
4 # Handle bundling of json-c.
5 #
packaging/cmake/Modules/NetdataLibBPF.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Handling for libbpf (used by the eBPF plugin)
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Handling for libbpf (used by the eBPF plugin)
3
4 include(ExternalProject)
5 include(NetdataUtil)
packaging/cmake/Modules/NetdataProtobuf.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Macros and functions for handling of Protobuf
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Macros and functions for handling of Protobuf
3
4 # Prepare a vendored copy of Protobuf for use with Netdata.
5 function(netdata_bundle_protobuf)
packaging/cmake/Modules/NetdataSentry.cmake
+1 -3
@@ -1,8 +1,6 @@
1 +# SPDX-License-Identifier: GPL-3.0-or-later
2 # Functions and macros for handling of Sentry
3 #
3 -# Copyright (c) 2024 Netdata Inc.
4 -# SPDX-License-Identifier: GPL-3.0-or-later
5 -
4 # Handle bundling of Sentry.
5 #
6 # This pulls it in as a sub-project using FetchContent functionality.
packaging/cmake/Modules/NetdataUtil.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Utility functions used by other modules.
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Utility functions used by other modules.
3
4 include_guard()
5
packaging/cmake/Modules/NetdataVersion.cmake
-2
@@ -1,6 +1,4 @@
1 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
3 -
2 # Function to provide information regarding the Netdata version.
3 #
4 # The high-level logic is (a) use git-describe, (b) fallback to info from
packaging/cmake/Modules/NetdataYAML.cmake
+1 -3
@@ -1,7 +1,5 @@
1 -# Functions and macros for handling of libYAML
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 +# Functions and macros for handling of libYAML
3
4 # Handle bundling of libyaml.
5 #
packaging/cmake/pkg-files/copyright
+2 -2
@@ -1,10 +1,10 @@
1 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 Upstream-Name: Netdata
3 -Upstream-Contact: Costa Tsaousis <costa@tsaousis.gr>
3 +Upstream-Contact: Netdata Inc. <info@netdata.cloud>
4 Source: https://github.com/netdata/netdata
5
6 Files: *
7 -Copyright: 2014-2016, Costa Tsaousis
7 +Copyright: Copyright 2018-2025 Netdata Inc.
8 License: GPL-3+
9 On Debian systems, the complete text of the GNU General Public
10 License version 3 can be found in /usr/share/common-licenses/GPL-3.
packaging/docker/Dockerfile
-1
@@ -1,5 +1,4 @@
1 # SPDX-License-Identifier: GPL-3.0-or-later
2 -# author : paulfantom
2
3 # This image contains preinstalled dependencies
4 # hadolint ignore=DL3007
packaging/docker/run.sh
+2 -6
@@ -1,12 +1,8 @@
1 #!/usr/bin/env bash
2 -#
3 -# Entry point script for netdata
4 -#
5 -# Copyright: 2018 and later Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
8 -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud>
9 -# Author : Austin S. Hemmelgarn <austin@netdata.cloud>
4 +# Entry point script for netdata
5 +
6 set -e
7
8 if [ ! -w / ] && [ "${EUID}" -eq 0 ]; then
packaging/installer/netdata-uninstaller.sh
+1 -5
@@ -1,4 +1,5 @@
1 #!/bin/sh
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # This is the netdata uninstaller script
5 #
@@ -6,11 +7,6 @@
7 # - NETDATA_PREFIX
8 # - NETDATA_ADDED_TO_GROUPS
9 #
9 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
10 -#
11 -# Author: Paweł Krupa <paulfantom@gmail.com>
12 -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud>
13 -#
10 # Next unused error code: R0005
11
12 usage="$(basename "$0") [-h] [-f ] -- program to calculate the answer to life, the universe and everything
packaging/installer/netdata-updater.sh
+2 -8
@@ -1,5 +1,6 @@
1 #!/bin/sh
2 -
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 +#
4 # Netdata updater utility
5 #
6 # Variables needed by script:
@@ -20,13 +21,6 @@
21 #
22 # - TMPDIR (set to a usable temporary directory)
23 # - NETDATA_NIGHTLIES_BASEURL (set the base url for downloading the dist tarball)
23 -#
24 -# Copyright: 2018-2023 Netdata Inc.
25 -# SPDX-License-Identifier: GPL-3.0-or-later
26 -#
27 -# Author: Paweł Krupa <paulfantom@gmail.com>
28 -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud>
29 -# Author: Austin S. Hemmelgarn <austin@netdata.cloud>
24
25 # Next unused error code: U001D
26
packaging/makeself/install-alpine-packages.sh
+1 -4
@@ -1,11 +1,8 @@
1 #!/usr/bin/env sh
2 +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # Installation script for the alpine host
5 # to prepare the static binary
5 -#
6 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
6
7 apk update || exit 1
8 apk upgrade || exit 1
packaging/makeself/makeself-help-header.txt
+3 -4
@@ -1,12 +1,11 @@
1
2 ^
3 |.-. .-. .-. .-. . netdata
4 - | '-' '-' '-' '-' real-time performance monitoring, done right!
4 + | '-' '-' '-' '-' monitoring and troubleshooting, transformed!
5 +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
6
7 - (C) Copyright 2017, Costa Tsaousis
8 - All rights reserved
9 - Released under GPL v3+
7 + Copyright 2018-2025 Netdata Inc.
8 + SPDX-License-Identifier: GPL-3.0-or-later
9
10 You are about to install netdata to this system.
11 netdata will be installed at:
packaging/makeself/makeself-license.txt
+3 -4
@@ -1,12 +1,11 @@
1
2 ^
3 |.-. .-. .-. .-. . netdata
4 - | '-' '-' '-' '-' real-time performance monitoring, done right!
4 + | '-' '-' '-' '-' monitoring and troubleshooting, transformed!
5 +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->
6
7 - (C) Copyright 2017-2023, Costa Tsaousis
8 - All rights reserved
9 - Released under GPL v3+
7 + Copyright 2018-2025 Netdata Inc.
8 + SPDX-License-Identifier: GPL-3.0-or-later
9
10 You are about to install netdata to this system.
11 netdata will be installed at:
packaging/makeself/makeself.lsm
+4 -4
@@ -1,15 +1,15 @@
1 Begin3
2 Title: netdata
3 Version: NETDATA_VERSION
4 -Description: netdata is a system for distributed real-time performance and health monitoring.
4 +Description: Netdata - Monitoring and troubleshooting, transformed!
5 It provides unparalleled insights, in real-time, of everything happening on the
6 - system it runs (including applications such as web and database servers), using
6 + systems it runs (including applications such as web and database servers), using
7 modern interactive web dashboards. netdata is fast and efficient, designed to
8 permanently run on all systems (physical & virtual servers, containers, IoT
9 devices), without disrupting their core function.
10 Keywords: real-time performance and health monitoring
11 -Author: Costa Tsaousis (costa@tsaousis.gr)
12 -Maintained-by: Costa Tsaousis (costa@tsaousis.gr)
11 +Author: Netdata Inc.
12 +Maintained-by: Netdata Inc.
13 Original-site: https://netdata.cloud/
14 Platform: Unix
15 Copying-policy: GPL
packaging/utils/coverity-scan.sh
+2 -7
@@ -1,14 +1,9 @@
1 #!/usr/bin/env bash
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 +# shellcheck disable=SC1091,SC2230,SC2086
4 #
5 # Coverity scan script
6 #
5 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 -#
7 -# Author : Costa Tsaousis (costa@netdata.cloud)
8 -# Author : Pawel Krupa (paulfantom)
9 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
10 -# shellcheck disable=SC1091,SC2230,SC2086
11 -
7 # To run manually, save configuration to .coverity-scan.conf like this:
8 #
9 # the repository to report to coverity - devs can set here their own fork
src/aclk/mqtt_websockets/test.c
-1
@@ -1,5 +1,4 @@
1 // SPDX-License-Identifier: GPL-3.0-only
2 -// Copyright (C) 2020 Timotej Šiškovič
2
3 #include <unistd.h>
4 #include <stdio.h>
src/claim/netdata-claim.sh.in
-2
@@ -1,6 +1,4 @@
1 #!/bin/sh
2 -#
3 -# Copyright (c) 2024 Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # %%NEW_CLAIMING_METHOD%%
src/collectors/apps.plugin/apps_plugin.c
+1 -7
@@ -1,11 +1,5 @@
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 -/*
4 - * netdata apps.plugin
5 - * (C) Copyright 2023 Netdata Inc.
6 - * Released under GPL v3+
7 - */
8 -
3 #include "apps_plugin.h"
4 #include "libnetdata/required_dummies.h"
5
@@ -509,7 +503,7 @@ static void parse_args(int argc, char **argv)
503 fprintf(stderr,
504 "\n"
505 " netdata apps.plugin %s\n"
512 - " Copyright (C) 2016-2017 Costa Tsaousis <costa@tsaousis.gr>\n"
506 + " Copyright 2018-2025 Netdata Inc.\n"
507 " Released under GNU General Public License v3 or later.\n"
508 " All rights reserved.\n"
509 "\n"
src/collectors/cgroups.plugin/cgroup-name.sh.in
+1 -5
@@ -1,13 +1,9 @@
1 #!/usr/bin/env bash
2 -#shellcheck disable=SC2001
3 -
4 -# netdata
5 -# real-time performance and health monitoring, done right!
6 -# (C) 2023 Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # Script to find a better name for cgroups
5 #
6 +#shellcheck disable=SC2001
7
8 export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin:@sbindir_POST@"
9 export LC_ALL=C
src/collectors/cgroups.plugin/cgroup-network-helper.sh.in
+3 -4
@@ -1,11 +1,9 @@
1 #!/usr/bin/env bash
2 -# shellcheck disable=SC1117
3 -
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 +#
4 # cgroup-network-helper.sh
5 # detect container and virtual machine interfaces
6 #
7 -# (C) 2023 Netdata Inc.
8 -# SPDX-License-Identifier: GPL-3.0-or-later
7 #
8 # This script is called as root (by cgroup-network), with either a pid, or a cgroup path.
9 # It tries to find all the network interfaces that belong to the same cgroup.
@@ -20,6 +18,7 @@
18 #
19 # 3. this script, calls virsh to find libvirt network interfaces.
20 #
21 +# shellcheck disable=SC1117
22
23 # -----------------------------------------------------------------------------
24
src/collectors/charts.d.plugin/charts.d.plugin.in
-5
@@ -1,10 +1,5 @@
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 -
4 -# netdata
5 -# real-time performance and health monitoring, done right!
6 -# (C) 2017 Costa Tsaousis <costa@tsaousis.gr>
7 -# GPL v3+
3 #
4 # charts.d.plugin allows easy development of BASH plugins
5 #
src/collectors/charts.d.plugin/example/example.chart.sh
+1 -6
@@ -1,11 +1,6 @@
1 -# shellcheck shell=bash
1 # no need for shebang - this file is loaded from charts.d.plugin
2 # SPDX-License-Identifier: GPL-3.0-or-later
4 -
5 -# netdata
6 -# real-time performance and health monitoring, done right!
7 -# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
8 -#
3 +# shellcheck shell=bash
4
5 # if this chart is called X.chart.sh, then all functions and global variables
6 # must start with X_
src/collectors/charts.d.plugin/example/example.conf
+1 -5
@@ -1,9 +1,5 @@
1 # no need for shebang - this file is loaded from charts.d.plugin
2 -
3 -# netdata
4 -# real-time performance and health monitoring, done right!
5 -# (C) 2018 Costa Tsaousis <costa@tsaousis.gr>
6 -# GPL v3+
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3
4 # to enable this chart, you have to set this to 12345
5 # (just a demonstration for something that needs to be checked)
src/collectors/charts.d.plugin/libreswan/libreswan.chart.sh
+1 -6
@@ -1,12 +1,7 @@
1 -# shellcheck shell=bash disable=SC1117
1 # no need for shebang - this file is loaded from charts.d.plugin
2 # SPDX-License-Identifier: GPL-3.0-or-later
4 -
5 -# netdata
6 -# real-time performance and health monitoring, done right!
7 -# (C) 2018 Costa Tsaousis <costa@tsaousis.gr>
3 +# shellcheck shell=bash disable=SC1117
4 #
9 -
5 # _update_every is a special variable - it holds the number of seconds
6 # between the calls of the _update() function
7 libreswan_update_every=1
src/collectors/charts.d.plugin/libreswan/libreswan.conf
+1 -6
@@ -1,10 +1,5 @@
1 # no need for shebang - this file is loaded from charts.d.plugin
2 -
3 -# netdata
4 -# real-time performance and health monitoring, done right!
5 -# (C) 2018 Costa Tsaousis <costa@tsaousis.gr>
6 -# GPL v3+
7 -#
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3
4 # the data collection frequency
5 # if unset, will inherit the netdata update frequency
src/collectors/charts.d.plugin/opensips/opensips.chart.sh
+1 -6
@@ -1,11 +1,6 @@
1 -# shellcheck shell=bash disable=SC1117,SC2154,SC2086
1 # no need for shebang - this file is loaded from charts.d.plugin
2 # SPDX-License-Identifier: GPL-3.0-or-later
4 -
5 -# netdata
6 -# real-time performance and health monitoring, done right!
7 -# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
8 -#
3 +# shellcheck shell=bash disable=SC1117,SC2154,SC2086
4
5 opensips_opts="fifo get_statistics all"
6 opensips_cmd=
src/collectors/charts.d.plugin/opensips/opensips.conf
+1 -5
@@ -1,9 +1,5 @@
1 # no need for shebang - this file is loaded from charts.d.plugin
2 -
3 -# netdata
4 -# real-time performance and health monitoring, done right!
5 -# (C) 2018 Costa Tsaousis <costa@tsaousis.gr>
6 -# GPL v3+
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3
4 #opensips_opts="fifo get_statistics all"
5 #opensips_cmd=
src/collectors/common-contexts/common-contexts.h
+39 -39
@@ -1,39 +1,39 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_COMMON_CONTEXTS_H
4 -#define NETDATA_COMMON_CONTEXTS_H
5 -
6 -#include "../../libnetdata/libnetdata.h"
7 -#include "../../database/rrd.h"
8 -
9 -#ifndef _COMMON_PLUGIN_NAME
10 -#error You need to set _COMMON_PLUGIN_NAME before including common-contexts.h
11 -#endif
12 -
13 -#ifndef _COMMON_PLUGIN_MODULE_NAME
14 -#error You need to set _COMMON_PLUGIN_MODULE_NAME before including common-contexts.h
15 -#endif
16 -
17 -#define _COMMON_CONFIG_SECTION "plugin:" _COMMON_PLUGIN_NAME ":" _COMMON_PLUGIN_MODULE_NAME
18 -
19 -typedef void (*instance_labels_cb_t)(RRDSET *st, void *data);
20 -
21 -#include "system-io.h"
22 -#include "system-ram.h"
23 -#include "system-interrupts.h"
24 -#include "system-processes.h"
25 -#include "system-ipc.h"
26 -#include "mem-swap.h"
27 -#include "mem-pgfaults.h"
28 -#include "mem-available.h"
29 -#include "disk-io.h"
30 -#include "disk-ops.h"
31 -#include "disk-qops.h"
32 -#include "disk-util.h"
33 -#include "disk-busy.h"
34 -#include "disk-iotime.h"
35 -#include "disk-await.h"
36 -#include "disk-svctm.h"
37 -#include "disk-avgsz.h"
38 -
39 -#endif //NETDATA_COMMON_CONTEXTS_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_COMMON_CONTEXTS_H
4 +#define NETDATA_COMMON_CONTEXTS_H
5 +
6 +#include "../../libnetdata/libnetdata.h"
7 +#include "../../database/rrd.h"
8 +
9 +#ifndef _COMMON_PLUGIN_NAME
10 +#error You need to set _COMMON_PLUGIN_NAME before including common-contexts.h
11 +#endif
12 +
13 +#ifndef _COMMON_PLUGIN_MODULE_NAME
14 +#error You need to set _COMMON_PLUGIN_MODULE_NAME before including common-contexts.h
15 +#endif
16 +
17 +#define _COMMON_CONFIG_SECTION "plugin:" _COMMON_PLUGIN_NAME ":" _COMMON_PLUGIN_MODULE_NAME
18 +
19 +typedef void (*instance_labels_cb_t)(RRDSET *st, void *data);
20 +
21 +#include "system-io.h"
22 +#include "system-ram.h"
23 +#include "system-interrupts.h"
24 +#include "system-processes.h"
25 +#include "system-ipc.h"
26 +#include "mem-swap.h"
27 +#include "mem-pgfaults.h"
28 +#include "mem-available.h"
29 +#include "disk-io.h"
30 +#include "disk-ops.h"
31 +#include "disk-qops.h"
32 +#include "disk-util.h"
33 +#include "disk-busy.h"
34 +#include "disk-iotime.h"
35 +#include "disk-await.h"
36 +#include "disk-svctm.h"
37 +#include "disk-avgsz.h"
38 +
39 +#endif //NETDATA_COMMON_CONTEXTS_H
src/collectors/common-contexts/disk-avgsz.h
+44 -44
@@ -1,44 +1,44 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_AVGSZ_H
4 -#define NETDATA_DISK_AVGSZ_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_avgsz;
10 - RRDDIM *rd_avgsz_reads;
11 - RRDDIM *rd_avgsz_writes;
12 -} ND_DISK_AVGSZ;
13 -
14 -static inline void common_disk_avgsz(ND_DISK_AVGSZ *d, const char *id, const char *name, uint64_t avg_bytes_read, uint64_t avg_bytes_write, int update_every, instance_labels_cb_t cb, void *data) {
15 - if(unlikely(!d->st_avgsz)) {
16 - d->st_avgsz = rrdset_create_localhost(
17 - "disk_avgsz"
18 - , id
19 - , name
20 - , "io"
21 - , "disk.avgsz"
22 - , "Average Completed I/O Operation Bandwidth"
23 - , "KiB/operation"
24 - , _COMMON_PLUGIN_NAME
25 - , _COMMON_PLUGIN_MODULE_NAME
26 - , NETDATA_CHART_PRIO_DISK_AVGSZ
27 - , update_every
28 - , RRDSET_TYPE_AREA
29 - );
30 -
31 - d->rd_avgsz_reads = rrddim_add(d->st_avgsz, "reads", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE);
32 - d->rd_avgsz_writes = rrddim_add(d->st_avgsz, "writes", NULL, -1, 1024, RRD_ALGORITHM_ABSOLUTE);
33 -
34 - if(cb)
35 - cb(d->st_avgsz, data);
36 - }
37 -
38 - // this always have to be in base units, so that exporting sends base units to other time-series db
39 - rrddim_set_by_pointer(d->st_avgsz, d->rd_avgsz_reads, (collected_number)avg_bytes_read);
40 - rrddim_set_by_pointer(d->st_avgsz, d->rd_avgsz_writes, (collected_number)avg_bytes_write);
41 - rrdset_done(d->st_avgsz);
42 -}
43 -
44 -#endif //NETDATA_DISK_AVGSZ_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_AVGSZ_H
4 +#define NETDATA_DISK_AVGSZ_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_avgsz;
10 + RRDDIM *rd_avgsz_reads;
11 + RRDDIM *rd_avgsz_writes;
12 +} ND_DISK_AVGSZ;
13 +
14 +static inline void common_disk_avgsz(ND_DISK_AVGSZ *d, const char *id, const char *name, uint64_t avg_bytes_read, uint64_t avg_bytes_write, int update_every, instance_labels_cb_t cb, void *data) {
15 + if(unlikely(!d->st_avgsz)) {
16 + d->st_avgsz = rrdset_create_localhost(
17 + "disk_avgsz"
18 + , id
19 + , name
20 + , "io"
21 + , "disk.avgsz"
22 + , "Average Completed I/O Operation Bandwidth"
23 + , "KiB/operation"
24 + , _COMMON_PLUGIN_NAME
25 + , _COMMON_PLUGIN_MODULE_NAME
26 + , NETDATA_CHART_PRIO_DISK_AVGSZ
27 + , update_every
28 + , RRDSET_TYPE_AREA
29 + );
30 +
31 + d->rd_avgsz_reads = rrddim_add(d->st_avgsz, "reads", NULL, 1, 1024, RRD_ALGORITHM_ABSOLUTE);
32 + d->rd_avgsz_writes = rrddim_add(d->st_avgsz, "writes", NULL, -1, 1024, RRD_ALGORITHM_ABSOLUTE);
33 +
34 + if(cb)
35 + cb(d->st_avgsz, data);
36 + }
37 +
38 + // this always have to be in base units, so that exporting sends base units to other time-series db
39 + rrddim_set_by_pointer(d->st_avgsz, d->rd_avgsz_reads, (collected_number)avg_bytes_read);
40 + rrddim_set_by_pointer(d->st_avgsz, d->rd_avgsz_writes, (collected_number)avg_bytes_write);
41 + rrdset_done(d->st_avgsz);
42 +}
43 +
44 +#endif //NETDATA_DISK_AVGSZ_H
src/collectors/common-contexts/disk-await.h
+44 -44
@@ -1,44 +1,44 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_AWAIT_H
4 -#define NETDATA_DISK_AWAIT_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_await;
10 - RRDDIM *rd_await_reads;
11 - RRDDIM *rd_await_writes;
12 -} ND_DISK_AWAIT;
13 -
14 -static inline void common_disk_await(ND_DISK_AWAIT *d, const char *id, const char *name, double read_avg_ms, double write_avg_ms, int update_every, instance_labels_cb_t cb, void *data) {
15 - if(unlikely(!d->st_await)) {
16 - d->st_await = rrdset_create_localhost(
17 - "disk_await"
18 - , id
19 - , name
20 - , "latency"
21 - , "disk.await"
22 - , "Average Completed I/O Operation Time"
23 - , "milliseconds/operation"
24 - , _COMMON_PLUGIN_NAME
25 - , _COMMON_PLUGIN_MODULE_NAME
26 - , NETDATA_CHART_PRIO_DISK_AWAIT
27 - , update_every
28 - , RRDSET_TYPE_LINE
29 - );
30 -
31 - d->rd_await_reads = rrddim_add(d->st_await, "reads", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
32 - d->rd_await_writes = rrddim_add(d->st_await, "writes", NULL, -1, 1000, RRD_ALGORITHM_ABSOLUTE);
33 -
34 - if(cb)
35 - cb(d->st_await, data);
36 - }
37 -
38 - // this always have to be in base units, so that exporting sends base units to other time-series db
39 - rrddim_set_by_pointer(d->st_await, d->rd_await_reads, (collected_number)(read_avg_ms * 1000.0));
40 - rrddim_set_by_pointer(d->st_await, d->rd_await_writes, (collected_number)(write_avg_ms * 1000.0));
41 - rrdset_done(d->st_await);
42 -}
43 -
44 -#endif //NETDATA_DISK_AWAIT_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_AWAIT_H
4 +#define NETDATA_DISK_AWAIT_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_await;
10 + RRDDIM *rd_await_reads;
11 + RRDDIM *rd_await_writes;
12 +} ND_DISK_AWAIT;
13 +
14 +static inline void common_disk_await(ND_DISK_AWAIT *d, const char *id, const char *name, double read_avg_ms, double write_avg_ms, int update_every, instance_labels_cb_t cb, void *data) {
15 + if(unlikely(!d->st_await)) {
16 + d->st_await = rrdset_create_localhost(
17 + "disk_await"
18 + , id
19 + , name
20 + , "latency"
21 + , "disk.await"
22 + , "Average Completed I/O Operation Time"
23 + , "milliseconds/operation"
24 + , _COMMON_PLUGIN_NAME
25 + , _COMMON_PLUGIN_MODULE_NAME
26 + , NETDATA_CHART_PRIO_DISK_AWAIT
27 + , update_every
28 + , RRDSET_TYPE_LINE
29 + );
30 +
31 + d->rd_await_reads = rrddim_add(d->st_await, "reads", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
32 + d->rd_await_writes = rrddim_add(d->st_await, "writes", NULL, -1, 1000, RRD_ALGORITHM_ABSOLUTE);
33 +
34 + if(cb)
35 + cb(d->st_await, data);
36 + }
37 +
38 + // this always have to be in base units, so that exporting sends base units to other time-series db
39 + rrddim_set_by_pointer(d->st_await, d->rd_await_reads, (collected_number)(read_avg_ms * 1000.0));
40 + rrddim_set_by_pointer(d->st_await, d->rd_await_writes, (collected_number)(write_avg_ms * 1000.0));
41 + rrdset_done(d->st_await);
42 +}
43 +
44 +#endif //NETDATA_DISK_AWAIT_H
src/collectors/common-contexts/disk-busy.h
+41 -41
@@ -1,41 +1,41 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_BUSY_H
4 -#define NETDATA_DISK_BUSY_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_busy;
10 - RRDDIM *rd_busy;
11 -} ND_DISK_BUSY;
12 -
13 -static inline void common_disk_busy(ND_DISK_BUSY *d, const char *id, const char *name, uint64_t busy_ms, int update_every, instance_labels_cb_t cb, void *data) {
14 - if(unlikely(!d->st_busy)) {
15 - d->st_busy = rrdset_create_localhost(
16 - "disk_busy"
17 - , id
18 - , name
19 - , "utilization"
20 - , "disk.busy"
21 - , "Disk Busy Time"
22 - , "milliseconds"
23 - , _COMMON_PLUGIN_NAME
24 - , _COMMON_PLUGIN_MODULE_NAME
25 - , NETDATA_CHART_PRIO_DISK_BUSY
26 - , update_every
27 - , RRDSET_TYPE_AREA
28 - );
29 -
30 - d->rd_busy = rrddim_add(d->st_busy, "busy", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
31 -
32 - if(cb)
33 - cb(d->st_busy, data);
34 - }
35 -
36 - // this always have to be in base units, so that exporting sends base units to other time-series db
37 - rrddim_set_by_pointer(d->st_busy, d->rd_busy, (collected_number)busy_ms);
38 - rrdset_done(d->st_busy);
39 -}
40 -
41 -#endif //NETDATA_DISK_BUSY_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_BUSY_H
4 +#define NETDATA_DISK_BUSY_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_busy;
10 + RRDDIM *rd_busy;
11 +} ND_DISK_BUSY;
12 +
13 +static inline void common_disk_busy(ND_DISK_BUSY *d, const char *id, const char *name, uint64_t busy_ms, int update_every, instance_labels_cb_t cb, void *data) {
14 + if(unlikely(!d->st_busy)) {
15 + d->st_busy = rrdset_create_localhost(
16 + "disk_busy"
17 + , id
18 + , name
19 + , "utilization"
20 + , "disk.busy"
21 + , "Disk Busy Time"
22 + , "milliseconds"
23 + , _COMMON_PLUGIN_NAME
24 + , _COMMON_PLUGIN_MODULE_NAME
25 + , NETDATA_CHART_PRIO_DISK_BUSY
26 + , update_every
27 + , RRDSET_TYPE_AREA
28 + );
29 +
30 + d->rd_busy = rrddim_add(d->st_busy, "busy", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
31 +
32 + if(cb)
33 + cb(d->st_busy, data);
34 + }
35 +
36 + // this always have to be in base units, so that exporting sends base units to other time-series db
37 + rrddim_set_by_pointer(d->st_busy, d->rd_busy, (collected_number)busy_ms);
38 + rrdset_done(d->st_busy);
39 +}
40 +
41 +#endif //NETDATA_DISK_BUSY_H
src/collectors/common-contexts/disk-io.h
+44 -44
@@ -1,44 +1,44 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_IO_H
4 -#define NETDATA_DISK_IO_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_io;
10 - RRDDIM *rd_io_reads;
11 - RRDDIM *rd_io_writes;
12 -} ND_DISK_IO;
13 -
14 -static inline void common_disk_io(ND_DISK_IO *d, const char *id, const char *name, uint64_t bytes_read, uint64_t bytes_write, int update_every, instance_labels_cb_t cb, void *data) {
15 - if(unlikely(!d->st_io)) {
16 - d->st_io = rrdset_create_localhost(
17 - "disk"
18 - , id
19 - , name
20 - , "io"
21 - , "disk.io"
22 - , "Disk I/O Bandwidth"
23 - , "KiB/s"
24 - , _COMMON_PLUGIN_NAME
25 - , _COMMON_PLUGIN_MODULE_NAME
26 - , NETDATA_CHART_PRIO_DISK_IO
27 - , update_every
28 - , RRDSET_TYPE_AREA
29 - );
30 -
31 - d->rd_io_reads = rrddim_add(d->st_io, "reads", NULL, 1, 1024, RRD_ALGORITHM_INCREMENTAL);
32 - d->rd_io_writes = rrddim_add(d->st_io, "writes", NULL, -1, 1024, RRD_ALGORITHM_INCREMENTAL);
33 -
34 - if(cb)
35 - cb(d->st_io, data);
36 - }
37 -
38 - // this always have to be in base units, so that exporting sends base units to other time-series db
39 - rrddim_set_by_pointer(d->st_io, d->rd_io_reads, (collected_number)bytes_read);
40 - rrddim_set_by_pointer(d->st_io, d->rd_io_writes, (collected_number)bytes_write);
41 - rrdset_done(d->st_io);
42 -}
43 -
44 -#endif //NETDATA_DISK_IO_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_IO_H
4 +#define NETDATA_DISK_IO_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_io;
10 + RRDDIM *rd_io_reads;
11 + RRDDIM *rd_io_writes;
12 +} ND_DISK_IO;
13 +
14 +static inline void common_disk_io(ND_DISK_IO *d, const char *id, const char *name, uint64_t bytes_read, uint64_t bytes_write, int update_every, instance_labels_cb_t cb, void *data) {
15 + if(unlikely(!d->st_io)) {
16 + d->st_io = rrdset_create_localhost(
17 + "disk"
18 + , id
19 + , name
20 + , "io"
21 + , "disk.io"
22 + , "Disk I/O Bandwidth"
23 + , "KiB/s"
24 + , _COMMON_PLUGIN_NAME
25 + , _COMMON_PLUGIN_MODULE_NAME
26 + , NETDATA_CHART_PRIO_DISK_IO
27 + , update_every
28 + , RRDSET_TYPE_AREA
29 + );
30 +
31 + d->rd_io_reads = rrddim_add(d->st_io, "reads", NULL, 1, 1024, RRD_ALGORITHM_INCREMENTAL);
32 + d->rd_io_writes = rrddim_add(d->st_io, "writes", NULL, -1, 1024, RRD_ALGORITHM_INCREMENTAL);
33 +
34 + if(cb)
35 + cb(d->st_io, data);
36 + }
37 +
38 + // this always have to be in base units, so that exporting sends base units to other time-series db
39 + rrddim_set_by_pointer(d->st_io, d->rd_io_reads, (collected_number)bytes_read);
40 + rrddim_set_by_pointer(d->st_io, d->rd_io_writes, (collected_number)bytes_write);
41 + rrdset_done(d->st_io);
42 +}
43 +
44 +#endif //NETDATA_DISK_IO_H
src/collectors/common-contexts/disk-iotime.h
+44 -44
@@ -1,44 +1,44 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_IOTIME_H
4 -#define NETDATA_DISK_IOTIME_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_iotime;
10 - RRDDIM *rd_reads_ms;
11 - RRDDIM *rd_writes_ms;
12 -} ND_DISK_IOTIME;
13 -
14 -static inline void common_disk_iotime(ND_DISK_IOTIME *d, const char *id, const char *name, uint64_t reads_ms, uint64_t writes_ms, int update_every, instance_labels_cb_t cb, void *data) {
15 - if(unlikely(!d->st_iotime)) {
16 - d->st_iotime = rrdset_create_localhost(
17 - "disk_iotime"
18 - , id
19 - , name
20 - , "utilization"
21 - , "disk.iotime"
22 - , "Disk Total I/O Time"
23 - , "milliseconds/s"
24 - , _COMMON_PLUGIN_NAME
25 - , _COMMON_PLUGIN_MODULE_NAME
26 - , NETDATA_CHART_PRIO_DISK_IOTIME
27 - , update_every
28 - , RRDSET_TYPE_AREA
29 - );
30 -
31 - d->rd_reads_ms = rrddim_add(d->st_iotime, "reads", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
32 - d->rd_writes_ms = rrddim_add(d->st_iotime, "writes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
33 -
34 - if(cb)
35 - cb(d->st_iotime, data);
36 - }
37 -
38 - // this always have to be in base units, so that exporting sends base units to other time-series db
39 - rrddim_set_by_pointer(d->st_iotime, d->rd_reads_ms, (collected_number)reads_ms);
40 - rrddim_set_by_pointer(d->st_iotime, d->rd_writes_ms, (collected_number)writes_ms);
41 - rrdset_done(d->st_iotime);
42 -}
43 -
44 -#endif //NETDATA_DISK_IOTIME_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_IOTIME_H
4 +#define NETDATA_DISK_IOTIME_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_iotime;
10 + RRDDIM *rd_reads_ms;
11 + RRDDIM *rd_writes_ms;
12 +} ND_DISK_IOTIME;
13 +
14 +static inline void common_disk_iotime(ND_DISK_IOTIME *d, const char *id, const char *name, uint64_t reads_ms, uint64_t writes_ms, int update_every, instance_labels_cb_t cb, void *data) {
15 + if(unlikely(!d->st_iotime)) {
16 + d->st_iotime = rrdset_create_localhost(
17 + "disk_iotime"
18 + , id
19 + , name
20 + , "utilization"
21 + , "disk.iotime"
22 + , "Disk Total I/O Time"
23 + , "milliseconds/s"
24 + , _COMMON_PLUGIN_NAME
25 + , _COMMON_PLUGIN_MODULE_NAME
26 + , NETDATA_CHART_PRIO_DISK_IOTIME
27 + , update_every
28 + , RRDSET_TYPE_AREA
29 + );
30 +
31 + d->rd_reads_ms = rrddim_add(d->st_iotime, "reads", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
32 + d->rd_writes_ms = rrddim_add(d->st_iotime, "writes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
33 +
34 + if(cb)
35 + cb(d->st_iotime, data);
36 + }
37 +
38 + // this always have to be in base units, so that exporting sends base units to other time-series db
39 + rrddim_set_by_pointer(d->st_iotime, d->rd_reads_ms, (collected_number)reads_ms);
40 + rrddim_set_by_pointer(d->st_iotime, d->rd_writes_ms, (collected_number)writes_ms);
41 + rrdset_done(d->st_iotime);
42 +}
43 +
44 +#endif //NETDATA_DISK_IOTIME_H
src/collectors/common-contexts/disk-ops.h
+44 -44
@@ -1,44 +1,44 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_OPS_H
4 -#define NETDATA_DISK_OPS_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_ops;
10 - RRDDIM *rd_ops_reads;
11 - RRDDIM *rd_ops_writes;
12 -} ND_DISK_OPS;
13 -
14 -static inline void common_disk_ops(ND_DISK_OPS *d, const char *id, const char *name, uint64_t ops_read, uint64_t ops_write, int update_every, instance_labels_cb_t cb, void *data) {
15 - if(unlikely(!d->st_ops)) {
16 - d->st_ops = rrdset_create_localhost(
17 - "disk_ops"
18 - , id
19 - , name
20 - , "ops"
21 - , "disk.ops"
22 - , "Disk Completed I/O Operations"
23 - , "operations/s"
24 - , _COMMON_PLUGIN_NAME
25 - , _COMMON_PLUGIN_MODULE_NAME
26 - , NETDATA_CHART_PRIO_DISK_OPS
27 - , update_every
28 - , RRDSET_TYPE_LINE
29 - );
30 -
31 - d->rd_ops_reads = rrddim_add(d->st_ops, "reads", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
32 - d->rd_ops_writes = rrddim_add(d->st_ops, "writes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
33 -
34 - if(cb)
35 - cb(d->st_ops, data);
36 - }
37 -
38 - // this always have to be in base units, so that exporting sends base units to other time-series db
39 - rrddim_set_by_pointer(d->st_ops, d->rd_ops_reads, (collected_number)ops_read);
40 - rrddim_set_by_pointer(d->st_ops, d->rd_ops_writes, (collected_number)ops_write);
41 - rrdset_done(d->st_ops);
42 -}
43 -
44 -#endif //NETDATA_DISK_OPS_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_OPS_H
4 +#define NETDATA_DISK_OPS_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_ops;
10 + RRDDIM *rd_ops_reads;
11 + RRDDIM *rd_ops_writes;
12 +} ND_DISK_OPS;
13 +
14 +static inline void common_disk_ops(ND_DISK_OPS *d, const char *id, const char *name, uint64_t ops_read, uint64_t ops_write, int update_every, instance_labels_cb_t cb, void *data) {
15 + if(unlikely(!d->st_ops)) {
16 + d->st_ops = rrdset_create_localhost(
17 + "disk_ops"
18 + , id
19 + , name
20 + , "ops"
21 + , "disk.ops"
22 + , "Disk Completed I/O Operations"
23 + , "operations/s"
24 + , _COMMON_PLUGIN_NAME
25 + , _COMMON_PLUGIN_MODULE_NAME
26 + , NETDATA_CHART_PRIO_DISK_OPS
27 + , update_every
28 + , RRDSET_TYPE_LINE
29 + );
30 +
31 + d->rd_ops_reads = rrddim_add(d->st_ops, "reads", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
32 + d->rd_ops_writes = rrddim_add(d->st_ops, "writes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
33 +
34 + if(cb)
35 + cb(d->st_ops, data);
36 + }
37 +
38 + // this always have to be in base units, so that exporting sends base units to other time-series db
39 + rrddim_set_by_pointer(d->st_ops, d->rd_ops_reads, (collected_number)ops_read);
40 + rrddim_set_by_pointer(d->st_ops, d->rd_ops_writes, (collected_number)ops_write);
41 + rrdset_done(d->st_ops);
42 +}
43 +
44 +#endif //NETDATA_DISK_OPS_H
src/collectors/common-contexts/disk-qops.h
+41 -41
@@ -1,41 +1,41 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_QOPS_H
4 -#define NETDATA_DISK_QOPS_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_qops;
10 - RRDDIM *rd_qops;
11 -} ND_DISK_QOPS;
12 -
13 -static inline void common_disk_qops(ND_DISK_QOPS *d, const char *id, const char *name, uint64_t queued_ops, int update_every, instance_labels_cb_t cb, void *data) {
14 - if(unlikely(!d->st_qops)) {
15 - d->st_qops = rrdset_create_localhost(
16 - "disk_qops"
17 - , id
18 - , name
19 - , "ops"
20 - , "disk.qops"
21 - , "Disk Current I/O Operations"
22 - , "operations"
23 - , _COMMON_PLUGIN_NAME
24 - , _COMMON_PLUGIN_MODULE_NAME
25 - , NETDATA_CHART_PRIO_DISK_QOPS
26 - , update_every
27 - , RRDSET_TYPE_LINE
28 - );
29 -
30 - d->rd_qops = rrddim_add(d->st_qops, "operations", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
31 -
32 - if(cb)
33 - cb(d->st_qops, data);
34 - }
35 -
36 - // this always have to be in base units, so that exporting sends base units to other time-series db
37 - rrddim_set_by_pointer(d->st_qops, d->rd_qops, (collected_number)queued_ops);
38 - rrdset_done(d->st_qops);
39 -}
40 -
41 -#endif //NETDATA_DISK_QOPS_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_QOPS_H
4 +#define NETDATA_DISK_QOPS_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_qops;
10 + RRDDIM *rd_qops;
11 +} ND_DISK_QOPS;
12 +
13 +static inline void common_disk_qops(ND_DISK_QOPS *d, const char *id, const char *name, uint64_t queued_ops, int update_every, instance_labels_cb_t cb, void *data) {
14 + if(unlikely(!d->st_qops)) {
15 + d->st_qops = rrdset_create_localhost(
16 + "disk_qops"
17 + , id
18 + , name
19 + , "ops"
20 + , "disk.qops"
21 + , "Disk Current I/O Operations"
22 + , "operations"
23 + , _COMMON_PLUGIN_NAME
24 + , _COMMON_PLUGIN_MODULE_NAME
25 + , NETDATA_CHART_PRIO_DISK_QOPS
26 + , update_every
27 + , RRDSET_TYPE_LINE
28 + );
29 +
30 + d->rd_qops = rrddim_add(d->st_qops, "operations", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
31 +
32 + if(cb)
33 + cb(d->st_qops, data);
34 + }
35 +
36 + // this always have to be in base units, so that exporting sends base units to other time-series db
37 + rrddim_set_by_pointer(d->st_qops, d->rd_qops, (collected_number)queued_ops);
38 + rrdset_done(d->st_qops);
39 +}
40 +
41 +#endif //NETDATA_DISK_QOPS_H
src/collectors/common-contexts/disk-svctm.h
+41 -41
@@ -1,41 +1,41 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_SVCTM_H
4 -#define NETDATA_DISK_SVCTM_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_svctm;
10 - RRDDIM *rd_svctm;
11 -} ND_DISK_SVCTM;
12 -
13 -static inline void common_disk_svctm(ND_DISK_SVCTM *d, const char *id, const char *name, double svctm_ms, int update_every, instance_labels_cb_t cb, void *data) {
14 - if(unlikely(!d->st_svctm)) {
15 - d->st_svctm = rrdset_create_localhost(
16 - "disk_svctm"
17 - , id
18 - , name
19 - , "latency"
20 - , "disk.svctm"
21 - , "Average Service Time"
22 - , "milliseconds/operation"
23 - , _COMMON_PLUGIN_NAME
24 - , _COMMON_PLUGIN_MODULE_NAME
25 - , NETDATA_CHART_PRIO_DISK_SVCTM
26 - , update_every
27 - , RRDSET_TYPE_LINE
28 - );
29 -
30 - d->rd_svctm = rrddim_add(d->st_svctm, "svctm", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
31 -
32 - if(cb)
33 - cb(d->st_svctm, data);
34 - }
35 -
36 - // this always have to be in base units, so that exporting sends base units to other time-series db
37 - rrddim_set_by_pointer(d->st_svctm, d->rd_svctm, (collected_number)(svctm_ms * 1000.0));
38 - rrdset_done(d->st_svctm);
39 -}
40 -
41 -#endif //NETDATA_DISK_SVCTM_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_SVCTM_H
4 +#define NETDATA_DISK_SVCTM_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_svctm;
10 + RRDDIM *rd_svctm;
11 +} ND_DISK_SVCTM;
12 +
13 +static inline void common_disk_svctm(ND_DISK_SVCTM *d, const char *id, const char *name, double svctm_ms, int update_every, instance_labels_cb_t cb, void *data) {
14 + if(unlikely(!d->st_svctm)) {
15 + d->st_svctm = rrdset_create_localhost(
16 + "disk_svctm"
17 + , id
18 + , name
19 + , "latency"
20 + , "disk.svctm"
21 + , "Average Service Time"
22 + , "milliseconds/operation"
23 + , _COMMON_PLUGIN_NAME
24 + , _COMMON_PLUGIN_MODULE_NAME
25 + , NETDATA_CHART_PRIO_DISK_SVCTM
26 + , update_every
27 + , RRDSET_TYPE_LINE
28 + );
29 +
30 + d->rd_svctm = rrddim_add(d->st_svctm, "svctm", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
31 +
32 + if(cb)
33 + cb(d->st_svctm, data);
34 + }
35 +
36 + // this always have to be in base units, so that exporting sends base units to other time-series db
37 + rrddim_set_by_pointer(d->st_svctm, d->rd_svctm, (collected_number)(svctm_ms * 1000.0));
38 + rrdset_done(d->st_svctm);
39 +}
40 +
41 +#endif //NETDATA_DISK_SVCTM_H
src/collectors/common-contexts/disk-util.h
+41 -41
@@ -1,41 +1,41 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_DISK_UTIL_H
4 -#define NETDATA_DISK_UTIL_H
5 -
6 -#include "common-contexts.h"
7 -
8 -typedef struct {
9 - RRDSET *st_util;
10 - RRDDIM *rd_util;
11 -} ND_DISK_UTIL;
12 -
13 -static inline void common_disk_util(ND_DISK_UTIL *d, const char *id, const char *name, uint64_t percent, int update_every, instance_labels_cb_t cb, void *data) {
14 - if(unlikely(!d->st_util)) {
15 - d->st_util = rrdset_create_localhost(
16 - "disk_util"
17 - , id
18 - , name
19 - , "utilization"
20 - , "disk.util"
21 - , "Disk Utilization Time"
22 - , "% of time working"
23 - , _COMMON_PLUGIN_NAME
24 - , _COMMON_PLUGIN_MODULE_NAME
25 - , NETDATA_CHART_PRIO_DISK_UTIL
26 - , update_every
27 - , RRDSET_TYPE_AREA
28 - );
29 -
30 - d->rd_util = rrddim_add(d->st_util, "utilization", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
31 -
32 - if(cb)
33 - cb(d->st_util, data);
34 - }
35 -
36 - // this always have to be in base units, so that exporting sends base units to other time-series db
37 - rrddim_set_by_pointer(d->st_util, d->rd_util, (collected_number)percent);
38 - rrdset_done(d->st_util);
39 -}
40 -
41 -#endif //NETDATA_DISK_UTIL_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_DISK_UTIL_H
4 +#define NETDATA_DISK_UTIL_H
5 +
6 +#include "common-contexts.h"
7 +
8 +typedef struct {
9 + RRDSET *st_util;
10 + RRDDIM *rd_util;
11 +} ND_DISK_UTIL;
12 +
13 +static inline void common_disk_util(ND_DISK_UTIL *d, const char *id, const char *name, uint64_t percent, int update_every, instance_labels_cb_t cb, void *data) {
14 + if(unlikely(!d->st_util)) {
15 + d->st_util = rrdset_create_localhost(
16 + "disk_util"
17 + , id
18 + , name
19 + , "utilization"
20 + , "disk.util"
21 + , "Disk Utilization Time"
22 + , "% of time working"
23 + , _COMMON_PLUGIN_NAME
24 + , _COMMON_PLUGIN_MODULE_NAME
25 + , NETDATA_CHART_PRIO_DISK_UTIL
26 + , update_every
27 + , RRDSET_TYPE_AREA
28 + );
29 +
30 + d->rd_util = rrddim_add(d->st_util, "utilization", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
31 +
32 + if(cb)
33 + cb(d->st_util, data);
34 + }
35 +
36 + // this always have to be in base units, so that exporting sends base units to other time-series db
37 + rrddim_set_by_pointer(d->st_util, d->rd_util, (collected_number)percent);
38 + rrdset_done(d->st_util);
39 +}
40 +
41 +#endif //NETDATA_DISK_UTIL_H
src/collectors/common-contexts/mem-available.h
+35 -35
@@ -1,35 +1,35 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_MEM_AVAILABLE_H
4 -#define NETDATA_MEM_AVAILABLE_H
5 -#include "common-contexts.h"
6 -
7 -static inline void common_mem_available(uint64_t available_bytes, int update_every) {
8 - static RRDSET *st_mem_available = NULL;
9 - static RRDDIM *rd_avail = NULL;
10 -
11 - if(unlikely(!st_mem_available)) {
12 - st_mem_available = rrdset_create_localhost(
13 - "mem"
14 - , "available"
15 - , NULL
16 - , "overview"
17 - , NULL
18 - , "Available RAM for applications"
19 - , "MiB"
20 - , _COMMON_PLUGIN_NAME
21 - , _COMMON_PLUGIN_MODULE_NAME
22 - , NETDATA_CHART_PRIO_MEM_SYSTEM_AVAILABLE
23 - , update_every
24 - , RRDSET_TYPE_AREA
25 - );
26 -
27 - rd_avail = rrddim_add(st_mem_available, "avail", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
28 - }
29 -
30 - // this always have to be in base units, so that exporting sends base units to other time-series db
31 - rrddim_set_by_pointer(st_mem_available, rd_avail, (collected_number)available_bytes);
32 - rrdset_done(st_mem_available);
33 -}
34 -
35 -#endif //NETDATA_MEM_AVAILABLE_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_MEM_AVAILABLE_H
4 +#define NETDATA_MEM_AVAILABLE_H
5 +#include "common-contexts.h"
6 +
7 +static inline void common_mem_available(uint64_t available_bytes, int update_every) {
8 + static RRDSET *st_mem_available = NULL;
9 + static RRDDIM *rd_avail = NULL;
10 +
11 + if(unlikely(!st_mem_available)) {
12 + st_mem_available = rrdset_create_localhost(
13 + "mem"
14 + , "available"
15 + , NULL
16 + , "overview"
17 + , NULL
18 + , "Available RAM for applications"
19 + , "MiB"
20 + , _COMMON_PLUGIN_NAME
21 + , _COMMON_PLUGIN_MODULE_NAME
22 + , NETDATA_CHART_PRIO_MEM_SYSTEM_AVAILABLE
23 + , update_every
24 + , RRDSET_TYPE_AREA
25 + );
26 +
27 + rd_avail = rrddim_add(st_mem_available, "avail", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
28 + }
29 +
30 + // this always have to be in base units, so that exporting sends base units to other time-series db
31 + rrddim_set_by_pointer(st_mem_available, rd_avail, (collected_number)available_bytes);
32 + rrdset_done(st_mem_available);
33 +}
34 +
35 +#endif //NETDATA_MEM_AVAILABLE_H
src/collectors/common-contexts/mem-pgfaults.h
+38 -38
@@ -1,38 +1,38 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_MEM_PGFAULTS_H
4 -#define NETDATA_MEM_PGFAULTS_H
5 -
6 -#include "common-contexts.h"
7 -
8 -static inline void common_mem_pgfaults(uint64_t minor, uint64_t major, int update_every) {
9 - static RRDSET *st_pgfaults = NULL;
10 - static RRDDIM *rd_minor = NULL, *rd_major = NULL;
11 -
12 - if(unlikely(!st_pgfaults)) {
13 - st_pgfaults = rrdset_create_localhost(
14 - "mem"
15 - , "pgfaults"
16 - , NULL
17 - , "page faults"
18 - , NULL
19 - , "Memory Page Faults"
20 - , "faults/s"
21 - , _COMMON_PLUGIN_NAME
22 - , _COMMON_PLUGIN_MODULE_NAME
23 - , NETDATA_CHART_PRIO_MEM_SYSTEM_PGFAULTS
24 - , update_every
25 - , RRDSET_TYPE_LINE
26 - );
27 -
28 - rd_minor = rrddim_add(st_pgfaults, "minor", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
29 - rd_major = rrddim_add(st_pgfaults, "major", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
30 - }
31 -
32 - // this always have to be in base units, so that exporting sends base units to other time-series db
33 - rrddim_set_by_pointer(st_pgfaults, rd_minor, minor);
34 - rrddim_set_by_pointer(st_pgfaults, rd_major, major);
35 - rrdset_done(st_pgfaults);
36 -}
37 -
38 -#endif //NETDATA_MEM_PGFAULTS_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_MEM_PGFAULTS_H
4 +#define NETDATA_MEM_PGFAULTS_H
5 +
6 +#include "common-contexts.h"
7 +
8 +static inline void common_mem_pgfaults(uint64_t minor, uint64_t major, int update_every) {
9 + static RRDSET *st_pgfaults = NULL;
10 + static RRDDIM *rd_minor = NULL, *rd_major = NULL;
11 +
12 + if(unlikely(!st_pgfaults)) {
13 + st_pgfaults = rrdset_create_localhost(
14 + "mem"
15 + , "pgfaults"
16 + , NULL
17 + , "page faults"
18 + , NULL
19 + , "Memory Page Faults"
20 + , "faults/s"
21 + , _COMMON_PLUGIN_NAME
22 + , _COMMON_PLUGIN_MODULE_NAME
23 + , NETDATA_CHART_PRIO_MEM_SYSTEM_PGFAULTS
24 + , update_every
25 + , RRDSET_TYPE_LINE
26 + );
27 +
28 + rd_minor = rrddim_add(st_pgfaults, "minor", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
29 + rd_major = rrddim_add(st_pgfaults, "major", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
30 + }
31 +
32 + // this always have to be in base units, so that exporting sends base units to other time-series db
33 + rrddim_set_by_pointer(st_pgfaults, rd_minor, minor);
34 + rrddim_set_by_pointer(st_pgfaults, rd_major, major);
35 + rrdset_done(st_pgfaults);
36 +}
37 +
38 +#endif //NETDATA_MEM_PGFAULTS_H
src/collectors/common-contexts/mem-swap.h
+41 -41
@@ -1,41 +1,41 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#include "common-contexts.h"
4 -
5 -static inline void common_mem_swap(uint64_t free_bytes, uint64_t used_bytes, int update_every) {
6 - static RRDSET *st_system_swap = NULL;
7 - static RRDDIM *rd_free = NULL, *rd_used = NULL;
8 -
9 - if (free_bytes == 0 && used_bytes == 0 && st_system_swap) {
10 - rrdset_is_obsolete___safe_from_collector_thread(st_system_swap);
11 - st_system_swap = NULL;
12 - rd_free = NULL;
13 - rd_used = NULL;
14 - return;
15 - }
16 -
17 - if(unlikely(!st_system_swap)) {
18 - st_system_swap = rrdset_create_localhost(
19 - "mem"
20 - , "swap"
21 - , NULL
22 - , "swap"
23 - , NULL
24 - , "System Swap"
25 - , "MiB"
26 - , _COMMON_PLUGIN_NAME
27 - , _COMMON_PLUGIN_MODULE_NAME
28 - , NETDATA_CHART_PRIO_MEM_SWAP
29 - , update_every
30 - , RRDSET_TYPE_STACKED
31 - );
32 -
33 - rd_free = rrddim_add(st_system_swap, "free", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
34 - rd_used = rrddim_add(st_system_swap, "used", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
35 - }
36 -
37 - // this always have to be in base units, so that exporting sends base units to other time-series db
38 - rrddim_set_by_pointer(st_system_swap, rd_used, (collected_number)used_bytes);
39 - rrddim_set_by_pointer(st_system_swap, rd_free, (collected_number)free_bytes);
40 - rrdset_done(st_system_swap);
41 -}
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#include "common-contexts.h"
4 +
5 +static inline void common_mem_swap(uint64_t free_bytes, uint64_t used_bytes, int update_every) {
6 + static RRDSET *st_system_swap = NULL;
7 + static RRDDIM *rd_free = NULL, *rd_used = NULL;
8 +
9 + if (free_bytes == 0 && used_bytes == 0 && st_system_swap) {
10 + rrdset_is_obsolete___safe_from_collector_thread(st_system_swap);
11 + st_system_swap = NULL;
12 + rd_free = NULL;
13 + rd_used = NULL;
14 + return;
15 + }
16 +
17 + if(unlikely(!st_system_swap)) {
18 + st_system_swap = rrdset_create_localhost(
19 + "mem"
20 + , "swap"
21 + , NULL
22 + , "swap"
23 + , NULL
24 + , "System Swap"
25 + , "MiB"
26 + , _COMMON_PLUGIN_NAME
27 + , _COMMON_PLUGIN_MODULE_NAME
28 + , NETDATA_CHART_PRIO_MEM_SWAP
29 + , update_every
30 + , RRDSET_TYPE_STACKED
31 + );
32 +
33 + rd_free = rrddim_add(st_system_swap, "free", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
34 + rd_used = rrddim_add(st_system_swap, "used", NULL, 1, 1024 * 1024, RRD_ALGORITHM_ABSOLUTE);
35 + }
36 +
37 + // this always have to be in base units, so that exporting sends base units to other time-series db
38 + rrddim_set_by_pointer(st_system_swap, rd_used, (collected_number)used_bytes);
39 + rrddim_set_by_pointer(st_system_swap, rd_free, (collected_number)free_bytes);
40 + rrdset_done(st_system_swap);
41 +}
src/collectors/common-contexts/system-interrupts.h
+37 -37
@@ -1,37 +1,37 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SYSTEM_INTERRUPTS_H
4 -#define NETDATA_SYSTEM_INTERRUPTS_H
5 -
6 -#include "common-contexts.h"
7 -
8 -#define _
9 -
10 -static inline void common_interrupts(uint64_t interrupts, int update_every, char *ext_module) {
11 - static RRDSET *st_intr = NULL;
12 - static RRDDIM *rd_interrupts = NULL;
13 -
14 - char *module = (!ext_module) ? _COMMON_PLUGIN_MODULE_NAME: ext_module;
15 -
16 - if(unlikely(!st_intr)) {
17 - st_intr = rrdset_create_localhost( "system"
18 - , "intr"
19 - , NULL
20 - , "interrupts"
21 - , NULL
22 - , "CPU Interrupts"
23 - , "interrupts/s"
24 - , _COMMON_PLUGIN_NAME
25 - , module
26 - , NETDATA_CHART_PRIO_SYSTEM_INTR
27 - , update_every
28 - , RRDSET_TYPE_LINE);
29 -
30 - rd_interrupts = rrddim_add(st_intr, "interrupts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
31 - }
32 -
33 - rrddim_set_by_pointer(st_intr, rd_interrupts, (collected_number)interrupts);
34 - rrdset_done(st_intr);
35 -}
36 -
37 -#endif //NETDATA_SYSTEM_INTERRUPTS_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SYSTEM_INTERRUPTS_H
4 +#define NETDATA_SYSTEM_INTERRUPTS_H
5 +
6 +#include "common-contexts.h"
7 +
8 +#define _
9 +
10 +static inline void common_interrupts(uint64_t interrupts, int update_every, char *ext_module) {
11 + static RRDSET *st_intr = NULL;
12 + static RRDDIM *rd_interrupts = NULL;
13 +
14 + char *module = (!ext_module) ? _COMMON_PLUGIN_MODULE_NAME: ext_module;
15 +
16 + if(unlikely(!st_intr)) {
17 + st_intr = rrdset_create_localhost( "system"
18 + , "intr"
19 + , NULL
20 + , "interrupts"
21 + , NULL
22 + , "CPU Interrupts"
23 + , "interrupts/s"
24 + , _COMMON_PLUGIN_NAME
25 + , module
26 + , NETDATA_CHART_PRIO_SYSTEM_INTR
27 + , update_every
28 + , RRDSET_TYPE_LINE);
29 +
30 + rd_interrupts = rrddim_add(st_intr, "interrupts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
31 + }
32 +
33 + rrddim_set_by_pointer(st_intr, rd_interrupts, (collected_number)interrupts);
34 + rrdset_done(st_intr);
35 +}
36 +
37 +#endif //NETDATA_SYSTEM_INTERRUPTS_H
src/collectors/common-contexts/system-io.h
+38 -38
@@ -1,38 +1,38 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SYSTEM_IO_H
4 -#define NETDATA_SYSTEM_IO_H
5 -
6 -#include "common-contexts.h"
7 -
8 -static inline void common_system_io(uint64_t read_bytes, uint64_t write_bytes, int update_every) {
9 - static RRDSET *st_io = NULL;
10 - static RRDDIM *rd_in = NULL, *rd_out = NULL;
11 -
12 - if(unlikely(!st_io)) {
13 - st_io = rrdset_create_localhost(
14 - "system"
15 - , "io"
16 - , NULL
17 - , "disk"
18 - , NULL
19 - , "Disk I/O"
20 - , "KiB/s"
21 - , _COMMON_PLUGIN_NAME
22 - , _COMMON_PLUGIN_MODULE_NAME
23 - , NETDATA_CHART_PRIO_SYSTEM_IO
24 - , update_every
25 - , RRDSET_TYPE_AREA
26 - );
27 -
28 - rd_in = rrddim_add(st_io, "in", "reads", 1, 1024, RRD_ALGORITHM_INCREMENTAL);
29 - rd_out = rrddim_add(st_io, "out", "writes", -1, 1024, RRD_ALGORITHM_INCREMENTAL);
30 - }
31 -
32 - // this always have to be in base units, so that exporting sends base units to other time-series db
33 - rrddim_set_by_pointer(st_io, rd_in, (collected_number)read_bytes);
34 - rrddim_set_by_pointer(st_io, rd_out, (collected_number)write_bytes);
35 - rrdset_done(st_io);
36 -}
37 -
38 -#endif //NETDATA_SYSTEM_IO_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SYSTEM_IO_H
4 +#define NETDATA_SYSTEM_IO_H
5 +
6 +#include "common-contexts.h"
7 +
8 +static inline void common_system_io(uint64_t read_bytes, uint64_t write_bytes, int update_every) {
9 + static RRDSET *st_io = NULL;
10 + static RRDDIM *rd_in = NULL, *rd_out = NULL;
11 +
12 + if(unlikely(!st_io)) {
13 + st_io = rrdset_create_localhost(
14 + "system"
15 + , "io"
16 + , NULL
17 + , "disk"
18 + , NULL
19 + , "Disk I/O"
20 + , "KiB/s"
21 + , _COMMON_PLUGIN_NAME
22 + , _COMMON_PLUGIN_MODULE_NAME
23 + , NETDATA_CHART_PRIO_SYSTEM_IO
24 + , update_every
25 + , RRDSET_TYPE_AREA
26 + );
27 +
28 + rd_in = rrddim_add(st_io, "in", "reads", 1, 1024, RRD_ALGORITHM_INCREMENTAL);
29 + rd_out = rrddim_add(st_io, "out", "writes", -1, 1024, RRD_ALGORITHM_INCREMENTAL);
30 + }
31 +
32 + // this always have to be in base units, so that exporting sends base units to other time-series db
33 + rrddim_set_by_pointer(st_io, rd_in, (collected_number)read_bytes);
34 + rrddim_set_by_pointer(st_io, rd_out, (collected_number)write_bytes);
35 + rrdset_done(st_io);
36 +}
37 +
38 +#endif //NETDATA_SYSTEM_IO_H
src/collectors/common-contexts/system-ipc.h
+34 -34
@@ -1,34 +1,34 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SYSTEM_IPC_H
4 -#define NETDATA_SYSTEM_IPC_H
5 -
6 -#include "common-contexts.h"
7 -
8 -static inline void common_semaphore_ipc(uint64_t semaphore, NETDATA_DOUBLE red, char *module, int update_every) {
9 - static RRDSET *st_semaphores = NULL;
10 - static RRDDIM *rd_semaphores = NULL;
11 - if(unlikely(!st_semaphores)) {
12 - st_semaphores = rrdset_create_localhost("system"
13 - , "ipc_semaphores"
14 - , NULL
15 - , "ipc semaphores"
16 - , NULL
17 - , "IPC Semaphores"
18 - , "semaphores"
19 - , _COMMON_PLUGIN_NAME
20 - , module
21 - , NETDATA_CHART_PRIO_SYSTEM_IPC_SEMAPHORES
22 - , update_every
23 - , RRDSET_TYPE_AREA
24 - );
25 - rd_semaphores = rrddim_add(st_semaphores, "semaphores", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
26 - }
27 -
28 - rrddim_set_by_pointer(st_semaphores, rd_semaphores, semaphore);
29 - rrdset_done(st_semaphores);
30 - if (!strcmp(module, "ipc"))
31 - st_semaphores->red = red;
32 -}
33 -
34 -#endif //NETDATA_SYSTEM_IPC_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SYSTEM_IPC_H
4 +#define NETDATA_SYSTEM_IPC_H
5 +
6 +#include "common-contexts.h"
7 +
8 +static inline void common_semaphore_ipc(uint64_t semaphore, NETDATA_DOUBLE red, char *module, int update_every) {
9 + static RRDSET *st_semaphores = NULL;
10 + static RRDDIM *rd_semaphores = NULL;
11 + if(unlikely(!st_semaphores)) {
12 + st_semaphores = rrdset_create_localhost("system"
13 + , "ipc_semaphores"
14 + , NULL
15 + , "ipc semaphores"
16 + , NULL
17 + , "IPC Semaphores"
18 + , "semaphores"
19 + , _COMMON_PLUGIN_NAME
20 + , module
21 + , NETDATA_CHART_PRIO_SYSTEM_IPC_SEMAPHORES
22 + , update_every
23 + , RRDSET_TYPE_AREA
24 + );
25 + rd_semaphores = rrddim_add(st_semaphores, "semaphores", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
26 + }
27 +
28 + rrddim_set_by_pointer(st_semaphores, rd_semaphores, semaphore);
29 + rrdset_done(st_semaphores);
30 + if (!strcmp(module, "ipc"))
31 + st_semaphores->red = red;
32 +}
33 +
34 +#endif //NETDATA_SYSTEM_IPC_H
src/collectors/common-contexts/system-processes.h
+115 -115
@@ -1,115 +1,115 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SYSTEM_PROCESSES_H
4 -#define NETDATA_SYSTEM_PROCESSES_H
5 -
6 -#include "common-contexts.h"
7 -
8 -#define _system_process_chart() \
9 - rrdset_create_localhost( \
10 - "system" \
11 - , "processes" \
12 - , NULL \
13 - , "processes" \
14 - , NULL \
15 - , "System Processes" \
16 - , "processes" \
17 - , _COMMON_PLUGIN_NAME \
18 - , _COMMON_PLUGIN_MODULE_NAME \
19 - , NETDATA_CHART_PRIO_SYSTEM_PROCESSES \
20 - , update_every \
21 - , RRDSET_TYPE_LINE \
22 - )
23 -
24 -#if defined(OS_WINDOWS)
25 -static inline void common_system_processes(uint64_t running, int update_every) {
26 - static RRDSET *st_processes = NULL;
27 - static RRDDIM *rd_running = NULL;
28 -
29 - if(unlikely(!st_processes)) {
30 - st_processes = _system_process_chart();
31 -
32 - rd_running = rrddim_add(st_processes, "running", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
33 - }
34 -
35 - rrddim_set_by_pointer(st_processes, rd_running, running);
36 - rrdset_done(st_processes);
37 -}
38 -
39 -// EBPF COUNTER PART
40 -static inline void common_system_threads(uint64_t threads, int update_every) {
41 - static RRDSET *st_threads = NULL;
42 - static RRDDIM *rd_threads = NULL;
43 -
44 - if(unlikely(!st_threads)) {
45 - st_threads = rrdset_create_localhost(
46 - "system"
47 - , "threads"
48 - , NULL
49 - , "processes"
50 - , NULL
51 - , "Threads"
52 - , "threads"
53 - , _COMMON_PLUGIN_NAME
54 - , _COMMON_PLUGIN_MODULE_NAME
55 - , NETDATA_CHART_PRIO_WINDOWS_THREADS
56 - , update_every
57 - , RRDSET_TYPE_LINE
58 - );
59 -
60 - rd_threads = rrddim_add(st_threads, "threads", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
61 - }
62 -
63 - rrddim_set_by_pointer(st_threads, rd_threads, threads);
64 - rrdset_done(st_threads);
65 -}
66 -#endif
67 -
68 -#if defined(OS_LINUX)
69 -static inline void common_system_processes(uint64_t running, uint64_t blocked, int update_every) {
70 - static RRDSET *st_processes = NULL;
71 - static RRDDIM *rd_running = NULL;
72 - static RRDDIM *rd_blocked = NULL;
73 -
74 - if(unlikely(!st_processes)) {
75 - st_processes = _system_process_chart();
76 -
77 - rd_running = rrddim_add(st_processes, "running", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
78 - rd_blocked = rrddim_add(st_processes, "blocked", NULL, -1, 1, RRD_ALGORITHM_ABSOLUTE);
79 - }
80 -
81 - rrddim_set_by_pointer(st_processes, rd_running, (collected_number)running);
82 - rrddim_set_by_pointer(st_processes, rd_blocked, (collected_number)blocked);
83 - rrdset_done(st_processes);
84 -}
85 -#endif
86 -
87 -static inline void common_system_context_switch(uint64_t value, int update_every) {
88 - static RRDSET *st_ctxt = NULL;
89 - static RRDDIM *rd_switches = NULL;
90 -
91 - if(unlikely(!st_ctxt)) {
92 - st_ctxt = rrdset_create_localhost(
93 - "system"
94 - , "ctxt"
95 - , NULL
96 - , "processes"
97 - , NULL
98 - , "CPU Context Switches"
99 - , "context switches/s"
100 - , _COMMON_PLUGIN_NAME
101 - , _COMMON_PLUGIN_MODULE_NAME
102 - , NETDATA_CHART_PRIO_SYSTEM_CTXT
103 - , update_every
104 - , RRDSET_TYPE_LINE
105 - );
106 -
107 - rd_switches = rrddim_add(st_ctxt, "switches", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
108 - }
109 -
110 - rrddim_set_by_pointer(st_ctxt, rd_switches, (collected_number)value);
111 - rrdset_done(st_ctxt);
112 -}
113 -
114 -
115 -#endif //NETDATA_SYSTEM_PROCESSES_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SYSTEM_PROCESSES_H
4 +#define NETDATA_SYSTEM_PROCESSES_H
5 +
6 +#include "common-contexts.h"
7 +
8 +#define _system_process_chart() \
9 + rrdset_create_localhost( \
10 + "system" \
11 + , "processes" \
12 + , NULL \
13 + , "processes" \
14 + , NULL \
15 + , "System Processes" \
16 + , "processes" \
17 + , _COMMON_PLUGIN_NAME \
18 + , _COMMON_PLUGIN_MODULE_NAME \
19 + , NETDATA_CHART_PRIO_SYSTEM_PROCESSES \
20 + , update_every \
21 + , RRDSET_TYPE_LINE \
22 + )
23 +
24 +#if defined(OS_WINDOWS)
25 +static inline void common_system_processes(uint64_t running, int update_every) {
26 + static RRDSET *st_processes = NULL;
27 + static RRDDIM *rd_running = NULL;
28 +
29 + if(unlikely(!st_processes)) {
30 + st_processes = _system_process_chart();
31 +
32 + rd_running = rrddim_add(st_processes, "running", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
33 + }
34 +
35 + rrddim_set_by_pointer(st_processes, rd_running, running);
36 + rrdset_done(st_processes);
37 +}
38 +
39 +// EBPF COUNTER PART
40 +static inline void common_system_threads(uint64_t threads, int update_every) {
41 + static RRDSET *st_threads = NULL;
42 + static RRDDIM *rd_threads = NULL;
43 +
44 + if(unlikely(!st_threads)) {
45 + st_threads = rrdset_create_localhost(
46 + "system"
47 + , "threads"
48 + , NULL
49 + , "processes"
50 + , NULL
51 + , "Threads"
52 + , "threads"
53 + , _COMMON_PLUGIN_NAME
54 + , _COMMON_PLUGIN_MODULE_NAME
55 + , NETDATA_CHART_PRIO_WINDOWS_THREADS
56 + , update_every
57 + , RRDSET_TYPE_LINE
58 + );
59 +
60 + rd_threads = rrddim_add(st_threads, "threads", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
61 + }
62 +
63 + rrddim_set_by_pointer(st_threads, rd_threads, threads);
64 + rrdset_done(st_threads);
65 +}
66 +#endif
67 +
68 +#if defined(OS_LINUX)
69 +static inline void common_system_processes(uint64_t running, uint64_t blocked, int update_every) {
70 + static RRDSET *st_processes = NULL;
71 + static RRDDIM *rd_running = NULL;
72 + static RRDDIM *rd_blocked = NULL;
73 +
74 + if(unlikely(!st_processes)) {
75 + st_processes = _system_process_chart();
76 +
77 + rd_running = rrddim_add(st_processes, "running", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
78 + rd_blocked = rrddim_add(st_processes, "blocked", NULL, -1, 1, RRD_ALGORITHM_ABSOLUTE);
79 + }
80 +
81 + rrddim_set_by_pointer(st_processes, rd_running, (collected_number)running);
82 + rrddim_set_by_pointer(st_processes, rd_blocked, (collected_number)blocked);
83 + rrdset_done(st_processes);
84 +}
85 +#endif
86 +
87 +static inline void common_system_context_switch(uint64_t value, int update_every) {
88 + static RRDSET *st_ctxt = NULL;
89 + static RRDDIM *rd_switches = NULL;
90 +
91 + if(unlikely(!st_ctxt)) {
92 + st_ctxt = rrdset_create_localhost(
93 + "system"
94 + , "ctxt"
95 + , NULL
96 + , "processes"
97 + , NULL
98 + , "CPU Context Switches"
99 + , "context switches/s"
100 + , _COMMON_PLUGIN_NAME
101 + , _COMMON_PLUGIN_MODULE_NAME
102 + , NETDATA_CHART_PRIO_SYSTEM_CTXT
103 + , update_every
104 + , RRDSET_TYPE_LINE
105 + );
106 +
107 + rd_switches = rrddim_add(st_ctxt, "switches", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
108 + }
109 +
110 + rrddim_set_by_pointer(st_ctxt, rd_switches, (collected_number)value);
111 + rrdset_done(st_ctxt);
112 +}
113 +
114 +
115 +#endif //NETDATA_SYSTEM_PROCESSES_H
src/collectors/cups.plugin/cups_plugin.c
+2 -8
@@ -1,11 +1,5 @@
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 -/*
4 - * netdata cups.plugin
5 - * (C) Copyright 2017-2018 Simon Nagl <simon.nagl@gmx.de>
6 - * Released under GPL v3+
7 - */
8 -
3 #include "libnetdata/libnetdata.h"
4 #include "libnetdata/required_dummies.h"
5
@@ -53,9 +47,9 @@ void print_help() {
47 "\n"
48 "netdata cups.plugin %s\n"
49 "\n"
56 - "Copyright (C) 2017-2018 Simon Nagl <simon.nagl@gmx.de>\n"
50 + "Copyright 2018-2025 Netdata Inc.\n"
51 + "Original Author: Simon Nagl <simon.nagl@gmx.de>\n"
52 "Released under GNU General Public License v3+.\n"
58 - "All rights reserved.\n"
53 "\n"
54 "This program is a data collector plugin for netdata.\n"
55 "\n"
src/collectors/ebpf.plugin/ebpf.c
+2 -13
@@ -2201,21 +2201,11 @@ void ebpf_update_disabled_plugin_stats(ebpf_module_t *em)
2201 */
2202 void ebpf_print_help()
2203 {
2204 - const time_t t = time(NULL);
2205 - struct tm ct;
2206 - struct tm *test = localtime_r(&t, &ct);
2207 - int year;
2208 - if (test)
2209 - year = ct.tm_year;
2210 - else
2211 - year = 0;
2212 -
2204 fprintf(stderr,
2205 "\n"
2206 " Netdata ebpf.plugin %s\n"
2216 - " Copyright (C) 2016-%d Costa Tsaousis <costa@tsaousis.gr>\n"
2207 + " Copyright 2018-2025 Netdata Inc.\n"
2208 " Released under GNU General Public License v3 or later.\n"
2218 - " All rights reserved.\n"
2209 "\n"
2210 " This eBPF.plugin is a data collector plugin for netdata.\n"
2211 "\n"
@@ -2267,8 +2257,7 @@ void ebpf_print_help()
2257 "\n"
2258 " [-]-core Use CO-RE when available(Working in progress).\n"
2259 "\n",
2270 - NETDATA_VERSION,
2271 - (year >= 116) ? year + 1900 : 2020);
2260 + NETDATA_VERSION);
2261 }
2262
2263 /*****************************************************************
src/collectors/freeipmi.plugin/freeipmi_plugin.c
+1 -6
@@ -1,9 +1,5 @@
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 /*
3 - * netdata freeipmi.plugin
4 - * Copyright (C) 2023 Netdata Inc.
5 - * GPL v3+
6 - *
3 * Based on:
4 * ipmimonitoring-sensors.c,v 1.51 2016/11/02 23:46:24 chu11 Exp
5 * ipmimonitoring-sel.c,v 1.51 2016/11/02 23:46:24 chu11 Exp
@@ -1740,9 +1736,8 @@ int main (int argc, char **argv) {
1736 fprintf(stderr,
1737 "\n"
1738 " netdata %s %s\n"
1743 - " Copyright (C) 2023 Netdata Inc.\n"
1739 + " Copyright 2018-2025 Netdata Inc.\n"
1740 " Released under GNU General Public License v3 or later.\n"
1745 - " All rights reserved.\n"
1741 "\n"
1742 " This program is a data collector plugin for netdata.\n"
1743 "\n"
src/collectors/ioping.plugin/ioping.plugin.in
-5
@@ -1,10 +1,5 @@
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 -
4 -# netdata
5 -# real-time performance and health monitoring, done right!
6 -# (C) 2017 Costa Tsaousis <costa@tsaousis.gr>
7 -# GPL v3+
3 #
4 # This plugin requires a latest version of ioping.
5 # You can compile it from source, by running me with option: install
src/collectors/nfacct.plugin/plugin_nfacct.c
+1 -2
@@ -774,9 +774,8 @@ int main(int argc, char **argv) {
774 fprintf(stderr,
775 "\n"
776 " netdata nfacct.plugin %s\n"
777 - " Copyright (C) 2015-2017 Costa Tsaousis <costa@tsaousis.gr>\n"
777 + " Copyright 2018-2025 Netdata Inc.\n"
778 " Released under GNU General Public License v3 or later.\n"
779 - " All rights reserved.\n"
779 "\n"
780 " This program is a data collector plugin for netdata.\n"
781 "\n"
src/collectors/perf.plugin/perf_plugin.c
+1 -2
@@ -1212,9 +1212,8 @@ void parse_command_line(int argc, char **argv) {
1212 fprintf(stderr,
1213 "\n"
1214 " netdata perf.plugin %s\n"
1215 - " Copyright (C) 2019 Netdata Inc.\n"
1215 + " Copyright 2018-2025 Netdata Inc.\n"
1216 " Released under GNU General Public License v3 or later.\n"
1217 - " All rights reserved.\n"
1217 "\n"
1218 " This program is a data collector plugin for netdata.\n"
1219 "\n"
src/collectors/python.d.plugin/python.d.plugin.in
-3
@@ -19,9 +19,6 @@ fi
19 exec "$pybinary" "$0" "${filtered[@]}" # '''
20
21 # -*- coding: utf-8 -*-
22 -# Description:
23 -# Author: Pawel Krupa (paulfantom)
24 -# Author: Ilya Mashchenko (l2isbad)
22 # SPDX-License-Identifier: GPL-3.0-or-later
23
24 import collections
src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/ExecutableService.py
-2
@@ -1,7 +1,5 @@
1 # -*- coding: utf-8 -*-
2 # Description:
3 -# Author: Pawel Krupa (paulfantom)
4 -# Author: Ilya Mashchenko (ilyam8)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 import os
src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/LogService.py
-2
@@ -1,7 +1,5 @@
1 # -*- coding: utf-8 -*-
2 # Description:
3 -# Author: Pawel Krupa (paulfantom)
4 -# Author: Ilya Mashchenko (ilyam8)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 from glob import glob
src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SimpleService.py
-2
@@ -1,7 +1,5 @@
1 # -*- coding: utf-8 -*-
2 # Description:
3 -# Author: Pawel Krupa (paulfantom)
4 -# Author: Ilya Mashchenko (ilyam8)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 import os
src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
-2
@@ -1,7 +1,5 @@
1 # -*- coding: utf-8 -*-
2 # Description:
3 -# Author: Pawel Krupa (paulfantom)
4 -# Author: Ilya Mashchenko (ilyam8)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 import errno
src/collectors/python.d.plugin/python_modules/bases/FrameworkServices/UrlService.py
-2
@@ -1,7 +1,5 @@
1 # -*- coding: utf-8 -*-
2 # Description:
3 -# Author: Pawel Krupa (paulfantom)
4 -# Author: Ilya Mashchenko (ilyam8)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 import urllib3
src/collectors/systemd-journal.plugin/systemd-journal.c
-5
@@ -1,9 +1,4 @@
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 -/*
3 - * netdata systemd-journal.plugin
4 - * Copyright (C) 2023 Netdata Inc.
5 - * GPL v3+
6 - */
2
3 /*
4 * TODO
src/collectors/tc.plugin/tc-qos-helper.sh.in
-4
@@ -1,8 +1,4 @@
1 #!/usr/bin/env bash
2 -
3 -# netdata
4 -# real-time performance and health monitoring, done right!
5 -# (C) 2023 Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # This script is a helper to allow netdata collect tc data.
src/collectors/utils/local_listeners.c
+1 -1
@@ -76,7 +76,7 @@ int main(int argc, char **argv) {
76 fprintf(stderr,
77 "\n"
78 " Netdata local-listeners\n"
79 - " (C) 2024 Netdata Inc.\n"
79 + " Copyright 2018-2025 Netdata Inc.\n"
80 "\n"
81 " This program prints a list of all the processes that have a listening socket.\n"
82 " It is used by Netdata to auto-detect the services running.\n"
src/collectors/utils/ndsudo.c
+1 -1
@@ -381,7 +381,7 @@ void show_help() {
381 fprintf(stdout, "\n");
382 fprintf(stdout, "ndsudo\n");
383 fprintf(stdout, "\n");
384 - fprintf(stdout, "(C) Netdata Inc.\n");
384 + fprintf(stdout, "Copyright 2018-2025 Netdata Inc.\n");
385 fprintf(stdout, "\n");
386 fprintf(stdout, "A helper to allow Netdata run privileged commands.\n");
387 fprintf(stdout, "\n");
src/collectors/windows-events.plugin/README.md
+289 -289
@@ -1,289 +1,289 @@
1 -# Windows Events plugin
2 -
3 -[KEY FEATURES](#key-features) | [EVENTS SOURCES](#events-sources) | [EVENT FIELDS](#event-fields) |
4 -[PLAY MODE](#play-mode) | [FULL TEXT SEARCH](#full-text-search) | [PERFORMANCE](#query-performance) |
5 -[CONFIGURATION](#configuration-and-maintenance) | [FAQ](#faq)
6 -
7 -The Windows Events plugin by Netdata makes viewing, exploring and analyzing Windows Events simple and
8 -efficient.
9 -
10 -![image](https://github.com/user-attachments/assets/71a1ab1d-5b7b-477e-a4e6-a30275a5710b)
11 -
12 -## Key features
13 -
14 -- Supports **Windows Event Logs (WEL)**.
15 -- Supports **Event Tracing for Windows (ETW)** and **TraceLogging (TL)**, when events are routed to Event Log.
16 -- Allows filtering on all System Events fields.
17 -- Allows **full text search** (`grep`) on all System and User fields.
18 -- Provides a **histogram** for log entries over time, with a break down per field-value, for any System Event field and any
19 - time-frame.
20 -- Supports coloring log entries based on severity.
21 -- In PLAY mode it "tails" all the Events, showing new log entries immediately after they are received.
22 -
23 -### Prerequisites
24 -
25 -`windows-events.plugin` is a Netdata Function Plugin.
26 -
27 -To protect your privacy, as with all Netdata Functions, a free Netdata Cloud user account is required to access it.
28 -For more information check [this discussion](https://github.com/netdata/netdata/discussions/16136).
29 -
30 -## Events Sources
31 -
32 -The plugin automatically detects all the available channels and offers a list of "Event Channels".
33 -
34 -By default, it aggregates events from all event channels, providing a unified view of all events.
35 -
36 -> To improve query performance, we recommend selecting the relevant event channels, before doing more
37 -> analysis on the events.
38 -
39 -In the list of events channels, several shortcuts are added, aggregating events according to various attributes:
40 -
41 -- `All`, aggregates events from all available channels. This provides a holistic view of all events in the system.
42 -- `All-Admin`, `All-Operational`, `All-Analytic` and `All-Debug` aggregates events from channels marked `Admin`, `Operational`, `Analytic` and `Debug`, respectively.
43 -- `All-Windows`, aggregates events from `Application`, `Security`, `System` and `Setup`.
44 -- `All-Enabled` and `All-Disabled` aggregates events from channels depending on their status.
45 -- `All-Forwarded` aggregates events from channels owned by `Microsoft-Windows-EventCollector`.
46 -- `All-Classic` aggregates events from channels using the Classic Event Log API.
47 -- `All-Of-X`, where `X` is a provider name, is offered for all providers having more than a channel.
48 -- `All-In-X`, where `X` is `Backup-Mode`, `Overwrite-Mode`, `StopWhenFull-Mode` and `RetainAndBackup-Mode`, aggregate events based on their channel retention policy.
49 -
50 -Channels that are configured but are not queryable, and channels that do not have any events in them, are automatically excluded from the channels list.
51 -
52 -## Event Fields
53 -
54 -Windows Events are structured with both system-defined fields and user-defined fields.
55 -The Windows Events plugin primarily works with the system-defined fields, which are consistently available
56 -across all event types.
57 -
58 -### System-defined fields
59 -
60 -The system-defined fields are:
61 -
62 -1. **EventRecordID**
63 - A unique, sequential identifier for the event within the channel. This ID increases as new events are logged.
64 -
65 -2. **Version**
66 - The version of the event, indicating possible structural changes or updates to the event definition.
67 -
68 - Netdata adds this field automatically when it is not zero.
69 -
70 -3. **Level**
71 - The severity or importance of the event. Levels can include:
72 - - 0: LogAlways (reserved)
73 - - 1: Critical
74 - - 2: Error
75 - - 3: Warning
76 - - 4: Informational
77 - - 5: Verbose
78 -
79 - Additionally, applications may define their own levels.
80 -
81 - Netdata provides 2 fields: `Level` and `LevelID` for the text and numeric representation of it.
82 -
83 -4. **Opcode**
84 - The action or state within a provider when the event was logged.
85 -
86 - Netdata provides 2 fields: `Opcode` and `OpcodeID` for the text and numeric representation of it.
87 -
88 -5. **EventID**
89 - This identifies the event template, linking it to a specific message or event type. Event IDs are provider-specific.
90 -
91 -6. **Task**
92 - Defines a higher-level categorization or logical grouping for the event, often related to a specific function within the application or provider.
93 -
94 - Netdata provides 2 fields: `Task` and `TaskID` for the text and numeric representation of it.
95 -
96 -7. **Qualifiers**
97 - Provides additional detail for interpreting the event and is often specific to the event source.
98 -
99 - Netdata adds this field automatically when it is not zero.
100 -
101 -8. **ProcessID**
102 - The ID of the process that generated the event, useful for pinpointing the source of the event within the system.
103 -
104 -9. **ThreadID**
105 - The ID of the thread within the process that generated the event, which helps in more detailed debugging scenarios.
106 -
107 -10. **Keywords**
108 - A categorization field that can be used for event filtering. Keywords are bit flags that represent categories or purposes of the event, providing additional context.
109 -
110 - Netdata provides 2 fields: `Keywords` and `keywordsID` for the text and numeric representation of it.
111 -
112 -11. **Provider**
113 - The unique identifier (GUID) of the event provider. This is essential for knowing which application or system component generated the event.
114 -
115 - Netdata provides 2 fields: `Provider` and `ProviderGUID` for its name and GUID of it.
116 -
117 -12. **ActivityID**
118 - A GUID that correlates events generated as part of the same operation or transaction, helping to track activities across different components or stages.
119 -
120 - Netdata adds this field automatically when it is not zero.
121 -
122 -13. **RelatedActivityID**
123 - A GUID that links related operations or transactions, allowing for tracing complex workflows where one event triggers or relates to another.
124 -
125 - Netdata adds this field automatically when it is not zero.
126 -
127 -14. **Timestamp**
128 - The timestamp when the event was created. This provides precise timing information about when the event occurred.
129 -
130 -15. **User**
131 - The system user who logged this event.
132 -
133 - Netdata provides 3 fields: `UserAccount`, `UserDomain` and `UserSID`.
134 -
135 -### User-defined fields
136 -Each event log entry can include up to 100 user-defined fields (per event-id).
137 -
138 -Unfortunately, accessing these fields is significantly slower, to a level that is not practical to do so
139 -when there are more than few thousand log entries to explore. So, Netdata presents them
140 -with lazy loading.
141 -
142 -This prevents Netdata for offering filtering for user-defined fields, although Netdata does support
143 -full text search on user-defined field values.
144 -
145 -### Event fields as columns in the table
146 -
147 -The system fields mentioned above are offered as columns on the UI. Use the gear button above the table to
148 -select visible columns.
149 -
150 -### Event fields as filters
151 -
152 -The plugin presents the system fields as filters for the query, with counters for each of the possible values
153 -for the field. This list can be used to quickly check which fields and values are available for the entire
154 -time-frame of the query, across multiple providers and channels.
155 -
156 -### Event fields as histogram sources
157 -
158 -The histogram can be based on any of the system fields that are available as filters. This allows you to
159 -visualize the distribution of events over time based on different criteria such as Level, Provider, or EventID.
160 -
161 -## PLAY mode
162 -
163 -The PLAY mode in this plugin allows real-time monitoring of new events as they are added to the Windows Event
164 -Log. This feature works by continuously querying for new events and updating the display.
165 -
166 -## Full-text search
167 -
168 -The plugin supports searching for text within all system and user fields of the events. This means that while
169 -user-defined fields are not directly filterable, they are searchable through the full-text search feature.
170 -
171 -Keep in mind that query performance is slower while doing full text search, mainly because the plugin
172 -needs to ask from the system to provide all the user fields values.
173 -
174 -## Query performance
175 -
176 -The plugin is optimized to work efficiently with Event Logs. It uses several layers of caching and
177 -similar techniques to offload as much work as possible from the system, offering quick responses even when
178 -hundreds of thousands of events are within the visible timeframe.
179 -
180 -To achieve this level of efficiency, the plugin:
181 -
182 -- pre-loads ETW providers' manifests for resolving numeric Levels, Opcodes, Tasks and Keywords to text.
183 -- caches number to text maps for Levels, Opcodes, Tasks and Keywords per provider for WEL providers.
184 -- caches user SID to account and domain maps.
185 -- lazy loads the "expensive" event Message and XML, so that the system is queried only for the visible events.
186 -
187 -For Full Text Search:
188 -
189 -- requests only the Message and the values of the user-fields from the system, avoiding the "expensive" XML call (which is still lazy-loaded).
190 -
191 -The result is a system that is highly efficient for working with moderate volumes (hundreds of thousands) of events.
192 -
193 -## Configuration and maintenance
194 -
195 -This Netdata plugin does not require any specific configuration. It automatically detects available event logs
196 -on the system.
197 -
198 -## FAQ
199 -
200 -### Can I use this plugin on event centralization servers?
201 -
202 -Yes. You can centralize your Windows Events using Windows Event Forwarding (WEF) or other event collection
203 -mechanisms, and then install Netdata on this events centralization server to explore the events of all your
204 -infrastructure.
205 -
206 -This plugin will automatically provide multi-node views of your events and also give you the ability to
207 -combine the events of multiple servers, as you see fit.
208 -
209 -### Can I use this plugin from a parent Netdata?
210 -
211 -Yes. When your nodes are connected to a Netdata parent, all their functions are available via the parent's UI.
212 -So, from the parent UI, you can access the functions of all your nodes.
213 -
214 -Keep in mind that to protect your privacy, in order to access Netdata functions, you need a free Netdata Cloud
215 -account.
216 -
217 -### Is any of my data exposed to Netdata Cloud from this plugin?
218 -
219 -No. When you access the Agent directly, none of your data passes through Netdata Cloud. You need a free Netdata
220 -Cloud account only to verify your identity and enable the use of Netdata Functions. Once this is done, all the
221 -data flow directly from your Netdata Agent to your web browser.
222 -
223 -When you access Netdata via https://app.netdata.cloud, your data travel via Netdata Cloud, but they are not stored
224 -in Netdata Cloud. This is to allow you access your Netdata Agents from anywhere. All communication from/to
225 -Netdata Cloud is encrypted.
226 -
227 -### What are the different types of event logs supported by this plugin?
228 -
229 -The plugin supports all the kinds of event logs currently supported by the Windows Event Viewer:
230 -
231 -- Windows Event Logs (WEL): The traditional event logging system in Windows.
232 -- Event Tracing for Windows (ETW): A more detailed and efficient event tracing system.
233 -- TraceLogging (TL): An extension of ETW that simplifies the process of adding events to your code.
234 -
235 -The plugin can access all of these when they are routed to the Windows Event Log.
236 -
237 -### How does this plugin handle user-defined fields in Windows Events?
238 -
239 -User-defined fields are not directly exposed as table columns or filters in the plugin interface. However,
240 -they are included in the XML representation of each event, which can be viewed in the info sidebar when
241 -clicking on an event entry. Additionally, the full-text search feature does search through these
242 -user-defined fields, allowing you to find specific information even if it's not in the main system fields.
243 -
244 -### Can I use this plugin to monitor real-time events?
245 -
246 -Yes, the plugin supports a PLAY mode that allows you to monitor events in real-time. When activated, it
247 -continuously updates to show new events as they are logged, similar to the "tail" functionality in
248 -Unix-like systems.
249 -
250 -### How does the plugin handle large volumes of events?
251 -
252 -The plugin is designed to handle moderate volumes of events (hundreds of thousands of events) efficiently.
253 -
254 -It is in our roadmap to port the `systemd-journal` sampling techniques to it, for working with very large
255 -datasets to provide quick responses while still giving accurate representations of the data. However, for
256 -the best performance, we recommend querying smaller time frames or using more specific filters when dealing
257 -with extremely large event volumes.
258 -
259 -### Can I use this plugin to analyze events from multiple servers?
260 -
261 -Yes, if you have set up Windows Event Forwarding (WEF) or another method of centralizing your Windows Events,
262 -you can use this plugin on the central server to analyze events from multiple sources. The plugin will
263 -automatically detect the available event sources.
264 -
265 -### How does the histogram feature work in this plugin?
266 -
267 -The histogram feature provides a visual representation of event frequency over time. You can base the
268 -histogram on any of the system fields available as filters (such as Level, Provider, or EventID). This
269 -allows you to quickly identify patterns or anomalies in your event logs.
270 -
271 -### Is it possible to export or share the results from this plugin?
272 -
273 -While the plugin doesn't have a direct export feature, you can use browser-based methods to save or share
274 -the results. This could include taking screenshots, using browser print/save as PDF functionality, or
275 -copying data from the table view. For more advanced data export needs, you might need to use the Windows
276 -Event Log API directly or other Windows administrative tools.
277 -
278 -### How often does the plugin update its data?
279 -
280 -The plugin updates its data in real-time when in PLAY mode. In normal mode, it refreshes data based on the
281 -query you've submitted. The plugin is designed to provide the most up-to-date information available in the
282 -Windows Event Logs at the time of the query.
283 -
284 -## TODO
285 -
286 -1. Support Sampling, so that the plugin can respond faster even on very busy systems (millions of events visible).
287 -2. Support exploring events from live Tracing sessions.
288 -3. Support exploring events in saved Event Trace Log files (`.etl` files).
289 -4. Support exploring events in saved Event Logs files (`.evtx` files).
1 +# Windows Events plugin
2 +
3 +[KEY FEATURES](#key-features) | [EVENTS SOURCES](#events-sources) | [EVENT FIELDS](#event-fields) |
4 +[PLAY MODE](#play-mode) | [FULL TEXT SEARCH](#full-text-search) | [PERFORMANCE](#query-performance) |
5 +[CONFIGURATION](#configuration-and-maintenance) | [FAQ](#faq)
6 +
7 +The Windows Events plugin by Netdata makes viewing, exploring and analyzing Windows Events simple and
8 +efficient.
9 +
10 +![image](https://github.com/user-attachments/assets/71a1ab1d-5b7b-477e-a4e6-a30275a5710b)
11 +
12 +## Key features
13 +
14 +- Supports **Windows Event Logs (WEL)**.
15 +- Supports **Event Tracing for Windows (ETW)** and **TraceLogging (TL)**, when events are routed to Event Log.
16 +- Allows filtering on all System Events fields.
17 +- Allows **full text search** (`grep`) on all System and User fields.
18 +- Provides a **histogram** for log entries over time, with a break down per field-value, for any System Event field and any
19 + time-frame.
20 +- Supports coloring log entries based on severity.
21 +- In PLAY mode it "tails" all the Events, showing new log entries immediately after they are received.
22 +
23 +### Prerequisites
24 +
25 +`windows-events.plugin` is a Netdata Function Plugin.
26 +
27 +To protect your privacy, as with all Netdata Functions, a free Netdata Cloud user account is required to access it.
28 +For more information check [this discussion](https://github.com/netdata/netdata/discussions/16136).
29 +
30 +## Events Sources
31 +
32 +The plugin automatically detects all the available channels and offers a list of "Event Channels".
33 +
34 +By default, it aggregates events from all event channels, providing a unified view of all events.
35 +
36 +> To improve query performance, we recommend selecting the relevant event channels, before doing more
37 +> analysis on the events.
38 +
39 +In the list of events channels, several shortcuts are added, aggregating events according to various attributes:
40 +
41 +- `All`, aggregates events from all available channels. This provides a holistic view of all events in the system.
42 +- `All-Admin`, `All-Operational`, `All-Analytic` and `All-Debug` aggregates events from channels marked `Admin`, `Operational`, `Analytic` and `Debug`, respectively.
43 +- `All-Windows`, aggregates events from `Application`, `Security`, `System` and `Setup`.
44 +- `All-Enabled` and `All-Disabled` aggregates events from channels depending on their status.
45 +- `All-Forwarded` aggregates events from channels owned by `Microsoft-Windows-EventCollector`.
46 +- `All-Classic` aggregates events from channels using the Classic Event Log API.
47 +- `All-Of-X`, where `X` is a provider name, is offered for all providers having more than a channel.
48 +- `All-In-X`, where `X` is `Backup-Mode`, `Overwrite-Mode`, `StopWhenFull-Mode` and `RetainAndBackup-Mode`, aggregate events based on their channel retention policy.
49 +
50 +Channels that are configured but are not queryable, and channels that do not have any events in them, are automatically excluded from the channels list.
51 +
52 +## Event Fields
53 +
54 +Windows Events are structured with both system-defined fields and user-defined fields.
55 +The Windows Events plugin primarily works with the system-defined fields, which are consistently available
56 +across all event types.
57 +
58 +### System-defined fields
59 +
60 +The system-defined fields are:
61 +
62 +1. **EventRecordID**
63 + A unique, sequential identifier for the event within the channel. This ID increases as new events are logged.
64 +
65 +2. **Version**
66 + The version of the event, indicating possible structural changes or updates to the event definition.
67 +
68 + Netdata adds this field automatically when it is not zero.
69 +
70 +3. **Level**
71 + The severity or importance of the event. Levels can include:
72 + - 0: LogAlways (reserved)
73 + - 1: Critical
74 + - 2: Error
75 + - 3: Warning
76 + - 4: Informational
77 + - 5: Verbose
78 +
79 + Additionally, applications may define their own levels.
80 +
81 + Netdata provides 2 fields: `Level` and `LevelID` for the text and numeric representation of it.
82 +
83 +4. **Opcode**
84 + The action or state within a provider when the event was logged.
85 +
86 + Netdata provides 2 fields: `Opcode` and `OpcodeID` for the text and numeric representation of it.
87 +
88 +5. **EventID**
89 + This identifies the event template, linking it to a specific message or event type. Event IDs are provider-specific.
90 +
91 +6. **Task**
92 + Defines a higher-level categorization or logical grouping for the event, often related to a specific function within the application or provider.
93 +
94 + Netdata provides 2 fields: `Task` and `TaskID` for the text and numeric representation of it.
95 +
96 +7. **Qualifiers**
97 + Provides additional detail for interpreting the event and is often specific to the event source.
98 +
99 + Netdata adds this field automatically when it is not zero.
100 +
101 +8. **ProcessID**
102 + The ID of the process that generated the event, useful for pinpointing the source of the event within the system.
103 +
104 +9. **ThreadID**
105 + The ID of the thread within the process that generated the event, which helps in more detailed debugging scenarios.
106 +
107 +10. **Keywords**
108 + A categorization field that can be used for event filtering. Keywords are bit flags that represent categories or purposes of the event, providing additional context.
109 +
110 + Netdata provides 2 fields: `Keywords` and `keywordsID` for the text and numeric representation of it.
111 +
112 +11. **Provider**
113 + The unique identifier (GUID) of the event provider. This is essential for knowing which application or system component generated the event.
114 +
115 + Netdata provides 2 fields: `Provider` and `ProviderGUID` for its name and GUID of it.
116 +
117 +12. **ActivityID**
118 + A GUID that correlates events generated as part of the same operation or transaction, helping to track activities across different components or stages.
119 +
120 + Netdata adds this field automatically when it is not zero.
121 +
122 +13. **RelatedActivityID**
123 + A GUID that links related operations or transactions, allowing for tracing complex workflows where one event triggers or relates to another.
124 +
125 + Netdata adds this field automatically when it is not zero.
126 +
127 +14. **Timestamp**
128 + The timestamp when the event was created. This provides precise timing information about when the event occurred.
129 +
130 +15. **User**
131 + The system user who logged this event.
132 +
133 + Netdata provides 3 fields: `UserAccount`, `UserDomain` and `UserSID`.
134 +
135 +### User-defined fields
136 +Each event log entry can include up to 100 user-defined fields (per event-id).
137 +
138 +Unfortunately, accessing these fields is significantly slower, to a level that is not practical to do so
139 +when there are more than few thousand log entries to explore. So, Netdata presents them
140 +with lazy loading.
141 +
142 +This prevents Netdata for offering filtering for user-defined fields, although Netdata does support
143 +full text search on user-defined field values.
144 +
145 +### Event fields as columns in the table
146 +
147 +The system fields mentioned above are offered as columns on the UI. Use the gear button above the table to
148 +select visible columns.
149 +
150 +### Event fields as filters
151 +
152 +The plugin presents the system fields as filters for the query, with counters for each of the possible values
153 +for the field. This list can be used to quickly check which fields and values are available for the entire
154 +time-frame of the query, across multiple providers and channels.
155 +
156 +### Event fields as histogram sources
157 +
158 +The histogram can be based on any of the system fields that are available as filters. This allows you to
159 +visualize the distribution of events over time based on different criteria such as Level, Provider, or EventID.
160 +
161 +## PLAY mode
162 +
163 +The PLAY mode in this plugin allows real-time monitoring of new events as they are added to the Windows Event
164 +Log. This feature works by continuously querying for new events and updating the display.
165 +
166 +## Full-text search
167 +
168 +The plugin supports searching for text within all system and user fields of the events. This means that while
169 +user-defined fields are not directly filterable, they are searchable through the full-text search feature.
170 +
171 +Keep in mind that query performance is slower while doing full text search, mainly because the plugin
172 +needs to ask from the system to provide all the user fields values.
173 +
174 +## Query performance
175 +
176 +The plugin is optimized to work efficiently with Event Logs. It uses several layers of caching and
177 +similar techniques to offload as much work as possible from the system, offering quick responses even when
178 +hundreds of thousands of events are within the visible timeframe.
179 +
180 +To achieve this level of efficiency, the plugin:
181 +
182 +- pre-loads ETW providers' manifests for resolving numeric Levels, Opcodes, Tasks and Keywords to text.
183 +- caches number to text maps for Levels, Opcodes, Tasks and Keywords per provider for WEL providers.
184 +- caches user SID to account and domain maps.
185 +- lazy loads the "expensive" event Message and XML, so that the system is queried only for the visible events.
186 +
187 +For Full Text Search:
188 +
189 +- requests only the Message and the values of the user-fields from the system, avoiding the "expensive" XML call (which is still lazy-loaded).
190 +
191 +The result is a system that is highly efficient for working with moderate volumes (hundreds of thousands) of events.
192 +
193 +## Configuration and maintenance
194 +
195 +This Netdata plugin does not require any specific configuration. It automatically detects available event logs
196 +on the system.
197 +
198 +## FAQ
199 +
200 +### Can I use this plugin on event centralization servers?
201 +
202 +Yes. You can centralize your Windows Events using Windows Event Forwarding (WEF) or other event collection
203 +mechanisms, and then install Netdata on this events centralization server to explore the events of all your
204 +infrastructure.
205 +
206 +This plugin will automatically provide multi-node views of your events and also give you the ability to
207 +combine the events of multiple servers, as you see fit.
208 +
209 +### Can I use this plugin from a parent Netdata?
210 +
211 +Yes. When your nodes are connected to a Netdata parent, all their functions are available via the parent's UI.
212 +So, from the parent UI, you can access the functions of all your nodes.
213 +
214 +Keep in mind that to protect your privacy, in order to access Netdata functions, you need a free Netdata Cloud
215 +account.
216 +
217 +### Is any of my data exposed to Netdata Cloud from this plugin?
218 +
219 +No. When you access the Agent directly, none of your data passes through Netdata Cloud. You need a free Netdata
220 +Cloud account only to verify your identity and enable the use of Netdata Functions. Once this is done, all the
221 +data flow directly from your Netdata Agent to your web browser.
222 +
223 +When you access Netdata via https://app.netdata.cloud, your data travel via Netdata Cloud, but they are not stored
224 +in Netdata Cloud. This is to allow you access your Netdata Agents from anywhere. All communication from/to
225 +Netdata Cloud is encrypted.
226 +
227 +### What are the different types of event logs supported by this plugin?
228 +
229 +The plugin supports all the kinds of event logs currently supported by the Windows Event Viewer:
230 +
231 +- Windows Event Logs (WEL): The traditional event logging system in Windows.
232 +- Event Tracing for Windows (ETW): A more detailed and efficient event tracing system.
233 +- TraceLogging (TL): An extension of ETW that simplifies the process of adding events to your code.
234 +
235 +The plugin can access all of these when they are routed to the Windows Event Log.
236 +
237 +### How does this plugin handle user-defined fields in Windows Events?
238 +
239 +User-defined fields are not directly exposed as table columns or filters in the plugin interface. However,
240 +they are included in the XML representation of each event, which can be viewed in the info sidebar when
241 +clicking on an event entry. Additionally, the full-text search feature does search through these
242 +user-defined fields, allowing you to find specific information even if it's not in the main system fields.
243 +
244 +### Can I use this plugin to monitor real-time events?
245 +
246 +Yes, the plugin supports a PLAY mode that allows you to monitor events in real-time. When activated, it
247 +continuously updates to show new events as they are logged, similar to the "tail" functionality in
248 +Unix-like systems.
249 +
250 +### How does the plugin handle large volumes of events?
251 +
252 +The plugin is designed to handle moderate volumes of events (hundreds of thousands of events) efficiently.
253 +
254 +It is in our roadmap to port the `systemd-journal` sampling techniques to it, for working with very large
255 +datasets to provide quick responses while still giving accurate representations of the data. However, for
256 +the best performance, we recommend querying smaller time frames or using more specific filters when dealing
257 +with extremely large event volumes.
258 +
259 +### Can I use this plugin to analyze events from multiple servers?
260 +
261 +Yes, if you have set up Windows Event Forwarding (WEF) or another method of centralizing your Windows Events,
262 +you can use this plugin on the central server to analyze events from multiple sources. The plugin will
263 +automatically detect the available event sources.
264 +
265 +### How does the histogram feature work in this plugin?
266 +
267 +The histogram feature provides a visual representation of event frequency over time. You can base the
268 +histogram on any of the system fields available as filters (such as Level, Provider, or EventID). This
269 +allows you to quickly identify patterns or anomalies in your event logs.
270 +
271 +### Is it possible to export or share the results from this plugin?
272 +
273 +While the plugin doesn't have a direct export feature, you can use browser-based methods to save or share
274 +the results. This could include taking screenshots, using browser print/save as PDF functionality, or
275 +copying data from the table view. For more advanced data export needs, you might need to use the Windows
276 +Event Log API directly or other Windows administrative tools.
277 +
278 +### How often does the plugin update its data?
279 +
280 +The plugin updates its data in real-time when in PLAY mode. In normal mode, it refreshes data based on the
281 +query you've submitted. The plugin is designed to provide the most up-to-date information available in the
282 +Windows Event Logs at the time of the query.
283 +
284 +## TODO
285 +
286 +1. Support Sampling, so that the plugin can respond faster even on very busy systems (millions of events visible).
287 +2. Support exploring events from live Tracing sessions.
288 +3. Support exploring events in saved Event Trace Log files (`.etl` files).
289 +4. Support exploring events in saved Event Logs files (`.evtx` files).
src/collectors/windows-events.plugin/windows-events-fields-cache.c
+158 -158
@@ -1,158 +1,158 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#include "windows-events-fields-cache.h"
4 -
5 -typedef struct field_key {
6 - uint64_t value;
7 - ND_UUID provider;
8 -} WEVT_FIELD_KEY;
9 -
10 -typedef struct field_value {
11 - WEVT_FIELD_KEY key;
12 - uint32_t name_size;
13 - char name[];
14 -} WEVT_FIELD_VALUE;
15 -
16 -#define SIMPLE_HASHTABLE_NAME _FIELDS_CACHE
17 -#define SIMPLE_HASHTABLE_VALUE_TYPE WEVT_FIELD_VALUE *
18 -#define SIMPLE_HASHTABLE_KEY_TYPE WEVT_FIELD_KEY
19 -#define SIMPLE_HASHTABLE_VALUE2KEY_FUNCTION field_cache_value_to_key
20 -#define SIMPLE_HASHTABLE_COMPARE_KEYS_FUNCTION field_cache_cache_compar
21 -#define SIMPLE_HASHTABLE_SAMPLE_IMPLEMENTATION 1
22 -#include "libnetdata/simple_hashtable/simple_hashtable.h"
23 -
24 -static inline WEVT_FIELD_KEY *field_cache_value_to_key(WEVT_FIELD_VALUE *p) {
25 - return &p->key;
26 -}
27 -
28 -static inline bool field_cache_cache_compar(WEVT_FIELD_KEY *a, WEVT_FIELD_KEY *b) {
29 - return memcmp(a, b, sizeof(WEVT_FIELD_KEY)) == 0;
30 -}
31 -
32 -struct ht {
33 - SPINLOCK spinlock;
34 - size_t allocations;
35 - size_t bytes;
36 - struct simple_hashtable_FIELDS_CACHE ht;
37 -};
38 -
39 -static struct {
40 - bool initialized;
41 - struct ht ht[WEVT_FIELD_TYPE_MAX];
42 -} fdc = {
43 - .initialized = false,
44 -};
45 -
46 -void field_cache_init(void) {
47 - for(size_t type = 0; type < WEVT_FIELD_TYPE_MAX ; type++) {
48 - spinlock_init(&fdc.ht[type].spinlock);
49 - simple_hashtable_init_FIELDS_CACHE(&fdc.ht[type].ht, 10000);
50 - }
51 -}
52 -
53 -static inline bool should_zero_provider(WEVT_FIELD_TYPE type, uint64_t value) {
54 - switch(type) {
55 - case WEVT_FIELD_TYPE_LEVEL:
56 - return !is_valid_provider_level(value, true);
57 -
58 - case WEVT_FIELD_TYPE_KEYWORD:
59 - return !is_valid_provider_keyword(value, true);
60 -
61 - case WEVT_FIELD_TYPE_OPCODE:
62 - return !is_valid_provider_opcode(value, true);
63 -
64 - case WEVT_FIELD_TYPE_TASK:
65 - return !is_valid_provider_task(value, true);
66 -
67 - default:
68 - return false;
69 - }
70 -}
71 -
72 -bool field_cache_get(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *dst) {
73 - fatal_assert(type < WEVT_FIELD_TYPE_MAX);
74 -
75 - struct ht *ht = &fdc.ht[type];
76 -
77 - WEVT_FIELD_KEY t = {
78 - .value = value,
79 - .provider = should_zero_provider(type, value) ? UUID_ZERO : *uuid,
80 - };
81 - XXH64_hash_t hash = XXH3_64bits(&t, sizeof(t));
82 -
83 - spinlock_lock(&ht->spinlock);
84 - SIMPLE_HASHTABLE_SLOT_FIELDS_CACHE *slot = simple_hashtable_get_slot_FIELDS_CACHE(&ht->ht, hash, &t, true);
85 - WEVT_FIELD_VALUE *v = SIMPLE_HASHTABLE_SLOT_DATA(slot);
86 - spinlock_unlock(&ht->spinlock);
87 -
88 - if(v) {
89 - txt_utf8_resize(dst, v->name_size, false);
90 - memcpy(dst->data, v->name, v->name_size);
91 - dst->used = v->name_size;
92 - dst->src = TXT_SOURCE_FIELD_CACHE;
93 - return true;
94 - }
95 -
96 - return false;
97 -}
98 -
99 -static WEVT_FIELD_VALUE *wevt_create_cache_entry(WEVT_FIELD_KEY *t, TXT_UTF8 *name, size_t *bytes) {
100 - *bytes = sizeof(WEVT_FIELD_VALUE) + name->used;
101 - WEVT_FIELD_VALUE *v = callocz(1, *bytes);
102 - v->key = *t;
103 - memcpy(v->name, name->data, name->used);
104 - v->name_size = name->used;
105 - return v;
106 -}
107 -
108 -//static bool is_numeric(const char *s) {
109 -// while(*s) {
110 -// if(!isdigit((uint8_t)*s++))
111 -// return false;
112 -// }
113 -//
114 -// return true;
115 -//}
116 -
117 -void field_cache_set(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *name) {
118 - fatal_assert(type < WEVT_FIELD_TYPE_MAX);
119 -
120 - struct ht *ht = &fdc.ht[type];
121 -
122 - WEVT_FIELD_KEY t = {
123 - .value = value,
124 - .provider = should_zero_provider(type, value) ? UUID_ZERO : *uuid,
125 - };
126 - XXH64_hash_t hash = XXH3_64bits(&t, sizeof(t));
127 -
128 - spinlock_lock(&ht->spinlock);
129 - SIMPLE_HASHTABLE_SLOT_FIELDS_CACHE *slot = simple_hashtable_get_slot_FIELDS_CACHE(&ht->ht, hash, &t, true);
130 - WEVT_FIELD_VALUE *v = SIMPLE_HASHTABLE_SLOT_DATA(slot);
131 - if(!v) {
132 - size_t bytes;
133 - v = wevt_create_cache_entry(&t, name, &bytes);
134 - simple_hashtable_set_slot_FIELDS_CACHE(&ht->ht, slot, hash, v);
135 -
136 - ht->allocations++;
137 - ht->bytes += bytes;
138 - }
139 -// else {
140 -// if((v->name_size == 1 && name->used > 0) || is_numeric(v->name)) {
141 -// size_t bytes;
142 -// WEVT_FIELD_VALUE *nv = wevt_create_cache_entry(&t, name, &bytes);
143 -// simple_hashtable_set_slot_FIELDS_CACHE(&ht->ht, slot, hash, nv);
144 -// ht->bytes += name->used;
145 -// ht->bytes -= v->name_size;
146 -// freez(v);
147 -// }
148 -// else if(name->used > 2 && !is_numeric(name->data) && (v->name_size != name->used || strcasecmp(v->name, name->data) != 0)) {
149 -// const char *a = v->name;
150 -// const char *b = name->data;
151 -// int x = 0;
152 -// x++;
153 -// }
154 -// }
155 -
156 - spinlock_unlock(&ht->spinlock);
157 -}
158 -
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#include "windows-events-fields-cache.h"
4 +
5 +typedef struct field_key {
6 + uint64_t value;
7 + ND_UUID provider;
8 +} WEVT_FIELD_KEY;
9 +
10 +typedef struct field_value {
11 + WEVT_FIELD_KEY key;
12 + uint32_t name_size;
13 + char name[];
14 +} WEVT_FIELD_VALUE;
15 +
16 +#define SIMPLE_HASHTABLE_NAME _FIELDS_CACHE
17 +#define SIMPLE_HASHTABLE_VALUE_TYPE WEVT_FIELD_VALUE *
18 +#define SIMPLE_HASHTABLE_KEY_TYPE WEVT_FIELD_KEY
19 +#define SIMPLE_HASHTABLE_VALUE2KEY_FUNCTION field_cache_value_to_key
20 +#define SIMPLE_HASHTABLE_COMPARE_KEYS_FUNCTION field_cache_cache_compar
21 +#define SIMPLE_HASHTABLE_SAMPLE_IMPLEMENTATION 1
22 +#include "libnetdata/simple_hashtable/simple_hashtable.h"
23 +
24 +static inline WEVT_FIELD_KEY *field_cache_value_to_key(WEVT_FIELD_VALUE *p) {
25 + return &p->key;
26 +}
27 +
28 +static inline bool field_cache_cache_compar(WEVT_FIELD_KEY *a, WEVT_FIELD_KEY *b) {
29 + return memcmp(a, b, sizeof(WEVT_FIELD_KEY)) == 0;
30 +}
31 +
32 +struct ht {
33 + SPINLOCK spinlock;
34 + size_t allocations;
35 + size_t bytes;
36 + struct simple_hashtable_FIELDS_CACHE ht;
37 +};
38 +
39 +static struct {
40 + bool initialized;
41 + struct ht ht[WEVT_FIELD_TYPE_MAX];
42 +} fdc = {
43 + .initialized = false,
44 +};
45 +
46 +void field_cache_init(void) {
47 + for(size_t type = 0; type < WEVT_FIELD_TYPE_MAX ; type++) {
48 + spinlock_init(&fdc.ht[type].spinlock);
49 + simple_hashtable_init_FIELDS_CACHE(&fdc.ht[type].ht, 10000);
50 + }
51 +}
52 +
53 +static inline bool should_zero_provider(WEVT_FIELD_TYPE type, uint64_t value) {
54 + switch(type) {
55 + case WEVT_FIELD_TYPE_LEVEL:
56 + return !is_valid_provider_level(value, true);
57 +
58 + case WEVT_FIELD_TYPE_KEYWORD:
59 + return !is_valid_provider_keyword(value, true);
60 +
61 + case WEVT_FIELD_TYPE_OPCODE:
62 + return !is_valid_provider_opcode(value, true);
63 +
64 + case WEVT_FIELD_TYPE_TASK:
65 + return !is_valid_provider_task(value, true);
66 +
67 + default:
68 + return false;
69 + }
70 +}
71 +
72 +bool field_cache_get(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *dst) {
73 + fatal_assert(type < WEVT_FIELD_TYPE_MAX);
74 +
75 + struct ht *ht = &fdc.ht[type];
76 +
77 + WEVT_FIELD_KEY t = {
78 + .value = value,
79 + .provider = should_zero_provider(type, value) ? UUID_ZERO : *uuid,
80 + };
81 + XXH64_hash_t hash = XXH3_64bits(&t, sizeof(t));
82 +
83 + spinlock_lock(&ht->spinlock);
84 + SIMPLE_HASHTABLE_SLOT_FIELDS_CACHE *slot = simple_hashtable_get_slot_FIELDS_CACHE(&ht->ht, hash, &t, true);
85 + WEVT_FIELD_VALUE *v = SIMPLE_HASHTABLE_SLOT_DATA(slot);
86 + spinlock_unlock(&ht->spinlock);
87 +
88 + if(v) {
89 + txt_utf8_resize(dst, v->name_size, false);
90 + memcpy(dst->data, v->name, v->name_size);
91 + dst->used = v->name_size;
92 + dst->src = TXT_SOURCE_FIELD_CACHE;
93 + return true;
94 + }
95 +
96 + return false;
97 +}
98 +
99 +static WEVT_FIELD_VALUE *wevt_create_cache_entry(WEVT_FIELD_KEY *t, TXT_UTF8 *name, size_t *bytes) {
100 + *bytes = sizeof(WEVT_FIELD_VALUE) + name->used;
101 + WEVT_FIELD_VALUE *v = callocz(1, *bytes);
102 + v->key = *t;
103 + memcpy(v->name, name->data, name->used);
104 + v->name_size = name->used;
105 + return v;
106 +}
107 +
108 +//static bool is_numeric(const char *s) {
109 +// while(*s) {
110 +// if(!isdigit((uint8_t)*s++))
111 +// return false;
112 +// }
113 +//
114 +// return true;
115 +//}
116 +
117 +void field_cache_set(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *name) {
118 + fatal_assert(type < WEVT_FIELD_TYPE_MAX);
119 +
120 + struct ht *ht = &fdc.ht[type];
121 +
122 + WEVT_FIELD_KEY t = {
123 + .value = value,
124 + .provider = should_zero_provider(type, value) ? UUID_ZERO : *uuid,
125 + };
126 + XXH64_hash_t hash = XXH3_64bits(&t, sizeof(t));
127 +
128 + spinlock_lock(&ht->spinlock);
129 + SIMPLE_HASHTABLE_SLOT_FIELDS_CACHE *slot = simple_hashtable_get_slot_FIELDS_CACHE(&ht->ht, hash, &t, true);
130 + WEVT_FIELD_VALUE *v = SIMPLE_HASHTABLE_SLOT_DATA(slot);
131 + if(!v) {
132 + size_t bytes;
133 + v = wevt_create_cache_entry(&t, name, &bytes);
134 + simple_hashtable_set_slot_FIELDS_CACHE(&ht->ht, slot, hash, v);
135 +
136 + ht->allocations++;
137 + ht->bytes += bytes;
138 + }
139 +// else {
140 +// if((v->name_size == 1 && name->used > 0) || is_numeric(v->name)) {
141 +// size_t bytes;
142 +// WEVT_FIELD_VALUE *nv = wevt_create_cache_entry(&t, name, &bytes);
143 +// simple_hashtable_set_slot_FIELDS_CACHE(&ht->ht, slot, hash, nv);
144 +// ht->bytes += name->used;
145 +// ht->bytes -= v->name_size;
146 +// freez(v);
147 +// }
148 +// else if(name->used > 2 && !is_numeric(name->data) && (v->name_size != name->used || strcasecmp(v->name, name->data) != 0)) {
149 +// const char *a = v->name;
150 +// const char *b = name->data;
151 +// int x = 0;
152 +// x++;
153 +// }
154 +// }
155 +
156 + spinlock_unlock(&ht->spinlock);
157 +}
158 +
src/collectors/windows-events.plugin/windows-events-fields-cache.h
+22 -22
@@ -1,22 +1,22 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
4 -#define NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
5 -
6 -#include "windows-events.h"
7 -
8 -typedef enum __attribute__((packed)) {
9 - WEVT_FIELD_TYPE_LEVEL = 0,
10 - WEVT_FIELD_TYPE_OPCODE,
11 - WEVT_FIELD_TYPE_KEYWORD,
12 - WEVT_FIELD_TYPE_TASK,
13 -
14 - // terminator
15 - WEVT_FIELD_TYPE_MAX,
16 -} WEVT_FIELD_TYPE;
17 -
18 -void field_cache_init(void);
19 -bool field_cache_get(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *dst);
20 -void field_cache_set(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *name);
21 -
22 -#endif //NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
4 +#define NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
5 +
6 +#include "windows-events.h"
7 +
8 +typedef enum __attribute__((packed)) {
9 + WEVT_FIELD_TYPE_LEVEL = 0,
10 + WEVT_FIELD_TYPE_OPCODE,
11 + WEVT_FIELD_TYPE_KEYWORD,
12 + WEVT_FIELD_TYPE_TASK,
13 +
14 + // terminator
15 + WEVT_FIELD_TYPE_MAX,
16 +} WEVT_FIELD_TYPE;
17 +
18 +void field_cache_init(void);
19 +bool field_cache_get(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *dst);
20 +void field_cache_set(WEVT_FIELD_TYPE type, const ND_UUID *uuid, uint64_t value, TXT_UTF8 *name);
21 +
22 +#endif //NETDATA_WINDOWS_EVENTS_FIELDS_CACHE_H
src/collectors/xenstat.plugin/xenstat_plugin.c
+1 -2
@@ -952,9 +952,8 @@ int main(int argc, char **argv) {
952 fprintf(stderr,
953 "\n"
954 " netdata xenstat.plugin %s\n"
955 - " Copyright (C) 2019 Netdata Inc.\n"
955 + " Copyright 2018-2025 Netdata Inc.\n"
956 " Released under GNU General Public License v3 or later.\n"
957 - " All rights reserved.\n"
957 "\n"
958 " This program is a data collector plugin for netdata.\n"
959 "\n"
src/daemon/main.c
+2 -3
@@ -101,12 +101,11 @@ int help(int exitcode) {
101 fprintf(stream, "%s", "\n"
102 " ^\n"
103 " |.-. .-. .-. .-. . netdata \n"
104 - " | '-' '-' '-' '-' real-time performance monitoring, done right! \n"
104 + " | '-' '-' '-' '-' monitoring and troubleshooting, transformed! \n"
105 " +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->\n"
106 "\n"
107 - " Copyright (C) 2016-2023, Netdata, Inc. <info@netdata.cloud>\n"
107 + " Copyright 2018-2025 Netdata Inc.\n"
108 " Released under GNU General Public License v3 or later.\n"
109 - " All rights reserved.\n"
109 "\n"
110 " Home Page : https://netdata.cloud\n"
111 " Source Code: https://github.com/netdata/netdata\n"
src/health/notifications/alarm-notify.sh.in
+1 -5
@@ -1,9 +1,4 @@
1 #!/usr/bin/env bash
2 -#shellcheck source=/dev/null disable=SC2086,SC2154
3 -
4 -# netdata
5 -# real-time performance and health monitoring, done right!
6 -# (C) 2023 Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # Script to send alarm notifications for netdata
@@ -38,6 +33,7 @@
33 # - Opsgenie by @thiaoftsm #9858
34 # - Gotify by @coffeegrind123
35 # - ntfy.sh by @Dim-P
36 +#shellcheck source=/dev/null disable=SC2086,SC2154
37
38 # -----------------------------------------------------------------------------
39 # testing notifications
src/health/notifications/alarm-test.sh
-4
@@ -1,8 +1,4 @@
1 #!/usr/bin/env bash
2 -
3 -# netdata
4 -# real-time performance and health monitoring, done right!
5 -# (C) 2017 Costa Tsaousis <costa@tsaousis.gr>
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # Script to test alarm notifications for netdata
src/libnetdata/avl/avl.c
+2 -2
@@ -5,7 +5,7 @@
5 /* ------------------------------------------------------------------------- */
6 /*
7 * avl_insert(), avl_remove() and avl_search()
8 - * are adaptations (by Costa Tsaousis) of the AVL algorithm found in libavl
8 + * are adaptations (by Netdata Inc.) of the AVL algorithm found in libavl
9 * v2.0.3, so that they do not use any memory allocations and their memory
10 * footprint is optimized (by eliminating non-necessary data members).
11 *
@@ -279,7 +279,7 @@ avl_t *avl_remove(avl_tree_type *tree, avl_t *item) {
279 }
280
281 /* ------------------------------------------------------------------------- */
282 -// below are functions by (C) Costa Tsaousis
282 +// below are functions by Copyright 2018-2025 Netdata Inc.
283
284 // ---------------------------
285 // traversing
src/libnetdata/os/setenv.c
+43 -43
@@ -1,43 +1,43 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#include "libnetdata/libnetdata.h"
4 -
5 -#ifndef HAVE_SETENV
6 -int os_setenv(const char *name, const char *value, int overwrite) {
7 - char *env_var;
8 - int result;
9 -
10 - if (!overwrite) {
11 - env_var = getenv(name);
12 - if (env_var) return 0; // Already set
13 - }
14 -
15 - size_t len = strlen(name) + strlen(value) + 2; // +2 for '=' and '\0'
16 - env_var = malloc(len);
17 - if (!env_var) return -1; // Allocation failure
18 - snprintf(env_var, len, "%s=%s", name, value);
19 -
20 - result = putenv(env_var);
21 - // free(env_var); // _putenv in Windows makes a copy of the string
22 - return result;
23 -}
24 -
25 -#endif
26 -
27 -void nd_setenv(const char *name, const char *value, int overwrite) {
28 -#if defined(OS_WINDOWS)
29 - if(overwrite)
30 - SetEnvironmentVariable(name, value);
31 - else {
32 - char buf[1024];
33 - if(GetEnvironmentVariable(name, buf, sizeof(buf)) == 0)
34 - SetEnvironmentVariable(name, value);
35 - }
36 -#endif
37 -
38 -#ifdef HAVE_SETENV
39 - setenv(name, value, overwrite);
40 -#else
41 - os_setenv(name, value, overwite);
42 -#endif
43 -}
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#include "libnetdata/libnetdata.h"
4 +
5 +#ifndef HAVE_SETENV
6 +int os_setenv(const char *name, const char *value, int overwrite) {
7 + char *env_var;
8 + int result;
9 +
10 + if (!overwrite) {
11 + env_var = getenv(name);
12 + if (env_var) return 0; // Already set
13 + }
14 +
15 + size_t len = strlen(name) + strlen(value) + 2; // +2 for '=' and '\0'
16 + env_var = malloc(len);
17 + if (!env_var) return -1; // Allocation failure
18 + snprintf(env_var, len, "%s=%s", name, value);
19 +
20 + result = putenv(env_var);
21 + // free(env_var); // _putenv in Windows makes a copy of the string
22 + return result;
23 +}
24 +
25 +#endif
26 +
27 +void nd_setenv(const char *name, const char *value, int overwrite) {
28 +#if defined(OS_WINDOWS)
29 + if(overwrite)
30 + SetEnvironmentVariable(name, value);
31 + else {
32 + char buf[1024];
33 + if(GetEnvironmentVariable(name, buf, sizeof(buf)) == 0)
34 + SetEnvironmentVariable(name, value);
35 + }
36 +#endif
37 +
38 +#ifdef HAVE_SETENV
39 + setenv(name, value, overwrite);
40 +#else
41 + os_setenv(name, value, overwite);
42 +#endif
43 +}
src/libnetdata/os/setenv.h
+15 -15
@@ -1,15 +1,15 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SETENV_H
4 -#define NETDATA_SETENV_H
5 -
6 -#include "config.h"
7 -
8 -#ifndef HAVE_SETENV
9 -int os_setenv(const char *name, const char *value, int overwrite);
10 -#define setenv(name, value, overwrite) os_setenv(name, value, overwrite)
11 -#endif
12 -
13 -void nd_setenv(const char *name, const char *value, int overwrite);
14 -
15 -#endif //NETDATA_SETENV_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SETENV_H
4 +#define NETDATA_SETENV_H
5 +
6 +#include "config.h"
7 +
8 +#ifndef HAVE_SETENV
9 +int os_setenv(const char *name, const char *value, int overwrite);
10 +#define setenv(name, value, overwrite) os_setenv(name, value, overwrite)
11 +#endif
12 +
13 +void nd_setenv(const char *name, const char *value, int overwrite);
14 +
15 +#endif //NETDATA_SETENV_H
src/libnetdata/os/sleep.h
+10 -10
@@ -1,10 +1,10 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_SLEEP_H
4 -#define NETDATA_SLEEP_H
5 -
6 -void yield_the_processor(void);
7 -void tinysleep(void);
8 -void microsleep(usec_t ut);
9 -
10 -#endif //NETDATA_SLEEP_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_SLEEP_H
4 +#define NETDATA_SLEEP_H
5 +
6 +void yield_the_processor(void);
7 +void tinysleep(void);
8 +void microsleep(usec_t ut);
9 +
10 +#endif //NETDATA_SLEEP_H
src/libnetdata/os/uuid_generate.h
+10 -10
@@ -1,10 +1,10 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_UUID_GENERATE_H
4 -#define NETDATA_UUID_GENERATE_H
5 -
6 -void os_uuid_generate(void *out);
7 -void os_uuid_generate_random(void *out);
8 -void os_uuid_generate_time(void *out);
9 -
10 -#endif //NETDATA_UUID_GENERATE_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_UUID_GENERATE_H
4 +#define NETDATA_UUID_GENERATE_H
5 +
6 +void os_uuid_generate(void *out);
7 +void os_uuid_generate_random(void *out);
8 +void os_uuid_generate_time(void *out);
9 +
10 +#endif //NETDATA_UUID_GENERATE_H
src/libnetdata/parsers/entries.c
+183 -183
@@ -1,183 +1,183 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#include "entries.h"
4 -
5 -// Define multipliers for base 10 (decimal) units
6 -#define ENTRIES_MULTIPLIER_BASE10 1000ULL
7 -#define ENTRIES_MULTIPLIER_K (ENTRIES_MULTIPLIER_BASE10)
8 -#define ENTRIES_MULTIPLIER_M (ENTRIES_MULTIPLIER_K * ENTRIES_MULTIPLIER_BASE10)
9 -#define ENTRIES_MULTIPLIER_G (ENTRIES_MULTIPLIER_M * ENTRIES_MULTIPLIER_BASE10)
10 -#define ENTRIES_MULTIPLIER_T (ENTRIES_MULTIPLIER_G * ENTRIES_MULTIPLIER_BASE10)
11 -#define ENTRIES_MULTIPLIER_P (ENTRIES_MULTIPLIER_T * ENTRIES_MULTIPLIER_BASE10)
12 -#define ENTRIES_MULTIPLIER_E (ENTRIES_MULTIPLIER_P * ENTRIES_MULTIPLIER_BASE10)
13 -#define ENTRIES_MULTIPLIER_Z (ENTRIES_MULTIPLIER_E * ENTRIES_MULTIPLIER_BASE10)
14 -#define ENTRIES_MULTIPLIER_Y (ENTRIES_MULTIPLIER_Z * ENTRIES_MULTIPLIER_BASE10)
15 -
16 -// Define a structure to map size units to their multipliers
17 -static const struct size_unit {
18 - const char *unit;
19 - const bool formatter; // true when this unit should be used when formatting to string
20 - const uint64_t multiplier;
21 -} entries_units[] = {
22 - // the order of this table is important: smaller to bigger units!
23 -
24 - { .unit = "", .formatter = true, .multiplier = 1ULL },
25 - { .unit = "k", .formatter = false, .multiplier = ENTRIES_MULTIPLIER_K },
26 - { .unit = "K", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_K },
27 - { .unit = "M", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_M },
28 - { .unit = "G", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_G },
29 - { .unit = "T", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_T },
30 - { .unit = "P", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_P },
31 - { .unit = "E", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_E },
32 - { .unit = "Z", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_Z },
33 - { .unit = "Y", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_Y },
34 -};
35 -
36 -static inline const struct size_unit *entries_find_unit(const char *unit) {
37 - if (!unit || !*unit) unit = "";
38 -
39 - for (size_t i = 0; i < sizeof(entries_units) / sizeof(entries_units[0]); i++) {
40 - const struct size_unit *su = &entries_units[i];
41 - if ((uint8_t)unit[0] == (uint8_t)su->unit[0] && strcmp(unit, su->unit) == 0)
42 - return su;
43 - }
44 -
45 - return NULL;
46 -}
47 -
48 -static inline double entries_round_to_resolution_dbl2(uint64_t value, uint64_t resolution) {
49 - double converted = (double)value / (double)resolution;
50 - return round(converted * 100.0) / 100.0;
51 -}
52 -
53 -static inline uint64_t entries_round_to_resolution_int(uint64_t value, uint64_t resolution) {
54 - return (value + (resolution / 2)) / resolution;
55 -}
56 -
57 -// -------------------------------------------------------------------------------------------------------------------
58 -// parse a size string
59 -
60 -bool entries_parse(const char *entries_str, uint64_t *result, const char *default_unit) {
61 - if (!entries_str || !*entries_str) {
62 - *result = 0;
63 - return false;
64 - }
65 -
66 - const struct size_unit *su_def = entries_find_unit(default_unit);
67 - if(!su_def) {
68 - *result = 0;
69 - return false;
70 - }
71 -
72 - const char *s = entries_str;
73 -
74 - // Skip leading spaces
75 - while (isspace((uint8_t)*s)) s++;
76 -
77 - if(strcmp(s, "off") == 0) {
78 - *result = 0;
79 - return true;
80 - }
81 -
82 - // Parse the number
83 - const char *number_start = s;
84 - NETDATA_DOUBLE value = strtondd(s, (char **)&s);
85 -
86 - // If no valid number found, return false
87 - if (s == number_start || value < 0) {
88 - *result = 0;
89 - return false;
90 - }
91 -
92 - // Skip spaces between number and unit
93 - while (isspace((uint8_t)*s)) s++;
94 -
95 - const char *unit_start = s;
96 - while (isalpha((uint8_t)*s)) s++;
97 -
98 - char unit[4];
99 - size_t unit_len = s - unit_start;
100 - const struct size_unit *su;
101 - if (unit_len == 0)
102 - su = su_def;
103 - else {
104 - if (unit_len >= sizeof(unit)) unit_len = sizeof(unit) - 1;
105 - strncpy(unit, unit_start, unit_len);
106 - unit[unit_len] = '\0';
107 - su = entries_find_unit(unit);
108 - if (!su) {
109 - *result = 0;
110 - return false;
111 - }
112 - }
113 -
114 - uint64_t bytes = (uint64_t)round(value * (NETDATA_DOUBLE)su->multiplier);
115 - *result = entries_round_to_resolution_int(bytes, su_def->multiplier);
116 -
117 - return true;
118 -}
119 -
120 -// --------------------------------------------------------------------------------------------------------------------
121 -// generate a string to represent a size
122 -
123 -ssize_t entries_snprintf(char *dst, size_t dst_size, uint64_t value, const char *unit, bool accurate) {
124 - if (!dst || dst_size == 0) return -1;
125 - if (dst_size == 1) {
126 - dst[0] = '\0';
127 - return -2;
128 - }
129 -
130 - if (value == 0)
131 - return snprintfz(dst, dst_size, "off");
132 -
133 - const struct size_unit *su_def = entries_find_unit(unit);
134 - if(!su_def) return -3;
135 -
136 - // use the units multiplier to find the units
137 - uint64_t bytes = value * su_def->multiplier;
138 -
139 - // Find the best unit to represent the size with up to 2 fractional digits
140 - const struct size_unit *su_best = su_def;
141 - for (size_t i = 0; i < sizeof(entries_units) / sizeof(entries_units[0]); i++) {
142 - const struct size_unit *su = &entries_units[i];
143 - if (su->multiplier < su_def->multiplier || // the multiplier is too small
144 - (!su->formatter && su != su_def) || // it is not to be used in formatting (except our unit)
145 - (bytes < su->multiplier && su != su_def) ) // the converted value will be <1.0
146 - continue;
147 -
148 - double converted = entries_round_to_resolution_dbl2(bytes, su->multiplier);
149 -
150 - uint64_t reversed_bytes = (uint64_t)round((converted * (double)su->multiplier));
151 -
152 - if(accurate) {
153 - // no precision loss is required
154 - if (reversed_bytes == bytes && converted > 1.0)
155 - // no precision loss, this is good to use
156 - su_best = su;
157 - }
158 - else {
159 - if(converted > 1.0)
160 - su_best = su;
161 - }
162 - }
163 -
164 - double converted = entries_round_to_resolution_dbl2(bytes, su_best->multiplier);
165 -
166 - // print it either with 0, 1 or 2 fractional digits
167 - int written;
168 - if(converted == (double)((uint64_t)converted))
169 - written = snprintfz(dst, dst_size, "%.0f%s", converted, su_best->unit);
170 - else if(converted * 10.0 == (double)((uint64_t)(converted * 10.0)))
171 - written = snprintfz(dst, dst_size, "%.1f%s", converted, su_best->unit);
172 - else
173 - written = snprintfz(dst, dst_size, "%.2f%s", converted, su_best->unit);
174 -
175 - if (written < 0)
176 - return -4;
177 -
178 - if ((size_t)written >= dst_size)
179 - return (ssize_t)(dst_size - 1);
180 -
181 - return written;
182 -}
183 -
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#include "entries.h"
4 +
5 +// Define multipliers for base 10 (decimal) units
6 +#define ENTRIES_MULTIPLIER_BASE10 1000ULL
7 +#define ENTRIES_MULTIPLIER_K (ENTRIES_MULTIPLIER_BASE10)
8 +#define ENTRIES_MULTIPLIER_M (ENTRIES_MULTIPLIER_K * ENTRIES_MULTIPLIER_BASE10)
9 +#define ENTRIES_MULTIPLIER_G (ENTRIES_MULTIPLIER_M * ENTRIES_MULTIPLIER_BASE10)
10 +#define ENTRIES_MULTIPLIER_T (ENTRIES_MULTIPLIER_G * ENTRIES_MULTIPLIER_BASE10)
11 +#define ENTRIES_MULTIPLIER_P (ENTRIES_MULTIPLIER_T * ENTRIES_MULTIPLIER_BASE10)
12 +#define ENTRIES_MULTIPLIER_E (ENTRIES_MULTIPLIER_P * ENTRIES_MULTIPLIER_BASE10)
13 +#define ENTRIES_MULTIPLIER_Z (ENTRIES_MULTIPLIER_E * ENTRIES_MULTIPLIER_BASE10)
14 +#define ENTRIES_MULTIPLIER_Y (ENTRIES_MULTIPLIER_Z * ENTRIES_MULTIPLIER_BASE10)
15 +
16 +// Define a structure to map size units to their multipliers
17 +static const struct size_unit {
18 + const char *unit;
19 + const bool formatter; // true when this unit should be used when formatting to string
20 + const uint64_t multiplier;
21 +} entries_units[] = {
22 + // the order of this table is important: smaller to bigger units!
23 +
24 + { .unit = "", .formatter = true, .multiplier = 1ULL },
25 + { .unit = "k", .formatter = false, .multiplier = ENTRIES_MULTIPLIER_K },
26 + { .unit = "K", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_K },
27 + { .unit = "M", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_M },
28 + { .unit = "G", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_G },
29 + { .unit = "T", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_T },
30 + { .unit = "P", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_P },
31 + { .unit = "E", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_E },
32 + { .unit = "Z", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_Z },
33 + { .unit = "Y", .formatter = true, .multiplier = ENTRIES_MULTIPLIER_Y },
34 +};
35 +
36 +static inline const struct size_unit *entries_find_unit(const char *unit) {
37 + if (!unit || !*unit) unit = "";
38 +
39 + for (size_t i = 0; i < sizeof(entries_units) / sizeof(entries_units[0]); i++) {
40 + const struct size_unit *su = &entries_units[i];
41 + if ((uint8_t)unit[0] == (uint8_t)su->unit[0] && strcmp(unit, su->unit) == 0)
42 + return su;
43 + }
44 +
45 + return NULL;
46 +}
47 +
48 +static inline double entries_round_to_resolution_dbl2(uint64_t value, uint64_t resolution) {
49 + double converted = (double)value / (double)resolution;
50 + return round(converted * 100.0) / 100.0;
51 +}
52 +
53 +static inline uint64_t entries_round_to_resolution_int(uint64_t value, uint64_t resolution) {
54 + return (value + (resolution / 2)) / resolution;
55 +}
56 +
57 +// -------------------------------------------------------------------------------------------------------------------
58 +// parse a size string
59 +
60 +bool entries_parse(const char *entries_str, uint64_t *result, const char *default_unit) {
61 + if (!entries_str || !*entries_str) {
62 + *result = 0;
63 + return false;
64 + }
65 +
66 + const struct size_unit *su_def = entries_find_unit(default_unit);
67 + if(!su_def) {
68 + *result = 0;
69 + return false;
70 + }
71 +
72 + const char *s = entries_str;
73 +
74 + // Skip leading spaces
75 + while (isspace((uint8_t)*s)) s++;
76 +
77 + if(strcmp(s, "off") == 0) {
78 + *result = 0;
79 + return true;
80 + }
81 +
82 + // Parse the number
83 + const char *number_start = s;
84 + NETDATA_DOUBLE value = strtondd(s, (char **)&s);
85 +
86 + // If no valid number found, return false
87 + if (s == number_start || value < 0) {
88 + *result = 0;
89 + return false;
90 + }
91 +
92 + // Skip spaces between number and unit
93 + while (isspace((uint8_t)*s)) s++;
94 +
95 + const char *unit_start = s;
96 + while (isalpha((uint8_t)*s)) s++;
97 +
98 + char unit[4];
99 + size_t unit_len = s - unit_start;
100 + const struct size_unit *su;
101 + if (unit_len == 0)
102 + su = su_def;
103 + else {
104 + if (unit_len >= sizeof(unit)) unit_len = sizeof(unit) - 1;
105 + strncpy(unit, unit_start, unit_len);
106 + unit[unit_len] = '\0';
107 + su = entries_find_unit(unit);
108 + if (!su) {
109 + *result = 0;
110 + return false;
111 + }
112 + }
113 +
114 + uint64_t bytes = (uint64_t)round(value * (NETDATA_DOUBLE)su->multiplier);
115 + *result = entries_round_to_resolution_int(bytes, su_def->multiplier);
116 +
117 + return true;
118 +}
119 +
120 +// --------------------------------------------------------------------------------------------------------------------
121 +// generate a string to represent a size
122 +
123 +ssize_t entries_snprintf(char *dst, size_t dst_size, uint64_t value, const char *unit, bool accurate) {
124 + if (!dst || dst_size == 0) return -1;
125 + if (dst_size == 1) {
126 + dst[0] = '\0';
127 + return -2;
128 + }
129 +
130 + if (value == 0)
131 + return snprintfz(dst, dst_size, "off");
132 +
133 + const struct size_unit *su_def = entries_find_unit(unit);
134 + if(!su_def) return -3;
135 +
136 + // use the units multiplier to find the units
137 + uint64_t bytes = value * su_def->multiplier;
138 +
139 + // Find the best unit to represent the size with up to 2 fractional digits
140 + const struct size_unit *su_best = su_def;
141 + for (size_t i = 0; i < sizeof(entries_units) / sizeof(entries_units[0]); i++) {
142 + const struct size_unit *su = &entries_units[i];
143 + if (su->multiplier < su_def->multiplier || // the multiplier is too small
144 + (!su->formatter && su != su_def) || // it is not to be used in formatting (except our unit)
145 + (bytes < su->multiplier && su != su_def) ) // the converted value will be <1.0
146 + continue;
147 +
148 + double converted = entries_round_to_resolution_dbl2(bytes, su->multiplier);
149 +
150 + uint64_t reversed_bytes = (uint64_t)round((converted * (double)su->multiplier));
151 +
152 + if(accurate) {
153 + // no precision loss is required
154 + if (reversed_bytes == bytes && converted > 1.0)
155 + // no precision loss, this is good to use
156 + su_best = su;
157 + }
158 + else {
159 + if(converted > 1.0)
160 + su_best = su;
161 + }
162 + }
163 +
164 + double converted = entries_round_to_resolution_dbl2(bytes, su_best->multiplier);
165 +
166 + // print it either with 0, 1 or 2 fractional digits
167 + int written;
168 + if(converted == (double)((uint64_t)converted))
169 + written = snprintfz(dst, dst_size, "%.0f%s", converted, su_best->unit);
170 + else if(converted * 10.0 == (double)((uint64_t)(converted * 10.0)))
171 + written = snprintfz(dst, dst_size, "%.1f%s", converted, su_best->unit);
172 + else
173 + written = snprintfz(dst, dst_size, "%.2f%s", converted, su_best->unit);
174 +
175 + if (written < 0)
176 + return -4;
177 +
178 + if ((size_t)written >= dst_size)
179 + return (ssize_t)(dst_size - 1);
180 +
181 + return written;
182 +}
183 +
src/libnetdata/parsers/entries.h
+19 -19
@@ -1,19 +1,19 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef LIBNETDATA_PARSERS_ENTRIES_H
4 -#define LIBNETDATA_PARSERS_ENTRIES_H
5 -
6 -#include "parsers.h"
7 -
8 -bool entries_parse(const char *entries_str, uint64_t *result, const char *default_unit);
9 -#define entries_parse_k(size_str, kb) size_parse(size_str, kb, "K")
10 -#define entries_parse_m(size_str, mb) size_parse(size_str, mb, "M")
11 -#define entries_parse_g(size_str, gb) size_parse(size_str, gb, "G")
12 -
13 -ssize_t entries_snprintf(char *dst, size_t dst_size, uint64_t value, const char *unit, bool accurate);
14 -#define entries_snprintf_n(dst, dst_size, value) size_snprintf(dst, dst_size, value, "", true)
15 -#define entries_snprintf_k(dst, dst_size, value) size_snprintf(dst, dst_size, value, "K", true)
16 -#define entries_snprintf_m(dst, dst_size, value) size_snprintf(dst, dst_size, value, "M", true)
17 -#define entries_snprintf_g(dst, dst_size, value) size_snprintf(dst, dst_size, value, "G", true)
18 -
19 -#endif //LIBNETDATA_PARSERS_ENTRIES_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef LIBNETDATA_PARSERS_ENTRIES_H
4 +#define LIBNETDATA_PARSERS_ENTRIES_H
5 +
6 +#include "parsers.h"
7 +
8 +bool entries_parse(const char *entries_str, uint64_t *result, const char *default_unit);
9 +#define entries_parse_k(size_str, kb) size_parse(size_str, kb, "K")
10 +#define entries_parse_m(size_str, mb) size_parse(size_str, mb, "M")
11 +#define entries_parse_g(size_str, gb) size_parse(size_str, gb, "G")
12 +
13 +ssize_t entries_snprintf(char *dst, size_t dst_size, uint64_t value, const char *unit, bool accurate);
14 +#define entries_snprintf_n(dst, dst_size, value) size_snprintf(dst, dst_size, value, "", true)
15 +#define entries_snprintf_k(dst, dst_size, value) size_snprintf(dst, dst_size, value, "K", true)
16 +#define entries_snprintf_m(dst, dst_size, value) size_snprintf(dst, dst_size, value, "M", true)
17 +#define entries_snprintf_g(dst, dst_size, value) size_snprintf(dst, dst_size, value, "G", true)
18 +
19 +#endif //LIBNETDATA_PARSERS_ENTRIES_H
src/libnetdata/spawn_server/log-forwarder.h
+17 -17
@@ -1,17 +1,17 @@
1 -// SPDX-License-Identifier: GPL-3.0-or-later
2 -
3 -#ifndef NETDATA_LOG_FORWARDER_H
4 -#define NETDATA_LOG_FORWARDER_H
5 -
6 -#include "../libnetdata.h"
7 -
8 -typedef struct LOG_FORWARDER LOG_FORWARDER;
9 -
10 -LOG_FORWARDER *log_forwarder_start(void); // done once, at spawn_server_create()
11 -void log_forwarder_add_fd(LOG_FORWARDER *lf, int fd); // to add a new fd
12 -void log_forwarder_annotate_fd_name(LOG_FORWARDER *lf, int fd, const char *cmd); // set the syslog identifier
13 -void log_forwarder_annotate_fd_pid(LOG_FORWARDER *lf, int fd, pid_t pid); // set the pid of the child process
14 -bool log_forwarder_del_and_close_fd(LOG_FORWARDER *lf, int fd); // to remove an fd
15 -void log_forwarder_stop(LOG_FORWARDER *lf); // done once, at spawn_server_destroy()
16 -
17 -#endif //NETDATA_LOG_FORWARDER_H
1 +// SPDX-License-Identifier: GPL-3.0-or-later
2 +
3 +#ifndef NETDATA_LOG_FORWARDER_H
4 +#define NETDATA_LOG_FORWARDER_H
5 +
6 +#include "../libnetdata.h"
7 +
8 +typedef struct LOG_FORWARDER LOG_FORWARDER;
9 +
10 +LOG_FORWARDER *log_forwarder_start(void); // done once, at spawn_server_create()
11 +void log_forwarder_add_fd(LOG_FORWARDER *lf, int fd); // to add a new fd
12 +void log_forwarder_annotate_fd_name(LOG_FORWARDER *lf, int fd, const char *cmd); // set the syslog identifier
13 +void log_forwarder_annotate_fd_pid(LOG_FORWARDER *lf, int fd, pid_t pid); // set the pid of the child process
14 +bool log_forwarder_del_and_close_fd(LOG_FORWARDER *lf, int fd); // to remove an fd
15 +void log_forwarder_stop(LOG_FORWARDER *lf); // done once, at spawn_server_destroy()
16 +
17 +#endif //NETDATA_LOG_FORWARDER_H
src/web/gui/bundle_dashboard_v1.py
-2
@@ -1,6 +1,4 @@
1 #!/usr/bin/env python3
2 -#
3 -# Copyright: © 2021 Netdata Inc.
2 # SPDX-License-Identifier: GPL-3.0-or-later
3
4 import os
src/web/gui/old/index.html
+3 -4
@@ -58,7 +58,7 @@
58 theme = localStorage.getItem('netdataTheme') || 'slate';
59 }
60 const overlayEl = document.getElementById('loadOverlay');
61 - overlayEl.innerHTML = 'netdata<br/><div style="font-size: 3vh;">Real-time performance monitoring, done right!</div>';
61 + overlayEl.innerHTML = 'netdata<br/><div style="font-size: 3vh;">Monitoring and troubleshooting, transformed!</div>';
62 overlayEl.style = theme == 'slate' ? "background-color: #272b30; color: #373b40;" : "background-color: #fff; color: #ddd;";
63 </script>
64 <nav class="navbar navbar-default navbar-fixed-top" role="banner">
@@ -164,8 +164,7 @@
164 <div class="p">
165 <big><a href="https://github.com/netdata/netdata/wiki" target="_blank">Netdata</a></big>
166 <br /><br />
167 - <i class="fas fa-copyright"></i> Copyright 2018, <a href="mailto:info@netdata.cloud">Netdata, Inc</a>.<br/>
168 - <i class="fas fa-copyright"></i> Copyright 2016-2018, <a href="mailto:costa@tsaousis.gr">Costa Tsaousis</a>.<br/>
167 + <i class="fas fa-copyright"></i> Copyright 2018-2025, <a href="mailto:info@netdata.cloud">Netdata Inc.</a>.<br/>
168 </div>
169 <div class="p">
170 Released under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPL v3 or later</a>.
@@ -427,7 +426,7 @@
426 Enjoy real-time performance monitoring!
427 </div>
428 <div class="p">
430 - Costa Tsaousis
429 + Copyright 2018-2025 Netdata Inc.
430 </div>
431 </div>
432 <div class="modal-footer">
src/web/gui/v1/dashboard.html
+1 -1
@@ -18,7 +18,7 @@
18 <meta property="og:url" content="http://my-netdata.io/"/>
19 <meta property="og:type" content="website"/>
20 <meta property="og:site_name" content="netdata"/>
21 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
22 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
23 </head>
24 <body>
src/web/gui/v1/demo.html
+1 -1
@@ -18,7 +18,7 @@
18 <meta property="og:url" content="http://my-netdata.io/"/>
19 <meta property="og:type" content="website"/>
20 <meta property="og:site_name" content="netdata"/>
21 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
22 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
23 </head>
24 <script type="text/javascript" src="dashboard.js?v20190902-0"></script>
src/web/gui/v1/demo2.html
+1 -1
@@ -18,7 +18,7 @@
18 <meta property="og:url" content="http://my-netdata.io/"/>
19 <meta property="og:type" content="website"/>
20 <meta property="og:site_name" content="netdata"/>
21 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
21 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
22 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
23 </head>
24 <script>var netdataTheme = 'slate';</script>
src/web/gui/v1/demosites.html
+4 -20
@@ -5,7 +5,7 @@
5 <meta http-equiv="Refresh" content="0; url=https://www.netdata.cloud">
6 <meta charset=utf-8>
7 <title>Netdata: Get control of your Linux Servers. Simple. Effective. Awesome.</title>
8 - <meta name=author content="Costa Tsaousis">
8 + <meta name=author content="Netdata Inc.">
9 <meta name=description content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms.">
10
11 <meta name=viewport content="width=device-width,initial-scale=1">
@@ -1329,30 +1329,14 @@ p {
1329 <div class="fb-share-button" data-href="https://my-netdata.io/" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmy-netdata.io%2F&amp;src=sdkpreparse" style="vertical-align:top;display:inline-block; height: 34px;">Share</a></div>
1330 <div class="fb-follow" data-href="https://www.facebook.com/linuxnetdata/" data-layout="standard" data-size="small" data-show-faces="false" data-colorscheme="dark" width="225" style="vertical-align:top;display:inline-block; height: 34px;"></div>
1331 </div>
1332 - </p>
1332 <p>
1333 <strong>netdata</strong><br/>
1335 - &copy; Copyright 2018-2019, <a href="https://github.com/netdata" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=NetdataInc>Netdata</a><br/>
1336 - &copy; Copyright 2016-2018, <a href="https://github.com/ktsaou" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=CostaTsaousis>Costa Tsaousis</a><br/>
1334 + &copy; Copyright 2018-2025 <a href="https://github.com/netdata" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=NetdataInc>Netdata Inc.</a><br/>
1335 Released under <a href="https://github.com/netdata/netdata/blob/master/LICENSE.md" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=License>GPL v3+</a><br/>
1336 </p>
1339 - </p>
1340 - <p style="padding-top: 20px;">
1341 - netdata has received significant contributions from:<br/>&nbsp;<br/>
1342 - <a href="https://github.com/philwhineray" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=Phil>Phil Whineray</a> (release management),<br/>
1343 - <a href="https://github.com/alonbl" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=Alon>Alon Bar-Lev</a> (autoconf and automake),<br/>
1344 - <a href="https://github.com/titpetric" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=titpetric>Tit Petric</a> (docker image maintainer),<br/>
1345 - <a href="https://github.com/paulfantom" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=Pawel>Paweł Krupa</a> (python.d.plugin and modules),<br/>
1346 - <a href="https://github.com/simonnagl" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=simonnagl>simonnagl</a> (disk plugin and more),<br/>
1347 - <a href="https://github.com/fredericopissarra" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=Frederico>Frederico Lamberti Pissarra</a> (performance improvements)<br/>
1348 - <a href="https://github.com/vlvkobal" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=VladimirKobal>Vladimir Kobal</a> (FreeBSD port)<br/>
1349 - <a href="https://github.com/l2isbad" target="_blank" data-ga-category="Outbound links" data-ga-action="Nav click" data-ga-label=l2isbad>Ilya Mashchenko</a> (python plugin modules)<br/>
1350 - &nbsp;<br/>
1351 - and dozens more enthusiasts, engineers and professionals.<br/>&nbsp;<br/>
1352 - </p>
1353 - </p>
1354 - Thank you! You are awesome!
1337 <p>
1338 + Thank you! You are awesome!
1339 + </p>
1340 </div>
1341 </body>
1342
src/web/gui/v1/demosites2.html
+2 -2
@@ -2,7 +2,7 @@
2 <!-- SPDX-License-Identifier: GPL-3.0-or-later -->
3 <html lang="en">
4 <head>
5 - <title>Netdata - Real-time performance monitoring, done right!</title>
5 + <title>Netdata - Monitoring and troubleshooting, transformed!</title>
6 <meta name="application-name" content="netdata">
7
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -17,7 +17,7 @@
17 <meta property="og:url" content="http://my-netdata.io/"/>
18 <meta property="og:type" content="website"/>
19 <meta property="og:site_name" content="netdata"/>
20 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22 </head>
23
src/web/gui/v1/index-node-view.html
+1 -1
@@ -17,7 +17,7 @@
17 <meta property="og:url" content="http://my-netdata.io/"/>
18 <meta property="og:type" content="website"/>
19 <meta property="og:site_name" content="netdata"/>
20 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22 <!-- todo generate urls like this from prod build -->
23 <!-- <link href="/dashboard/build/static/css/main.19393e92.chunk.css" rel="stylesheet">-->
src/web/gui/v1/index.html
+2 -2
@@ -12,8 +12,8 @@
12 theme = localStorage.getItem('netdataTheme') || 'slate';
13 }
14 const overlayEl = document.getElementById('loadOverlay');
15 - overlayEl.innerHTML = 'netdata<br/><div style="font-size: 3vh;">Real-time performance monitoring, done right!</div>';
16 - overlayEl.style = theme == 'slate' ? "background-color: #272b30; color: #373b40;" : "background-color: #fff; color: #ddd;";</script><div id="root"></div><div class="navbar-highlight"><div id="navbar-highlight-content" class="navbar-highlight-content"></div></div><div class="container"><div class="row"><div class="charts-body" role="main"><div id="masthead" style="display:none"><div class="container"><div class="row"><div class="col-md-7"><h1>Netdata<p class="lead">Real-time performance monitoring, in the greatest possible detail</p></h1></div><div class="col-md-5"><div class="well well-lg"><div class="row"><div class="col-md-6"><b>Drag</b> charts to pan. <b>Shift + wheel</b> on them, to zoom in and out. <b>Double-click</b> on them, to reset. <b>Hover</b> on them too!</div><div class="col-md-6"><div class="netdata-container" data-netdata="system.cpu" data-dimensions="user" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dygraph-type="line" data-dygraph-strokewidth="3" data-dygraph-smooth="true" data-dygraph-highlightcirclesize="6" data-after="-90" data-height="60px" data-colors="#C66"></div></div></div></div></div></div></div></div><div id="charts_div"></div></div><div class="sidebar-body hidden-xs hidden-sm hidden-print" id="sidebar-body" role="complementary"><nav class="dashboard-sidebar hidden-print hidden-xs hidden-sm" id="sidebar" role="menu"></nav></div></div></div><div id="footer" class="container" style="display:none"><div class="row"><div class="col-md-10" role="main"><div class="p"><big><a href="https://github.com/netdata/netdata/wiki" target="_blank">Netdata</a></big><br/><br/><i class="fas fa-copyright"></i> Copyright 2020, <a href="mailto:info@netdata.cloud">Netdata, Inc</a>.<br/><br/><div class="terms-and-privacy"><a href="https://www.netdata.cloud/terms/" target="_blank">Terms and conditions</a> <a href="https://www.netdata.cloud/privacy/" target="_blank">Privacy Policy</a></div></div><div class="p">Released under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPL v3 or later</a>. Netdata uses <a href="https://github.com/netdata/netdata/blob/master/REDISTRIBUTED.md" target="_blank">third party tools</a>.<br/><br/></div></div></div></div><div class="modal fade" id="xssModal" tabindex="-1" role="dialog" aria-labelledby="xssModalLabel" data-keyboard="false" data-backdrop="static" style="z-index:3000"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="xssModalLabel">XSS Protection</h4></div><div class="modal-body"><p>This dashboard is about to render data from server:</p><p style="font-size:1.25em"><code id="netdataXssModalServer"></code></p><p>To protect your privacy, the dashboard will <b>check all data transferred</b> for cross site scripting (XSS).<br/>This is CPU intensive, so your browser might be a bit slower.</p><p>If you <b>trust</b> the remote server, you can disable XSS protection.<br/>In this case, any remote dashboard decoration code (javascript) will also run.</p><p>If you <b>don't trust</b> the remote server, you should keep the protection on.<br/>The dashboard will run slower and remote dashboard decoration code will not run, but better be safe than sorry...</p></div><div class="modal-footer"><a href="#" onclick="return xssModalKeepXss()" type="button" class="btn btn-success" data-dismiss="modal">Keep protecting me</a> <a href="#" onclick="return xssModalDisableXss()" type="button" class="btn btn-danger" data-dismiss="modal">I don't need this, the server is mine</a></div></div></div></div><div class="modal fade" id="printPreflightModal" tabindex="-1" role="dialog" aria-labelledby="printPreflightModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="printPreflightModalLabel">Print this netdata dashboard</h4></div><div class="modal-body"><p>netdata dashboards cannot be captured, since we are lazy loading and hiding all but the visible charts.<br/>To capture the whole page with all the charts rendered, a new browser window will pop-up that will render all the charts at once. The new browser window will maintain the current pan and zoom settings of the charts. So, align the charts before proceeding.</p><p><small>This process will put some CPU and memory pressure on your browser.<br/>For the netdata server, we will sequentially download all the charts, to avoid congesting network and server resources.<br/><b>Please, do not print netdata dashboards on paper!</b></small></p></div><div class="modal-footer"><a href="#" onclick="return printPreflight(),!1" type="button" class="btn btn-default">Print</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="loadSnapshotModal" tabindex="-1" role="dialog" aria-labelledby="loadSnapshotModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="loadSnapshotModalLabel">Import a netdata snapshot</h4></div><div id="loadSnapshotDragAndDrop" class="modal-body"><p>netdata can export and import dashboard snapshots. Any netdata can import the snapshot of any other netdata. The snapshots are not uploaded to a server. They are handled entirely by your web browser, on your computer.</p><p style="text-align:center"><label class="btn btn-default">Click here to select the netdata snapshot file to import <input type="file" id="loadSnapshotSelectFiles" value="Import" style="display:none" onchange="loadSnapshotPreflight()"></label></p><div id="loadSnapshotStatus" class="alert alert-info" role="alert">Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it.</div><p><table class="table"><tbody><tr><th>Filename</th><td id="loadSnapshotFilename"></td></tr><tr><th>Hostname</th><td id="loadSnapshotHostname"></td></tr><tr><th>Origin URL</th><td id="loadSnapshotURL"></td></tr><tr><th>Charts Info</th><td id="loadSnapshotCharts"></td></tr><tr><th>Snapshot Info</th><td id="loadSnapshotInfo"></td></tr><tr><th>Time Range</th><td id="loadSnapshotTimeRange"></td></tr><tr><th>Comments</th><td id="loadSnapshotComments"></td></tr></tbody></table></p></div><div class="modal-footer"><span style="display:inline-block;padding-right:20px">Snapshot files contain both data and javascript code. Make sure <b>you trust the files</b> you import!</span> <a id="loadSnapshotImport" href="#" onclick="return loadSnapshot(),!1" type="button" class="btn btn-success disabled">Import</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="saveSnapshotModal" tabindex="-1" role="dialog" aria-labelledby="saveSnapshotModalLabel" data-keyboard="false" data-backdrop="static"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="saveSnapshotModalLabel">Export a snapshot</h4></div><div class="modal-body"><div id="saveSnapshotModalProgressSection" hidden>Please wait while we collect all the dashboard data...<div class="progress progress-striped active" style="height:2em!important"><div id="saveSnapshotModalProgressBar" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width:2em"><span id="saveSnapshotModalProgressBarText" style="padding-left:10px;padding-top:4px;font-size:1.2em;text-align:left;width:100%;position:absolute;display:block"></span></div></div></div><div id="saveSnapshotResolutionRadio" style="text-align:center">Select the desired resolution of the snapshot. This is the <b>seconds of data per point</b>.<br/>&nbsp;<br/>&nbsp;<br/><input id="saveSnapshotResolutionSlider" data-slider-id="saveSnapshotResolutionSlider" style="width:80%" tabindex="0"/><br/>&nbsp;<br/><div class="input-group"><span class="input-group-addon" id="sizing-saveSnapshotFilename" style="width:100px">Filename</span> <input id="saveSnapshotFilename" class="form-control" placeholder="Filename of the generated snapshot" aria-describedby="sizing-saveSnapshotFilename" tabindex="2"/><div class="input-group-btn"><div class="input-group-btn"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span id="saveSnapshotCompressionName">Compression</span> <span class="caret"></span></button><ul class="dropdown-menu dropdown-menu-right"><li class="disabled"><a href="#" class="disabled">Select Compression</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("none"),!1'>uncompressed</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("pako.deflate"),!1'>pako.deflate (gzip, binary)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("pako.deflate.base64"),!1'>pako.deflate.base64 (gzip, ascii)</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.uri"),!1'>lzstring.uri (LZ, ascii)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.utf16"),!1'>lzstring.utf16 (LZ, utf16)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.base64"),!1'>lzstring.base64 (LZ, ascii)</a></li></ul></div></div></div><div class="input-group" style="padding-top:10px;width:100%"><span class="input-group-addon" id="sizing-saveSnapshotComments" style="width:100px">Comments</span> <input id="saveSnapshotComments" class="form-control" placeholder="Any comments about this snapshot?" aria-describedby="sizing-saveSnapshotComments" tabindex="3"/></div></div>&nbsp;<div id="saveSnapshotStatus" class="alert alert-info" role="alert">Select snaphost resolution. This controls the size the snapshot file.</div><p>The generated snapshot will include all charts of this dashboard, <b>for the visible timeframe</b>, so align, pan and zoom the charts as needed. The scroll position of the dashboard will also be saved. The snapshot will be downloaded as a file, to your computer, that can be imported back into any netdata dashboard (no need to import it back on this server).</p><p><small>Snapshot files include all the information of the dashboard, including the URL of the origin server, its netdata unique ID, etc. So, if you share the snapshot file with third parties, they will be able to access the origin server, if this server is exposed on the internet.<br/>Snapshots are handled entirely by the web browser. The netdata servers are not aware of them.</small></p></div><div class="modal-footer"><a id="saveSnapshotExport" href="#" onclick="return saveSnapshot(),!1" type="button" class="btn btn-success" tabindex="4">Export</a> <button type="button" class="btn btn-default" data-dismiss="modal" tabindex="5">Cancel</button></div></div></div></div><div class="modal fade" id="alarmsModal" tabindex="-1" role="dialog" aria-labelledby="alarmsModalLabel"><div class="modal-dialog modal-lg" role="document" style="display:table"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="alarmsModalLabel">netdata alarms</h4></div><div class="modal-body"><ul class="nav nav-tabs" role="tablist"><li role="presentation" class="active"><a href="#alarms_active" aria-controls="alarms_active" role="tab" data-toggle="tab">Active</a></li><li role="presentation"><a href="#alarms_all" aria-controls="alarms_all" role="tab" data-toggle="tab">All</a></li><li role="presentation"><a href="#alarms_log" aria-controls="alarms_log" role="tab" data-toggle="tab">Log</a></li></ul><div class="tab-content"><div role="tabpanel" class="tab-pane active" id="alarms_active">loading...</div><div role="tabpanel" class="tab-pane" id="alarms_all">loading...</div><div role="tabpanel" class="tab-pane" id="alarms_log">loading...</div></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="optionsModal" tabindex="-1" role="dialog" aria-labelledby="optionsModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="optionsModalLabel">netdata dashboard options</h4></div><div class="modal-body"><center><small style="color:#bbb">These are browser settings. Each viewer has its own. They do not affect the operation of your netdata server.<br/>Settings take effect immediately and are saved permanently to browser local storage (except the refresh on focus / always option).<br/>To reset all options (including charts sizes) to their defaults, click <a href="#" onclick="return resetDashboardOptions(),!1">here</a>.</small></center><div style="padding:10px"></div><ul class="nav nav-tabs" role="tablist"><li role="presentation" class="active"><a href="#settings_performance" aria-controls="settings_performance" role="tab" data-toggle="tab">Performance</a></li><li role="presentation"><a href="#settings_sync" aria-controls="settings_sync" role="tab" data-toggle="tab">Synchronization</a></li><li role="presentation"><a href="#settings_visual" aria-controls="settings_visual" role="tab" data-toggle="tab">Visual</a></li><li role="presentation"><a href="#settings_locale" aria-controls="settings_locale" role="tab" data-toggle="tab">Locale</a></li></ul><div class="tab-content"><div role="tabpanel" class="tab-pane active" id="settings_performance"><form id="optionsForm1" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="stop_updates_when_focus_is_lost" type="checkbox" checked="checked" data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="On Focus" data-off="Always" data-width="110px"></td><td class="option-info"><strong>When to refresh the charts?</strong><br/><small>When set to <b>On Focus</b>, the charts will stop being updated if the page / tab does not have the focus of the user. When set to <b>Always</b>, the charts will always be refreshed. Set it to <b>On Focus</b> it to lower the CPU requirements of the browser (and extend the battery of laptops and tablets) when this page does not have your focus. Set to <b>Always</b> to work on another window (i.e. change the settings of something) and have the charts auto-refresh in this window.</small></td></tr><tr class="option-row"><td class="option-control"><input id="eliminate_zero_dimensions" type="checkbox" checked="checked" data-toggle="toggle" data-on="Non Zero" data-off="All" data-width="110px"></td><td class="option-info"><strong>Which dimensions to show?</strong><br/><small>When set to <b>Non Zero</b>, dimensions that have all their values (within the current view) set to zero will not be transferred from the netdata server (except if all dimensions of the chart are zero, in which case this setting does nothing - all dimensions are transferred and shown). When set to <b>All</b>, all dimensions will always be shown. Set it to <b>Non Zero</b> to lower the data transferred between netdata and your browser, lower the CPU requirements of your browser (fewer lines to draw) and increase the focus on the legends (fewer entries at the legends).</small></td></tr><tr class="option-row"><td class="option-control"><input id="destroy_on_hide" type="checkbox" data-toggle="toggle" data-on="Destroy" data-off="Hide" data-width="110px"></td><td class="option-info"><strong>How to handle hidden charts?</strong><br/><small>When set to <b>Destroy</b>, charts that are not in the current viewport of the browser (are above, or below the visible area of the page), will be destroyed and re-created if and when they become visible again. When set to <b>Hide</b>, the not-visible charts will be just hidden, to simplify the DOM and speed up your browser. Set it to <b>Destroy</b>, to lower the memory requirements of your browser. Set it to <b>Hide</b> for faster restoration of charts on page scrolling.</small></td></tr><tr class="option-row"><td class="option-control"><input id="async_on_scroll" type="checkbox" data-toggle="toggle" data-on="Async" data-off="Sync" data-width="110px"></td><td class="option-info"><strong>Page scroll handling?</strong><br/><small>When set to <b>Sync</b>, charts will be examined for their visibility immediately after scrolling. On slow computers this may impact the smoothness of page scrolling. To update the page when scrolling ends, set it to <b>Async</b>. Set it to <b>Sync</b> for immediate chart updates when scrolling. Set it to <b>Async</b> for smoother page scrolling on slower computers.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_sync"><form id="optionsForm2" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="parallel_refresher" type="checkbox" checked="checked" data-toggle="toggle" data-on="Parallel" data-off="Sequential" data-width="110px"></td><td class="option-info"><strong>Which chart refresh policy to use?</strong><br/><small>When set to <b>parallel</b>, visible charts are refreshed in parallel (all queries are sent to netdata server in parallel) and are rendered asynchronously. When set to <b>sequential</b> charts are refreshed one after another. Set it to parallel if your browser can cope with it (most modern browsers do), set it to sequential if you work on an older/slower computer.</small></td></tr><tr class="option-row" id="concurrent_refreshes_row"><td class="option-control"><input id="concurrent_refreshes" type="checkbox" checked="checked" data-toggle="toggle" data-on="Resync" data-off="Best Effort" data-width="110px"></td><td class="option-info"><strong>Shall we re-sync chart refreshes?</strong><br/><small>When set to <b>Resync</b>, the dashboard will attempt to re-synchronize all the charts so that they are refreshed concurrently. When set to <b>Best Effort</b>, each chart may be refreshed with a little time difference to the others. Normally, the dashboard starts refreshing them in parallel, but depending on the speed of your computer and the network latencies, charts start having a slight time difference. Setting this to <b>Resync</b> will attempt to re-synchronize the charts on every update. Setting it to <b>Best Effort</b> may lower the pressure on your browser and the network.</small></td></tr><tr class="option-row"><td class="option-control"><input id="sync_selection" type="checkbox" checked="checked" data-toggle="toggle" data-on="Sync" data-off="Don't Sync" data-onstyle="success" data-offstyle="danger" data-width="110px"></td><td class="option-info"><strong>Sync hover selection on all charts?</strong><br/><small>When enabled, a selection on one chart will automatically select the same time on all other visible charts and the legends of all visible charts will be updated to show the selected values. When disabled, only the chart getting the user's attention will be selected. Enable it to get better insights of the data. Disable it if you are on a very slow computer that cannot actually do it.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_visual"><form id="optionsForm3" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="legend_right" type="checkbox" checked="checked" data-toggle="toggle" data-on="Right" data-off="Below" data-width="110px"></td><td class="option-info"><strong>Where do you want to see the legend?</strong><br/><small>Netdata can place the legend in two positions: <b>Below</b> charts (the default) or to the <b>Right</b> of charts.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="netdata_theme_control" type="checkbox" checked="checked" data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="Dark" data-off="White" data-width="110px"></td><td class="option-info"><strong>Which theme to use?</strong><br/><small>Netdata comes with two themes: <b>Dark</b> (the default) and <b>White</b>.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="show_help" type="checkbox" checked="checked" data-toggle="toggle" data-on="Help Me" data-off="No Help" data-width="110px"></td><td class="option-info"><strong>Do you need help?</strong><br/><small>Netdata can show some help in some areas to help you use the dashboard. If all these balloons bother you, disable them using this switch.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="pan_and_zoom_data_padding" type="checkbox" checked="checked" data-toggle="toggle" data-on="Pad" data-off="Don't Pad" data-width="110px"></td><td class="option-info"><strong>Enable data padding when panning and zooming?</strong><br/><small>When set to <b>Pad</b> the charts will be padded with more data, both before and after the visible area, thus giving the impression the whole database is loaded. This padding will happen only after the first pan or zoom operation on the chart (initially all charts have only the visible data). When set to <b>Don't Pad</b> only the visible data will be transferred from the netdata server, even after the first pan and zoom operation.</small></td></tr><tr class="option-row"><td class="option-control"><input id="smooth_plot" type="checkbox" checked="checked" data-toggle="toggle" data-on="Smooth" data-off="Rough" data-width="110px"></td><td class="option-info"><strong>Enable Bézier lines on charts?</strong><br/><small>When set to <b>Smooth</b> the charts libraries that support it, will plot smooth curves instead of simple straight lines to connect the points.<br/>Keep in mind <a href="http://dygraphs.com" target="_blank">dygraphs</a>, the main charting library in netdata dashboards, can only smooth line charts. It cannot smooth area or stacked charts. When set to <b>Rough</b>, this setting can lower the CPU resources consumed by your browser.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_locale"><form id="optionsForm4" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td colspan="2" align="center"><small><b>These settings are applied gradually, as charts are updated. To force them, refresh the dashboard now</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="units_conversion" type="checkbox" checked="checked" data-toggle="toggle" data-on="Scale Units" data-off="Fixed Units" data-onstyle="success" data-width="110px"></td><td class="option-info"><strong>Enable auto-scaling of select units?</strong><br/><small>When set to <b>Scale Units</b> the values shown will dynamically be scaled (e.g. 1000 kilobits will be shown as 1 megabit). Netdata can auto-scale these original units: <code>kilobits/s</code>, <code>kilobytes/s</code>, <code>KB/s</code>, <code>KB</code>, <code>MB</code>, and <code>GB</code>. When set to <b>Fixed Units</b> all the values will be rendered using the original units maintained by the netdata server.</small></td></tr><tr id="settingsLocaleTempRow" class="option-row"><td class="option-control"><input id="units_temp" type="checkbox" checked="checked" data-toggle="toggle" data-on="Celsius" data-off="Fahrenheit" data-width="110px"></td><td class="option-info"><strong>Which units to use for temperatures?</strong><br/><small>Set the temperature units of the dashboard.</small></td></tr><tr id="settingsLocaleTimeRow" class="option-row"><td class="option-control"><input id="seconds_as_time" type="checkbox" checked="checked" data-toggle="toggle" data-on="Time" data-off="Seconds" data-onstyle="success" data-width="110px"></td><td class="option-info"><strong>Convert seconds to time?</strong><br/><small>When set to <b>Time</b>, charts that present <code>seconds</code> will show <code>DDd:HH:MM:SS</code>. When set to <b>Seconds</b>, the raw number of seconds will be presented.</small></td></tr></table></div></form></div></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="updateModalLabel">Update Check</h4></div><div class="modal-body">Your netdata version: <b><code><span id="netdataVersion">Unknown</span></code></b><br/><br/><div style="padding:10px"></div><div id="versionCheckLog">Not checked yet. Please press the Check Now button.</div><div><hr/></div><div>For progress reports and key netdata updates: <strong><a href="https://community.netdata.cloud">Join the Netdata Community</a></strong><br/>You can also <a href="https://twitter.com/linuxnetdata" target="_blank">follow netdata on <i class="fab fa-twitter"></i> twitter</a>, <a href="https://www.facebook.com/linuxnetdata/" target="_blank">follow netdata on <i class="fab fa-facebook"></i> facebook</a>, or <a href="https://github.com/netdata/netdata" target="_blank">watch netdata on <i class="fab fa-github"></i> github</a>.</div></div><div class="modal-footer"><a href="#" onclick="return notifyForUpdate(!0),!1" type="button" class="btn btn-default">Check Now</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="signInModal" tabindex="-1" role="dialog" aria-labelledby="signInModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="signInModalLabel">Sign In</h4></div><div class="modal-body"><p>Signing-in to netdata.cloud will synchronize the list of your netdata monitored nodes known at registry <strong><span id="sim-registry"></span></strong>. This may include server hostnames, urls and identification GUIDs.</p><p>After you upgrade all your netdata servers, your private registry will not be needed any more.</p><p>Are you sure you want to proceed?</p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a href="#" onclick="return explicitlySignIn(),!1" type="button" class="btn btn-success">Sign In</a></div></div></div></div><div class="modal fade" id="deleteRegistryModal" tabindex="-1" role="dialog" aria-labelledby="deleteRegistryModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="deleteRegistryModalLabel">Delete <span id="deleteRegistryServerName"></span>?</h4></div><div class="modal-body">You are about to delete, from your personal list of netdata servers, the following server:<p style="text-align:center;padding-top:10px;padding-bottom:10px;line-height:2"><b><span id="deleteRegistryServerName2"></span></b><br/><b><span id="deleteRegistryServerURL"></span></b></p>Are you sure you want to do this?<br/><div style="padding:10px"></div><small>Keep in mind, this server will be added back if and when you visit it again.</small><br/><div id="deleteRegistryResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-success" data-dismiss="modal">keep it</button> <a href="#" onclick="return notifyForDeleteRegistry(),!1" type="button" class="btn btn-danger">delete it</a></div></div></div></div><div class="modal fade" id="switchRegistryModal" tabindex="-1" role="dialog" aria-labelledby="switchRegistryModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="switchRegistryModalLabel">Switch Netdata Registry Identity</h4></div><div class="modal-body">You can copy and paste the following ID to all your browsers (e.g. work and home).<br/>All the browsers with the same ID will identify <b>you</b>, so please don't share this with others.<div style="text-align:center;padding-top:10px;padding-bottom:10px;line-height:2"><form action="#"><input class="form-control" id="switchRegistryPersonGUID" placeholder="your personal ID" maxlength="36" autocomplete="off" style="text-align:center;font-size:1.4em"></form></div>Either copy this ID and paste it to another browser, or paste here the ID you have taken from another browser.<div style="padding-top:10px"><small>Keep in mind that:<ul><li>when you switch ID, your previous ID will be lost forever - this is irreversible.</li><li>both IDs (your old and the new) must list this netdata at their personal lists.</li><li>both IDs have to be known by the registry: <b><span id="switchRegistryURL"></span></b>.</li><li>to get a new ID, just clear your browser cookies.</li></ul></small></div><div id="switchRegistryResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-success" data-dismiss="modal">cancel</button> <a href="#" onclick="return notifyForSwitchRegistry(),!1" type="button" class="btn btn-danger">impersonate</a></div></div></div></div><div class="modal fade" id="gotoServerModal" tabindex="-1" role="dialog" aria-labelledby="gotoServerModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="gotoServerModalLabel"><span id="gotoServerName"></span></h4></div><div class="modal-body">Checking known URLs for this server...<div style="padding-top:20px"><table id="gotoServerList"></table></div><p style="padding-top:10px"><small>Checks may fail if you are viewing an HTTPS page and the server to be checked is HTTP only.</small></p><div id="gotoServerResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div id="modal-root"></div><iframe id="ssoifrm" width="0" height="0"></iframe><div id="hiddenDownloadLinks" style="display:none" hidden></div><script type="text/javascript" src="dashboard-react.js"></script><script>const show404 = function() {
15 + overlayEl.innerHTML = 'netdata<br/><div style="font-size: 3vh;">Monitoring and troubleshooting, transformed!</div>';
16 + overlayEl.style = theme == 'slate' ? "background-color: #272b30; color: #373b40;" : "background-color: #fff; color: #ddd;";</script><div id="root"></div><div class="navbar-highlight"><div id="navbar-highlight-content" class="navbar-highlight-content"></div></div><div class="container"><div class="row"><div class="charts-body" role="main"><div id="masthead" style="display:none"><div class="container"><div class="row"><div class="col-md-7"><h1>Netdata<p class="lead">Real-time performance monitoring, in the greatest possible detail</p></h1></div><div class="col-md-5"><div class="well well-lg"><div class="row"><div class="col-md-6"><b>Drag</b> charts to pan. <b>Shift + wheel</b> on them, to zoom in and out. <b>Double-click</b> on them, to reset. <b>Hover</b> on them too!</div><div class="col-md-6"><div class="netdata-container" data-netdata="system.cpu" data-dimensions="user" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dygraph-type="line" data-dygraph-strokewidth="3" data-dygraph-smooth="true" data-dygraph-highlightcirclesize="6" data-after="-90" data-height="60px" data-colors="#C66"></div></div></div></div></div></div></div></div><div id="charts_div"></div></div><div class="sidebar-body hidden-xs hidden-sm hidden-print" id="sidebar-body" role="complementary"><nav class="dashboard-sidebar hidden-print hidden-xs hidden-sm" id="sidebar" role="menu"></nav></div></div></div><div id="footer" class="container" style="display:none"><div class="row"><div class="col-md-10" role="main"><div class="p"><big><a href="https://github.com/netdata/netdata/wiki" target="_blank">Netdata</a></big><br/><br/><i class="fas fa-copyright"></i> Copyright 2018-2025 <a href="mailto:info@netdata.cloud">Netdata Inc.</a>.<br/><br/><div class="terms-and-privacy"><a href="https://www.netdata.cloud/terms/" target="_blank">Terms and conditions</a> <a href="https://www.netdata.cloud/privacy/" target="_blank">Privacy Policy</a></div></div><div class="p">Released under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPL v3 or later</a>. Netdata uses <a href="https://github.com/netdata/netdata/blob/master/REDISTRIBUTED.md" target="_blank">third party tools</a>.<br/><br/></div></div></div></div><div class="modal fade" id="xssModal" tabindex="-1" role="dialog" aria-labelledby="xssModalLabel" data-keyboard="false" data-backdrop="static" style="z-index:3000"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="xssModalLabel">XSS Protection</h4></div><div class="modal-body"><p>This dashboard is about to render data from server:</p><p style="font-size:1.25em"><code id="netdataXssModalServer"></code></p><p>To protect your privacy, the dashboard will <b>check all data transferred</b> for cross site scripting (XSS).<br/>This is CPU intensive, so your browser might be a bit slower.</p><p>If you <b>trust</b> the remote server, you can disable XSS protection.<br/>In this case, any remote dashboard decoration code (javascript) will also run.</p><p>If you <b>don't trust</b> the remote server, you should keep the protection on.<br/>The dashboard will run slower and remote dashboard decoration code will not run, but better be safe than sorry...</p></div><div class="modal-footer"><a href="#" onclick="return xssModalKeepXss()" type="button" class="btn btn-success" data-dismiss="modal">Keep protecting me</a> <a href="#" onclick="return xssModalDisableXss()" type="button" class="btn btn-danger" data-dismiss="modal">I don't need this, the server is mine</a></div></div></div></div><div class="modal fade" id="printPreflightModal" tabindex="-1" role="dialog" aria-labelledby="printPreflightModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="printPreflightModalLabel">Print this netdata dashboard</h4></div><div class="modal-body"><p>netdata dashboards cannot be captured, since we are lazy loading and hiding all but the visible charts.<br/>To capture the whole page with all the charts rendered, a new browser window will pop-up that will render all the charts at once. The new browser window will maintain the current pan and zoom settings of the charts. So, align the charts before proceeding.</p><p><small>This process will put some CPU and memory pressure on your browser.<br/>For the netdata server, we will sequentially download all the charts, to avoid congesting network and server resources.<br/><b>Please, do not print netdata dashboards on paper!</b></small></p></div><div class="modal-footer"><a href="#" onclick="return printPreflight(),!1" type="button" class="btn btn-default">Print</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="loadSnapshotModal" tabindex="-1" role="dialog" aria-labelledby="loadSnapshotModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="loadSnapshotModalLabel">Import a netdata snapshot</h4></div><div id="loadSnapshotDragAndDrop" class="modal-body"><p>netdata can export and import dashboard snapshots. Any netdata can import the snapshot of any other netdata. The snapshots are not uploaded to a server. They are handled entirely by your web browser, on your computer.</p><p style="text-align:center"><label class="btn btn-default">Click here to select the netdata snapshot file to import <input type="file" id="loadSnapshotSelectFiles" value="Import" style="display:none" onchange="loadSnapshotPreflight()"></label></p><div id="loadSnapshotStatus" class="alert alert-info" role="alert">Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it.</div><p><table class="table"><tbody><tr><th>Filename</th><td id="loadSnapshotFilename"></td></tr><tr><th>Hostname</th><td id="loadSnapshotHostname"></td></tr><tr><th>Origin URL</th><td id="loadSnapshotURL"></td></tr><tr><th>Charts Info</th><td id="loadSnapshotCharts"></td></tr><tr><th>Snapshot Info</th><td id="loadSnapshotInfo"></td></tr><tr><th>Time Range</th><td id="loadSnapshotTimeRange"></td></tr><tr><th>Comments</th><td id="loadSnapshotComments"></td></tr></tbody></table></p></div><div class="modal-footer"><span style="display:inline-block;padding-right:20px">Snapshot files contain both data and javascript code. Make sure <b>you trust the files</b> you import!</span> <a id="loadSnapshotImport" href="#" onclick="return loadSnapshot(),!1" type="button" class="btn btn-success disabled">Import</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="saveSnapshotModal" tabindex="-1" role="dialog" aria-labelledby="saveSnapshotModalLabel" data-keyboard="false" data-backdrop="static"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="saveSnapshotModalLabel">Export a snapshot</h4></div><div class="modal-body"><div id="saveSnapshotModalProgressSection" hidden>Please wait while we collect all the dashboard data...<div class="progress progress-striped active" style="height:2em!important"><div id="saveSnapshotModalProgressBar" class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width:2em"><span id="saveSnapshotModalProgressBarText" style="padding-left:10px;padding-top:4px;font-size:1.2em;text-align:left;width:100%;position:absolute;display:block"></span></div></div></div><div id="saveSnapshotResolutionRadio" style="text-align:center">Select the desired resolution of the snapshot. This is the <b>seconds of data per point</b>.<br/>&nbsp;<br/>&nbsp;<br/><input id="saveSnapshotResolutionSlider" data-slider-id="saveSnapshotResolutionSlider" style="width:80%" tabindex="0"/><br/>&nbsp;<br/><div class="input-group"><span class="input-group-addon" id="sizing-saveSnapshotFilename" style="width:100px">Filename</span> <input id="saveSnapshotFilename" class="form-control" placeholder="Filename of the generated snapshot" aria-describedby="sizing-saveSnapshotFilename" tabindex="2"/><div class="input-group-btn"><div class="input-group-btn"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span id="saveSnapshotCompressionName">Compression</span> <span class="caret"></span></button><ul class="dropdown-menu dropdown-menu-right"><li class="disabled"><a href="#" class="disabled">Select Compression</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("none"),!1'>uncompressed</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("pako.deflate"),!1'>pako.deflate (gzip, binary)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("pako.deflate.base64"),!1'>pako.deflate.base64 (gzip, ascii)</a></li><li role="separator" class="divider"></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.uri"),!1'>lzstring.uri (LZ, ascii)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.utf16"),!1'>lzstring.utf16 (LZ, utf16)</a></li><li><a href="#" onclick='return saveSnapshotSetCompression("lzstring.base64"),!1'>lzstring.base64 (LZ, ascii)</a></li></ul></div></div></div><div class="input-group" style="padding-top:10px;width:100%"><span class="input-group-addon" id="sizing-saveSnapshotComments" style="width:100px">Comments</span> <input id="saveSnapshotComments" class="form-control" placeholder="Any comments about this snapshot?" aria-describedby="sizing-saveSnapshotComments" tabindex="3"/></div></div>&nbsp;<div id="saveSnapshotStatus" class="alert alert-info" role="alert">Select snaphost resolution. This controls the size the snapshot file.</div><p>The generated snapshot will include all charts of this dashboard, <b>for the visible timeframe</b>, so align, pan and zoom the charts as needed. The scroll position of the dashboard will also be saved. The snapshot will be downloaded as a file, to your computer, that can be imported back into any netdata dashboard (no need to import it back on this server).</p><p><small>Snapshot files include all the information of the dashboard, including the URL of the origin server, its netdata unique ID, etc. So, if you share the snapshot file with third parties, they will be able to access the origin server, if this server is exposed on the internet.<br/>Snapshots are handled entirely by the web browser. The netdata servers are not aware of them.</small></p></div><div class="modal-footer"><a id="saveSnapshotExport" href="#" onclick="return saveSnapshot(),!1" type="button" class="btn btn-success" tabindex="4">Export</a> <button type="button" class="btn btn-default" data-dismiss="modal" tabindex="5">Cancel</button></div></div></div></div><div class="modal fade" id="alarmsModal" tabindex="-1" role="dialog" aria-labelledby="alarmsModalLabel"><div class="modal-dialog modal-lg" role="document" style="display:table"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="alarmsModalLabel">netdata alarms</h4></div><div class="modal-body"><ul class="nav nav-tabs" role="tablist"><li role="presentation" class="active"><a href="#alarms_active" aria-controls="alarms_active" role="tab" data-toggle="tab">Active</a></li><li role="presentation"><a href="#alarms_all" aria-controls="alarms_all" role="tab" data-toggle="tab">All</a></li><li role="presentation"><a href="#alarms_log" aria-controls="alarms_log" role="tab" data-toggle="tab">Log</a></li></ul><div class="tab-content"><div role="tabpanel" class="tab-pane active" id="alarms_active">loading...</div><div role="tabpanel" class="tab-pane" id="alarms_all">loading...</div><div role="tabpanel" class="tab-pane" id="alarms_log">loading...</div></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="optionsModal" tabindex="-1" role="dialog" aria-labelledby="optionsModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="optionsModalLabel">netdata dashboard options</h4></div><div class="modal-body"><center><small style="color:#bbb">These are browser settings. Each viewer has its own. They do not affect the operation of your netdata server.<br/>Settings take effect immediately and are saved permanently to browser local storage (except the refresh on focus / always option).<br/>To reset all options (including charts sizes) to their defaults, click <a href="#" onclick="return resetDashboardOptions(),!1">here</a>.</small></center><div style="padding:10px"></div><ul class="nav nav-tabs" role="tablist"><li role="presentation" class="active"><a href="#settings_performance" aria-controls="settings_performance" role="tab" data-toggle="tab">Performance</a></li><li role="presentation"><a href="#settings_sync" aria-controls="settings_sync" role="tab" data-toggle="tab">Synchronization</a></li><li role="presentation"><a href="#settings_visual" aria-controls="settings_visual" role="tab" data-toggle="tab">Visual</a></li><li role="presentation"><a href="#settings_locale" aria-controls="settings_locale" role="tab" data-toggle="tab">Locale</a></li></ul><div class="tab-content"><div role="tabpanel" class="tab-pane active" id="settings_performance"><form id="optionsForm1" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="stop_updates_when_focus_is_lost" type="checkbox" checked="checked" data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="On Focus" data-off="Always" data-width="110px"></td><td class="option-info"><strong>When to refresh the charts?</strong><br/><small>When set to <b>On Focus</b>, the charts will stop being updated if the page / tab does not have the focus of the user. When set to <b>Always</b>, the charts will always be refreshed. Set it to <b>On Focus</b> it to lower the CPU requirements of the browser (and extend the battery of laptops and tablets) when this page does not have your focus. Set to <b>Always</b> to work on another window (i.e. change the settings of something) and have the charts auto-refresh in this window.</small></td></tr><tr class="option-row"><td class="option-control"><input id="eliminate_zero_dimensions" type="checkbox" checked="checked" data-toggle="toggle" data-on="Non Zero" data-off="All" data-width="110px"></td><td class="option-info"><strong>Which dimensions to show?</strong><br/><small>When set to <b>Non Zero</b>, dimensions that have all their values (within the current view) set to zero will not be transferred from the netdata server (except if all dimensions of the chart are zero, in which case this setting does nothing - all dimensions are transferred and shown). When set to <b>All</b>, all dimensions will always be shown. Set it to <b>Non Zero</b> to lower the data transferred between netdata and your browser, lower the CPU requirements of your browser (fewer lines to draw) and increase the focus on the legends (fewer entries at the legends).</small></td></tr><tr class="option-row"><td class="option-control"><input id="destroy_on_hide" type="checkbox" data-toggle="toggle" data-on="Destroy" data-off="Hide" data-width="110px"></td><td class="option-info"><strong>How to handle hidden charts?</strong><br/><small>When set to <b>Destroy</b>, charts that are not in the current viewport of the browser (are above, or below the visible area of the page), will be destroyed and re-created if and when they become visible again. When set to <b>Hide</b>, the not-visible charts will be just hidden, to simplify the DOM and speed up your browser. Set it to <b>Destroy</b>, to lower the memory requirements of your browser. Set it to <b>Hide</b> for faster restoration of charts on page scrolling.</small></td></tr><tr class="option-row"><td class="option-control"><input id="async_on_scroll" type="checkbox" data-toggle="toggle" data-on="Async" data-off="Sync" data-width="110px"></td><td class="option-info"><strong>Page scroll handling?</strong><br/><small>When set to <b>Sync</b>, charts will be examined for their visibility immediately after scrolling. On slow computers this may impact the smoothness of page scrolling. To update the page when scrolling ends, set it to <b>Async</b>. Set it to <b>Sync</b> for immediate chart updates when scrolling. Set it to <b>Async</b> for smoother page scrolling on slower computers.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_sync"><form id="optionsForm2" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="parallel_refresher" type="checkbox" checked="checked" data-toggle="toggle" data-on="Parallel" data-off="Sequential" data-width="110px"></td><td class="option-info"><strong>Which chart refresh policy to use?</strong><br/><small>When set to <b>parallel</b>, visible charts are refreshed in parallel (all queries are sent to netdata server in parallel) and are rendered asynchronously. When set to <b>sequential</b> charts are refreshed one after another. Set it to parallel if your browser can cope with it (most modern browsers do), set it to sequential if you work on an older/slower computer.</small></td></tr><tr class="option-row" id="concurrent_refreshes_row"><td class="option-control"><input id="concurrent_refreshes" type="checkbox" checked="checked" data-toggle="toggle" data-on="Resync" data-off="Best Effort" data-width="110px"></td><td class="option-info"><strong>Shall we re-sync chart refreshes?</strong><br/><small>When set to <b>Resync</b>, the dashboard will attempt to re-synchronize all the charts so that they are refreshed concurrently. When set to <b>Best Effort</b>, each chart may be refreshed with a little time difference to the others. Normally, the dashboard starts refreshing them in parallel, but depending on the speed of your computer and the network latencies, charts start having a slight time difference. Setting this to <b>Resync</b> will attempt to re-synchronize the charts on every update. Setting it to <b>Best Effort</b> may lower the pressure on your browser and the network.</small></td></tr><tr class="option-row"><td class="option-control"><input id="sync_selection" type="checkbox" checked="checked" data-toggle="toggle" data-on="Sync" data-off="Don't Sync" data-onstyle="success" data-offstyle="danger" data-width="110px"></td><td class="option-info"><strong>Sync hover selection on all charts?</strong><br/><small>When enabled, a selection on one chart will automatically select the same time on all other visible charts and the legends of all visible charts will be updated to show the selected values. When disabled, only the chart getting the user's attention will be selected. Enable it to get better insights of the data. Disable it if you are on a very slow computer that cannot actually do it.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_visual"><form id="optionsForm3" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td class="option-control"><input id="legend_right" type="checkbox" checked="checked" data-toggle="toggle" data-on="Right" data-off="Below" data-width="110px"></td><td class="option-info"><strong>Where do you want to see the legend?</strong><br/><small>Netdata can place the legend in two positions: <b>Below</b> charts (the default) or to the <b>Right</b> of charts.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="netdata_theme_control" type="checkbox" checked="checked" data-toggle="toggle" data-offstyle="danger" data-onstyle="success" data-on="Dark" data-off="White" data-width="110px"></td><td class="option-info"><strong>Which theme to use?</strong><br/><small>Netdata comes with two themes: <b>Dark</b> (the default) and <b>White</b>.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="show_help" type="checkbox" checked="checked" data-toggle="toggle" data-on="Help Me" data-off="No Help" data-width="110px"></td><td class="option-info"><strong>Do you need help?</strong><br/><small>Netdata can show some help in some areas to help you use the dashboard. If all these balloons bother you, disable them using this switch.<br/><b>Switching this will reload the dashboard</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="pan_and_zoom_data_padding" type="checkbox" checked="checked" data-toggle="toggle" data-on="Pad" data-off="Don't Pad" data-width="110px"></td><td class="option-info"><strong>Enable data padding when panning and zooming?</strong><br/><small>When set to <b>Pad</b> the charts will be padded with more data, both before and after the visible area, thus giving the impression the whole database is loaded. This padding will happen only after the first pan or zoom operation on the chart (initially all charts have only the visible data). When set to <b>Don't Pad</b> only the visible data will be transferred from the netdata server, even after the first pan and zoom operation.</small></td></tr><tr class="option-row"><td class="option-control"><input id="smooth_plot" type="checkbox" checked="checked" data-toggle="toggle" data-on="Smooth" data-off="Rough" data-width="110px"></td><td class="option-info"><strong>Enable Bézier lines on charts?</strong><br/><small>When set to <b>Smooth</b> the charts libraries that support it, will plot smooth curves instead of simple straight lines to connect the points.<br/>Keep in mind <a href="http://dygraphs.com" target="_blank">dygraphs</a>, the main charting library in netdata dashboards, can only smooth line charts. It cannot smooth area or stacked charts. When set to <b>Rough</b>, this setting can lower the CPU resources consumed by your browser.</small></td></tr></table></div></form></div><div role="tabpanel" class="tab-pane" id="settings_locale"><form id="optionsForm4" class="form-horizontal"><div class="form-group"><table><tr class="option-row"><td colspan="2" align="center"><small><b>These settings are applied gradually, as charts are updated. To force them, refresh the dashboard now</b>.</small></td></tr><tr class="option-row"><td class="option-control"><input id="units_conversion" type="checkbox" checked="checked" data-toggle="toggle" data-on="Scale Units" data-off="Fixed Units" data-onstyle="success" data-width="110px"></td><td class="option-info"><strong>Enable auto-scaling of select units?</strong><br/><small>When set to <b>Scale Units</b> the values shown will dynamically be scaled (e.g. 1000 kilobits will be shown as 1 megabit). Netdata can auto-scale these original units: <code>kilobits/s</code>, <code>kilobytes/s</code>, <code>KB/s</code>, <code>KB</code>, <code>MB</code>, and <code>GB</code>. When set to <b>Fixed Units</b> all the values will be rendered using the original units maintained by the netdata server.</small></td></tr><tr id="settingsLocaleTempRow" class="option-row"><td class="option-control"><input id="units_temp" type="checkbox" checked="checked" data-toggle="toggle" data-on="Celsius" data-off="Fahrenheit" data-width="110px"></td><td class="option-info"><strong>Which units to use for temperatures?</strong><br/><small>Set the temperature units of the dashboard.</small></td></tr><tr id="settingsLocaleTimeRow" class="option-row"><td class="option-control"><input id="seconds_as_time" type="checkbox" checked="checked" data-toggle="toggle" data-on="Time" data-off="Seconds" data-onstyle="success" data-width="110px"></td><td class="option-info"><strong>Convert seconds to time?</strong><br/><small>When set to <b>Time</b>, charts that present <code>seconds</code> will show <code>DDd:HH:MM:SS</code>. When set to <b>Seconds</b>, the raw number of seconds will be presented.</small></td></tr></table></div></form></div></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="updateModalLabel">Update Check</h4></div><div class="modal-body">Your netdata version: <b><code><span id="netdataVersion">Unknown</span></code></b><br/><br/><div style="padding:10px"></div><div id="versionCheckLog">Not checked yet. Please press the Check Now button.</div><div><hr/></div><div>For progress reports and key netdata updates: <strong><a href="https://community.netdata.cloud">Join the Netdata Community</a></strong><br/>You can also <a href="https://twitter.com/linuxnetdata" target="_blank">follow netdata on <i class="fab fa-twitter"></i> twitter</a>, <a href="https://www.facebook.com/linuxnetdata/" target="_blank">follow netdata on <i class="fab fa-facebook"></i> facebook</a>, or <a href="https://github.com/netdata/netdata" target="_blank">watch netdata on <i class="fab fa-github"></i> github</a>.</div></div><div class="modal-footer"><a href="#" onclick="return notifyForUpdate(!0),!1" type="button" class="btn btn-default">Check Now</a> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div class="modal fade" id="signInModal" tabindex="-1" role="dialog" aria-labelledby="signInModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="signInModalLabel">Sign In</h4></div><div class="modal-body"><p>Signing-in to netdata.cloud will synchronize the list of your netdata monitored nodes known at registry <strong><span id="sim-registry"></span></strong>. This may include server hostnames, urls and identification GUIDs.</p><p>After you upgrade all your netdata servers, your private registry will not be needed any more.</p><p>Are you sure you want to proceed?</p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a href="#" onclick="return explicitlySignIn(),!1" type="button" class="btn btn-success">Sign In</a></div></div></div></div><div class="modal fade" id="deleteRegistryModal" tabindex="-1" role="dialog" aria-labelledby="deleteRegistryModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="deleteRegistryModalLabel">Delete <span id="deleteRegistryServerName"></span>?</h4></div><div class="modal-body">You are about to delete, from your personal list of netdata servers, the following server:<p style="text-align:center;padding-top:10px;padding-bottom:10px;line-height:2"><b><span id="deleteRegistryServerName2"></span></b><br/><b><span id="deleteRegistryServerURL"></span></b></p>Are you sure you want to do this?<br/><div style="padding:10px"></div><small>Keep in mind, this server will be added back if and when you visit it again.</small><br/><div id="deleteRegistryResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-success" data-dismiss="modal">keep it</button> <a href="#" onclick="return notifyForDeleteRegistry(),!1" type="button" class="btn btn-danger">delete it</a></div></div></div></div><div class="modal fade" id="switchRegistryModal" tabindex="-1" role="dialog" aria-labelledby="switchRegistryModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="switchRegistryModalLabel">Switch Netdata Registry Identity</h4></div><div class="modal-body">You can copy and paste the following ID to all your browsers (e.g. work and home).<br/>All the browsers with the same ID will identify <b>you</b>, so please don't share this with others.<div style="text-align:center;padding-top:10px;padding-bottom:10px;line-height:2"><form action="#"><input class="form-control" id="switchRegistryPersonGUID" placeholder="your personal ID" maxlength="36" autocomplete="off" style="text-align:center;font-size:1.4em"></form></div>Either copy this ID and paste it to another browser, or paste here the ID you have taken from another browser.<div style="padding-top:10px"><small>Keep in mind that:<ul><li>when you switch ID, your previous ID will be lost forever - this is irreversible.</li><li>both IDs (your old and the new) must list this netdata at their personal lists.</li><li>both IDs have to be known by the registry: <b><span id="switchRegistryURL"></span></b>.</li><li>to get a new ID, just clear your browser cookies.</li></ul></small></div><div id="switchRegistryResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-success" data-dismiss="modal">cancel</button> <a href="#" onclick="return notifyForSwitchRegistry(),!1" type="button" class="btn btn-danger">impersonate</a></div></div></div></div><div class="modal fade" id="gotoServerModal" tabindex="-1" role="dialog" aria-labelledby="gotoServerModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="gotoServerModalLabel"><span id="gotoServerName"></span></h4></div><div class="modal-body">Checking known URLs for this server...<div style="padding-top:20px"><table id="gotoServerList"></table></div><p style="padding-top:10px"><small>Checks may fail if you are viewing an HTTPS page and the server to be checked is HTTP only.</small></p><div id="gotoServerResponse" style="display:block;width:100%;text-align:center;padding-top:20px"></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div><div id="modal-root"></div><iframe id="ssoifrm" width="0" height="0"></iframe><div id="hiddenDownloadLinks" style="display:none" hidden></div><script type="text/javascript" src="dashboard-react.js"></script><script>const show404 = function() {
17 const overlayEl = document.getElementById('loadOverlay');
18 overlayEl.innerHTML = '404 Page not found<br/><div style="font-size: 3vh;">We cannot load files from this path - No Netdata server detected</div>';
19 window.NETDATA = null
src/web/gui/v1/infographic.html
+1 -1
@@ -4,7 +4,7 @@
4 <head>
5 <meta charset=utf-8>
6 <title>Netdata: Get control of your Linux Servers. Simple. Effective. Awesome.</title>
7 - <meta name=author content="Costa Tsaousis">
7 + <meta name=author content="Netdata Inc.">
8 <meta name=description content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms.">
9
10 <meta name=viewport content="width=device-width,initial-scale=1">
src/web/gui/v1/tv-react.html
+1 -1
@@ -17,7 +17,7 @@
17 <meta property="og:url" content="http://my-netdata.io/"/>
18 <meta property="og:type" content="website"/>
19 <meta property="og:site_name" content="netdata"/>
20 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22 <!-- todo generate urls like this from prod build -->
23 <!-- <link href="/dashboard/build/static/css/main.19393e92.chunk.css" rel="stylesheet">-->
src/web/gui/v1/tv.html
+1 -1
@@ -17,7 +17,7 @@
17 <meta property="og:url" content="http://my-netdata.io/"/>
18 <meta property="og:type" content="website"/>
19 <meta property="og:site_name" content="netdata"/>
20 - <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
20 + <meta property="og:title" content="netdata - monitoring and troubleshooting, transformed!"/>
21 <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
22
23 </head>
system/initd/init.d/netdata.in
+1 -1
@@ -1,7 +1,7 @@
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 -# netdata Real-time performance monitoring, done right
4 +# Netdata - Monitoring and troubleshooting, transformed!
5 # chkconfig: 345 99 01
6 # description: Netdata is a daemon that collects data in real-time (per second)
7 # and presents a web site to view and analyze them. The presentation
system/lsb/init.d/netdata.in
+1 -7
@@ -1,13 +1,7 @@
1 #!/usr/bin/env bash
2 +# SPDX-License-Identifier: GPL-3.0-or-later
3 #
4 # Netdata LSB start script
4 -#
5 -# Copyright:
6 -# SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author:
9 -# Costa Tsaousis <costa@netdata.cloud>
10 -# Pavlos Emm. Katsoulakis <paul@netdata.cloud>
5
6 ### BEGIN INIT INFO
7 # Provides: netdata