diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:07:37 +0000 |
commit | b485aab7e71c1625cfc27e0f92c9509f42378458 (patch) | |
tree | ae9abe108601079d1679194de237c9a435ae5b55 /web/api/exporters | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.tar.xz netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.zip |
Adding upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/web/api/exporters/allmetrics.c (renamed from web/api/exporters/allmetrics.c) | 0 | ||||
-rw-r--r-- | src/web/api/exporters/allmetrics.h (renamed from web/api/exporters/allmetrics.h) | 0 | ||||
-rw-r--r-- | src/web/api/exporters/shell/allmetrics_shell.c (renamed from web/api/exporters/shell/allmetrics_shell.c) | 0 | ||||
-rw-r--r-- | src/web/api/exporters/shell/allmetrics_shell.h (renamed from web/api/exporters/shell/allmetrics_shell.h) | 0 | ||||
-rw-r--r-- | web/api/exporters/Makefile.am | 13 | ||||
-rw-r--r-- | web/api/exporters/README.md | 14 | ||||
-rw-r--r-- | web/api/exporters/prometheus/Makefile.am | 8 | ||||
-rw-r--r-- | web/api/exporters/prometheus/README.md | 14 | ||||
-rw-r--r-- | web/api/exporters/shell/Makefile.am | 8 | ||||
-rw-r--r-- | web/api/exporters/shell/README.md | 73 |
10 files changed, 0 insertions, 130 deletions
diff --git a/web/api/exporters/allmetrics.c b/src/web/api/exporters/allmetrics.c index cad52a7d5..cad52a7d5 100644 --- a/web/api/exporters/allmetrics.c +++ b/src/web/api/exporters/allmetrics.c diff --git a/web/api/exporters/allmetrics.h b/src/web/api/exporters/allmetrics.h index 3afc42e28..3afc42e28 100644 --- a/web/api/exporters/allmetrics.h +++ b/src/web/api/exporters/allmetrics.h diff --git a/web/api/exporters/shell/allmetrics_shell.c b/src/web/api/exporters/shell/allmetrics_shell.c index c8248c148..c8248c148 100644 --- a/web/api/exporters/shell/allmetrics_shell.c +++ b/src/web/api/exporters/shell/allmetrics_shell.c diff --git a/web/api/exporters/shell/allmetrics_shell.h b/src/web/api/exporters/shell/allmetrics_shell.h index d6598e08d..d6598e08d 100644 --- a/web/api/exporters/shell/allmetrics_shell.h +++ b/src/web/api/exporters/shell/allmetrics_shell.h diff --git a/web/api/exporters/Makefile.am b/web/api/exporters/Makefile.am deleted file mode 100644 index 06fda51ef..000000000 --- a/web/api/exporters/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -AUTOMAKE_OPTIONS = subdir-objects -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -SUBDIRS = \ - shell \ - prometheus \ - $(NULL) - -dist_noinst_DATA = \ - README.md \ - $(NULL) diff --git a/web/api/exporters/README.md b/web/api/exporters/README.md deleted file mode 100644 index 4be567691..000000000 --- a/web/api/exporters/README.md +++ /dev/null @@ -1,14 +0,0 @@ -<!-- -title: "Exporters" -custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/exporters/README.md -sidebar_label: "Exporters" -learn_status: "Published" -learn_topic_type: "References" -learn_rel_path: "Developers/Web/Api" ---> - -# Exporters - -TBD - - diff --git a/web/api/exporters/prometheus/Makefile.am b/web/api/exporters/prometheus/Makefile.am deleted file mode 100644 index 161784b8f..000000000 --- a/web/api/exporters/prometheus/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -AUTOMAKE_OPTIONS = subdir-objects -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -dist_noinst_DATA = \ - README.md \ - $(NULL) diff --git a/web/api/exporters/prometheus/README.md b/web/api/exporters/prometheus/README.md deleted file mode 100644 index 5e0f98c16..000000000 --- a/web/api/exporters/prometheus/README.md +++ /dev/null @@ -1,14 +0,0 @@ -<!-- -title: "Prometheus exporter" -custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/exporters/prometheus/README.md -sidebar_label: "Prometheus exporter" -learn_status: "Published" -learn_topic_type: "References" -learn_rel_path: "Developers/Web/Api/Exporters" ---> - -# Prometheus exporter - -Read the Prometheus exporter documentation: [Using Netdata with Prometheus](https://github.com/netdata/netdata/blob/master/exporting/prometheus/README.md). - - diff --git a/web/api/exporters/shell/Makefile.am b/web/api/exporters/shell/Makefile.am deleted file mode 100644 index 161784b8f..000000000 --- a/web/api/exporters/shell/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -AUTOMAKE_OPTIONS = subdir-objects -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -dist_noinst_DATA = \ - README.md \ - $(NULL) diff --git a/web/api/exporters/shell/README.md b/web/api/exporters/shell/README.md deleted file mode 100644 index 7e28829a7..000000000 --- a/web/api/exporters/shell/README.md +++ /dev/null @@ -1,73 +0,0 @@ -<!-- -title: "Shell exporter" -custom_edit_url: https://github.com/netdata/netdata/edit/master/web/api/exporters/shell/README.md -sidebar_label: "Shell exporter" -learn_status: "Published" -learn_topic_type: "References" -learn_rel_path: "Developers/Web/Api/Exporters" ---> - -# Shell exporter - -Shell scripts can now query Netdata: - -```sh -eval "$(curl -s 'http://localhost:19999/api/v1/allmetrics')" -``` - -after this command, all the Netdata metrics are exposed to shell. Check: - -```sh -# source the metrics -eval "$(curl -s 'http://localhost:19999/api/v1/allmetrics')" - -# let's see if there are variables exposed by Netdata for system.cpu -set | grep "^NETDATA_SYSTEM_CPU" - -NETDATA_SYSTEM_CPU_GUEST=0 -NETDATA_SYSTEM_CPU_GUEST_NICE=0 -NETDATA_SYSTEM_CPU_IDLE=95 -NETDATA_SYSTEM_CPU_IOWAIT=0 -NETDATA_SYSTEM_CPU_IRQ=0 -NETDATA_SYSTEM_CPU_NICE=0 -NETDATA_SYSTEM_CPU_SOFTIRQ=0 -NETDATA_SYSTEM_CPU_STEAL=0 -NETDATA_SYSTEM_CPU_SYSTEM=1 -NETDATA_SYSTEM_CPU_USER=4 -NETDATA_SYSTEM_CPU_VISIBLETOTAL=5 - -# let's see the total cpu utilization of the system -echo ${NETDATA_SYSTEM_CPU_VISIBLETOTAL} -5 - -# what about alerts? -set | grep "^NETDATA_ALARM_SYSTEM_SWAP_" -NETDATA_ALARM_SYSTEM_SWAP_USED_SWAP_STATUS=CLEAR -NETDATA_ALARM_SYSTEM_SWAP_USED_SWAP_VALUE=51 - -# let's get the current status of the alert 'used swap' -echo ${NETDATA_ALARM_SYSTEM_SWAP_USED_SWAP_STATUS} -CLEAR - -# is it fast? -time curl -s 'http://localhost:19999/api/v1/allmetrics' >/dev/null - -real 0m0,070s -user 0m0,000s -sys 0m0,007s - -# it is... -# 0.07 seconds for curl to be loaded, connect to Netdata and fetch the response back... -``` - -The `_VISIBLETOTAL` variable sums up all the dimensions of each chart. - -The format of the variables is: - -```sh -NETDATA_${chart_id^^}_${dimension_id^^}="${value}" -``` - -The value is rounded to the closest integer, since shell script cannot process decimal numbers. - - |