Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/pkg-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ install_debian_like() {

apt-get update

# Install NetData
# Install Netdata
apt-get install -y /netdata/artifacts/netdata_"${VERSION}"_*.deb || exit 1

# Install testing tools
Expand All @@ -21,7 +21,7 @@ install_fedora_like() {

pkg_version="$(echo "${VERSION}" | tr - .)"

# Install NetData
# Install Netdata
"$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm

# Install testing tools
Expand All @@ -39,7 +39,7 @@ install_centos() {
# Install EPEL (needed for `jq`
"$PKGMGR" install -y epel-release || exit 1

# Install NetData
# Install Netdata
"$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm

# Install testing tools
Expand All @@ -52,7 +52,7 @@ install_suse_like() {

pkg_version="$(echo "${VERSION}" | tr - .)"

# Install NetData
# Install Netdata
zypper install -y --allow-unsigned-rpm /netdata/artifacts/netdata-"${pkg_version}"-*.rpm

# Install testing tools
Expand Down
12 changes: 6 additions & 6 deletions backends/WALKTHROUGH.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ Prometheus’s homepage and begin to type ‘netdata\_’ Prometheus should auto

![](https://github.com/ldelossa/NetdataTutorial/raw/master/Screen%20Shot%202017-07-28%20at%205.13.43%20PM.png)

Let’s now start exploring how we can graph some metrics. Back in our NetData container lets get the CPU spinning with a
Let’s now start exploring how we can graph some metrics. Back in our Netdata container lets get the CPU spinning with a
pointless busy loop. On the shell do the following:

```sh
[root@netdata /]# while true; do echo "HOT HOT HOT CPU"; done
```

Our NetData cpu graph should be showing some activity. Let’s represent this in Prometheus. In order to do this let’s
Our Netdata cpu graph should be showing some activity. Let’s represent this in Prometheus. In order to do this let’s
keep our metrics page open for reference: <http://localhost:19999/api/v1/allmetrics?format=prometheus&help=yes> We are
setting out to graph the data in the CPU chart so let’s search for “system.cpu”in the metrics page above. We come across
a section of metrics with the first comments `# COMMENT homogeneous chart "system.cpu", context "system.cpu", family
Expand All @@ -209,18 +209,18 @@ query the dimension also. Place this into our query text box.

![](https://github.com/ldelossa/NetdataTutorial/raw/master/Screen%20Shot%202017-07-28%20at%205.54.40%20PM.png)

Awesome, this is exactly what we wanted. If you haven’t caught on yet we can emulate entire charts from NetData by using
Awesome, this is exactly what we wanted. If you haven’t caught on yet we can emulate entire charts from Netdata by using
the `chart` dimension. If you’d like you can combine the ‘chart’ and ‘instance’ dimension to create per-instance charts.
Let’s give this a try: `netdata_system_cpu_percentage_average{chart="system.cpu", instance="netdata:19999"}`

This is the basics of using Prometheus to query NetData. I’d advise everyone at this point to read [this
page](../backends/prometheus/#using-netdata-with-prometheus). The key point here is that NetData can export metrics from
This is the basics of using Prometheus to query Netdata. I’d advise everyone at this point to read [this
page](../backends/prometheus/#using-netdata-with-prometheus). The key point here is that Netdata can export metrics from
its internal DB or can send metrics “as-collected” by specifying the ‘source=as-collected’ url parameter like so.
<http://localhost:19999/api/v1/allmetrics?format=prometheus&help=yes&types=yes&source=as-collected> If you choose to use
this method you will need to use Prometheus's set of functions here: <https://prometheus.io/docs/querying/functions/> to
obtain useful metrics as you are now dealing with raw counters from the system. For example you will have to use the
`irate()` function over a counter to get that metric's rate per second. If your graphing needs are met by using the
metrics returned by NetData's internal database (not specifying any source= url parameter) then use that. If you find
metrics returned by Netdata's internal database (not specifying any source= url parameter) then use that. If you find
limitations then consider re-writing your queries using the raw data and using Prometheus functions to get the desired
chart.

Expand Down
2 changes: 1 addition & 1 deletion backends/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ scrape_configs:

#### Install nodes.yml

The following is completely optional, it will enable Prometheus to generate alerts from some NetData sources. Tweak the
The following is completely optional, it will enable Prometheus to generate alerts from some Netdata sources. Tweak the
values to your own needs. We will use the following `nodes.yml` file below. Save it at `/opt/prometheus/nodes.yml`, and
add a _- "nodes.yml"_ entry under the _rule_files:_ section in the example prometheus.yml file above.

Expand Down
56 changes: 28 additions & 28 deletions build_external/scenarios/aclk-testing/agent_netdata.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@
# context = netdata.statsd_cpu
# priority = 132001
# name = netdata.plugin_statsd_charting_cpu
# title = NetData statsd charting thread CPU usage
# title = Netdata statsd charting thread CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -1145,7 +1145,7 @@
# context = netdata.statsd_cpu
# priority = 132002
# name = netdata.plugin_statsd_collector1_cpu
# title = NetData statsd collector thread No 1 CPU usage
# title = Netdata statsd collector thread No 1 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand Down Expand Up @@ -1955,7 +1955,7 @@
# context = netdata.plugin_cgroups_cpu
# priority = 132000
# name = netdata.plugin_cgroups_cpu
# title = NetData CGroups Plugin CPU usage
# title = Netdata CGroups Plugin CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -1976,7 +1976,7 @@
# context = netdata.plugin_diskspace
# priority = 132020
# name = netdata.plugin_diskspace
# title = NetData Disk Space Plugin CPU usage
# title = Netdata Disk Space Plugin CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -1997,7 +1997,7 @@
# context = netdata.plugin_diskspace_dt
# priority = 132021
# name = netdata.plugin_diskspace_dt
# title = NetData Disk Space Plugin Duration
# title = Netdata Disk Space Plugin Duration
# dim duration name = duration
# dim duration algorithm = absolute
# dim duration multiplier = 1
Expand Down Expand Up @@ -4844,7 +4844,7 @@
# context = netdata.plugin_proc_modules
# priority = 132001
# name = netdata.plugin_proc_modules
# title = NetData Proc Plugin Modules Durations
# title = Netdata Proc Plugin Modules Durations
# dim stat name = stat
# dim stat algorithm = absolute
# dim stat multiplier = 1
Expand Down Expand Up @@ -4949,7 +4949,7 @@
# context = netdata.plugin_proc_cpu
# priority = 132000
# name = netdata.plugin_proc_cpu
# title = NetData Proc Plugin CPU usage
# title = Netdata Proc Plugin CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -4970,7 +4970,7 @@
# context = netdata.server_cpu
# priority = 130000
# name = netdata.server_cpu
# title = NetData CPU usage
# title = Netdata CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -4991,7 +4991,7 @@
# context = netdata.clients
# priority = 130200
# name = netdata.clients
# title = NetData Web Clients
# title = Netdata Web Clients
# dim clients name = clients
# dim clients algorithm = absolute
# dim clients multiplier = 1
Expand All @@ -5008,7 +5008,7 @@
# context = netdata.requests
# priority = 130300
# name = netdata.requests
# title = NetData Web Requests
# title = Netdata Web Requests
# dim requests name = requests
# dim requests algorithm = incremental
# dim requests multiplier = 1
Expand All @@ -5025,7 +5025,7 @@
# context = netdata.net
# priority = 130000
# name = netdata.net
# title = NetData Network Traffic
# title = Netdata Network Traffic
# dim in name = in
# dim in algorithm = incremental
# dim in multiplier = 8
Expand All @@ -5046,7 +5046,7 @@
# context = netdata.response_time
# priority = 130400
# name = netdata.response_time
# title = NetData API Response Time
# title = Netdata API Response Time
# dim average name = average
# dim average algorithm = absolute
# dim average multiplier = 1
Expand All @@ -5067,7 +5067,7 @@
# context = netdata.compression_ratio
# priority = 130500
# name = netdata.compression_ratio
# title = NetData API Responses Compression Savings Ratio
# title = Netdata API Responses Compression Savings Ratio
# dim savings name = savings
# dim savings algorithm = absolute
# dim savings multiplier = 1
Expand All @@ -5084,7 +5084,7 @@
# context = netdata.dbengine_compression_ratio
# priority = 130502
# name = netdata.dbengine_compression_ratio
# title = NetData DB engine data extents' compression savings ratio
# title = Netdata DB engine data extents' compression savings ratio
# dim savings name = savings
# dim savings algorithm = absolute
# dim savings multiplier = 1
Expand All @@ -5101,7 +5101,7 @@
# context = netdata.page_cache_hit_ratio
# priority = 130503
# name = netdata.page_cache_hit_ratio
# title = NetData DB engine page cache hit ratio
# title = Netdata DB engine page cache hit ratio
# dim ratio name = ratio
# dim ratio algorithm = absolute
# dim ratio multiplier = 1
Expand All @@ -5118,7 +5118,7 @@
# context = netdata.page_cache_stats
# priority = 130504
# name = netdata.page_cache_stats
# title = NetData dbengine page cache statistics
# title = Netdata dbengine page cache statistics
# dim descriptors name = descriptors
# dim descriptors algorithm = absolute
# dim descriptors multiplier = 1
Expand Down Expand Up @@ -5155,7 +5155,7 @@
# context = netdata.dbengine_long_term_page_stats
# priority = 130505
# name = netdata.dbengine_long_term_page_stats
# title = NetData dbengine long-term page statistics
# title = Netdata dbengine long-term page statistics
# dim total name = total
# dim total algorithm = absolute
# dim total multiplier = 1
Expand Down Expand Up @@ -5184,7 +5184,7 @@
# context = netdata.dbengine_io_throughput
# priority = 130506
# name = netdata.dbengine_io_throughput
# title = NetData DB engine I/O throughput
# title = Netdata DB engine I/O throughput
# dim reads name = reads
# dim reads algorithm = incremental
# dim reads multiplier = 1
Expand All @@ -5205,7 +5205,7 @@
# context = netdata.dbengine_io_operations
# priority = 130507
# name = netdata.dbengine_io_operations
# title = NetData DB engine I/O operations
# title = Netdata DB engine I/O operations
# dim reads name = reads
# dim reads algorithm = incremental
# dim reads multiplier = 1
Expand All @@ -5226,7 +5226,7 @@
# context = netdata.dbengine_global_errors
# priority = 130508
# name = netdata.dbengine_global_errors
# title = NetData DB engine errors
# title = Netdata DB engine errors
# dim io_errors name = io_errors
# dim io_errors algorithm = incremental
# dim io_errors multiplier = 1
Expand All @@ -5251,7 +5251,7 @@
# context = netdata.dbengine_global_file_descriptors
# priority = 130509
# name = netdata.dbengine_global_file_descriptors
# title = NetData DB engine File Descriptors
# title = Netdata DB engine File Descriptors
# dim current name = current
# dim current algorithm = absolute
# dim current multiplier = 1
Expand All @@ -5272,7 +5272,7 @@
# context = netdata.dbengine_ram
# priority = 130510
# name = netdata.dbengine_ram
# title = NetData DB engine RAM usage
# title = Netdata DB engine RAM usage
# dim cache name = cache
# dim cache algorithm = absolute
# dim cache multiplier = 1
Expand All @@ -5297,7 +5297,7 @@
# context = netdata.web_cpu
# priority = 132003
# name = netdata.web_thread4_cpu
# title = NetData web server thread No 4 CPU usage
# title = Netdata web server thread No 4 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -5318,7 +5318,7 @@
# context = netdata.web_cpu
# priority = 132000
# name = netdata.web_thread1_cpu
# title = NetData web server thread No 1 CPU usage
# title = Netdata web server thread No 1 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -5339,7 +5339,7 @@
# context = netdata.web_cpu
# priority = 132005
# name = netdata.web_thread6_cpu
# title = NetData web server thread No 6 CPU usage
# title = Netdata web server thread No 6 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -5360,7 +5360,7 @@
# context = netdata.web_cpu
# priority = 132002
# name = netdata.web_thread3_cpu
# title = NetData web server thread No 3 CPU usage
# title = Netdata web server thread No 3 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand All @@ -5381,7 +5381,7 @@
# context = netdata.web_cpu
# priority = 132001
# name = netdata.web_thread2_cpu
# title = NetData web server thread No 2 CPU usage
# title = Netdata web server thread No 2 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand Down Expand Up @@ -5520,7 +5520,7 @@
# context = netdata.web_cpu
# priority = 132004
# name = netdata.web_thread5_cpu
# title = NetData web server thread No 5 CPU usage
# title = Netdata web server thread No 5 CPU usage
# dim user name = user
# dim user algorithm = incremental
# dim user multiplier = 1
Expand Down
2 changes: 1 addition & 1 deletion collectors/statsd.plugin/statsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,7 @@ void *statsd_main(void *ptr) {
char title[100 + 1];

snprintfz(id, 100, "plugin_statsd_collector%d_cpu", i + 1);
snprintfz(title, 100, "NetData statsd collector thread No %d CPU usage", i + 1);
snprintfz(title, 100, "Netdata statsd collector thread No %d CPU usage", i + 1);

statsd.collection_threads_status[i].st_cpu = rrdset_create_localhost(
"netdata"
Expand Down
12 changes: 6 additions & 6 deletions exporting/WALKTHROUGH.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ Prometheus's homepage and begin to type `netdata\_` Prometheus should auto compl

![](https://github.com/ldelossa/NetdataTutorial/raw/master/Screen%20Shot%202017-07-28%20at%205.13.43%20PM.png)

Let's now start exploring how we can graph some metrics. Back in our NetData container lets get the CPU spinning with a
Let's now start exploring how we can graph some metrics. Back in our Netdata container lets get the CPU spinning with a
pointless busy loop. On the shell do the following:

```sh
[root@netdata /]# while true; do echo "HOT HOT HOT CPU"; done
```

Our NetData cpu graph should be showing some activity. Let's represent this in Prometheus. In order to do this let's
Our Netdata cpu graph should be showing some activity. Let's represent this in Prometheus. In order to do this let's
keep our metrics page open for reference: <http://localhost:19999/api/v1/allmetrics?format=prometheus&help=yes>. We are
setting out to graph the data in the CPU chart so let's search for `system.cpu` in the metrics page above. We come
across a section of metrics with the first comments `# COMMENT homogeneous chart "system.cpu", context "system.cpu",
Expand All @@ -211,18 +211,18 @@ query the dimension also. Place this into our query text box.

![](https://github.com/ldelossa/NetdataTutorial/raw/master/Screen%20Shot%202017-07-28%20at%205.54.40%20PM.png)

Awesome, this is exactly what we wanted. If you haven't caught on yet we can emulate entire charts from NetData by using
Awesome, this is exactly what we wanted. If you haven't caught on yet we can emulate entire charts from Netdata by using
the `chart` dimension. If you'd like you can combine the `chart` and `instance` dimension to create per-instance charts.
Let's give this a try: `netdata_system_cpu_percentage_average{chart="system.cpu", instance="netdata:19999"}`

This is the basics of using Prometheus to query NetData. I'd advise everyone at this point to read [this
page](/exporting/prometheus/#using-netdata-with-prometheus). The key point here is that NetData can export metrics from
This is the basics of using Prometheus to query Netdata. I'd advise everyone at this point to read [this
page](/exporting/prometheus/#using-netdata-with-prometheus). The key point here is that Netdata can export metrics from
its internal DB or can send metrics _as-collected_ by specifying the `source=as-collected` URL parameter like so.
<http://localhost:19999/api/v1/allmetrics?format=prometheus&help=yes&types=yes&source=as-collected> If you choose to use
this method you will need to use Prometheus's set of functions here: <https://prometheus.io/docs/querying/functions/> to
obtain useful metrics as you are now dealing with raw counters from the system. For example you will have to use the
`irate()` function over a counter to get that metric's rate per second. If your graphing needs are met by using the
metrics returned by NetData's internal database (not specifying any source= URL parameter) then use that. If you find
metrics returned by Netdata's internal database (not specifying any source= URL parameter) then use that. If you find
limitations then consider re-writing your queries using the raw data and using Prometheus functions to get the desired
chart.

Expand Down
2 changes: 1 addition & 1 deletion exporting/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ scrape_configs:

#### Install nodes.yml

The following is completely optional, it will enable Prometheus to generate alerts from some NetData sources. Tweak the
The following is completely optional, it will enable Prometheus to generate alerts from some Netdata sources. Tweak the
values to your own needs. We will use the following `nodes.yml` file below. Save it at `/opt/prometheus/nodes.yml`, and
add a _- "nodes.yml"_ entry under the _rule_files:_ section in the example prometheus.yml file above.

Expand Down
Loading