Add ioping plugin (#5725)
* Add ioping plugin * Update the documentation and comments * Finalize installation of ioping * Fix find_processors variable * Fix static build * Move ioping to libexec directory * Move ioping to plugins.d directory * Fix file existence check
Vladimir Kobal committed
Apr 23, 2019 at 14:20 UTC
f0bc01ddbdfcb948bb06cf05662b0901f297e59a
20 files changed
+461
-46
.gitignore
+1
@@ -112,6 +112,7 @@ collectors/charts.d.plugin/charts.d.plugin
112
collectors/node.d.plugin/node.d.plugin
113
collectors/python.d.plugin/python.d.plugin
114
collectors/fping.plugin/fping.plugin
115
+collectors/ioping.plugin/ioping.plugin
116
collectors/go.d.plugin
117
118
# installer generated files
README.md
+45
-44
@@ -1,5 +1,5 @@
1
# netdata [](https://travis-ci.com/netdata/netdata) [](https://bestpractices.coreinfrastructure.org/projects/2231) [](https://www.gnu.org/licenses/gpl-3.0) []()
2
-
2
+
3
[](https://codeclimate.com/github/netdata/netdata) [](https://www.codacy.com/app/netdata/netdata?utm_source=github.com&utm_medium=referral&utm_content=netdata/netdata&utm_campaign=Badge_Grade) [](https://lgtm.com/projects/g/netdata/netdata/context:cpp) [](https://lgtm.com/projects/g/netdata/netdata/context:javascript) [](https://lgtm.com/projects/g/netdata/netdata/context:python)
4
5
---
@@ -10,12 +10,12 @@ Netdata provides **unparalleled insights**, **in real-time**, of everything happ
10
11
_Netdata is **fast** and **efficient**, designed to permanently run on all systems (**physical** & **virtual** servers, **containers**, **IoT** devices), without disrupting their core function._
12
13
-Netdata is **free, open-source software** and it currently runs on **Linux**, **FreeBSD**, and **MacOS**.
13
+Netdata is **free, open-source software** and it currently runs on **Linux**, **FreeBSD**, and **MacOS**.
14
15
-
15
+
16
17
Netdata is in the [Cloud Native Computing Foundation (CNCF) landscape](https://landscape.cncf.io/format=card-mode&grouping=no&sort=stars) and it is the 3rd most starred open-source project.
18
-Check the [CNCF TOC Netdata presentation](https://docs.google.com/presentation/d/18C8bCTbtgKDWqPa57GXIjB2PbjjpjsUNkLtZEz6YK8s/edit?usp=sharing).
18
+Check the [CNCF TOC Netdata presentation](https://docs.google.com/presentation/d/18C8bCTbtgKDWqPa57GXIjB2PbjjpjsUNkLtZEz6YK8s/edit?usp=sharing).
19
20
---
21
@@ -53,13 +53,13 @@ The following animated image, shows the top part of a typical netdata dashboard.
53
54
*A typical netdata dashboard, in 1:1 timing. Charts can be panned by dragging them, zoomed in/out with `SHIFT` + `mouse wheel`, an area can be selected for zoom-in with `SHIFT` + `mouse selection`. Netdata is highly interactive and **real-time**, optimized to get the work done!*
55
56
-> *We have a few online demos to experience it live: [https://my-netdata.io](https://my-netdata.io)*
56
+> *We have a few online demos to experience it live: [https://my-netdata.io](https://my-netdata.io)*
57
58
## User base
59
60
Netdata is used by hundreds of thousands of users all over the world.
61
Check our [GitHub watchers list](https://github.com/netdata/netdata/watchers).
62
-You will find people working for **Amazon**, **Atos**, **Baidu**, **Cisco Systems**, **Citrix**, **Deutsche Telekom**, **DigitalOcean**,
62
+You will find people working for **Amazon**, **Atos**, **Baidu**, **Cisco Systems**, **Citrix**, **Deutsche Telekom**, **DigitalOcean**,
63
**Elastic**, **EPAM Systems**, **Ericsson**, **Google**, **Groupon**, **Hortonworks**, **HP**, **Huawei**,
64
**IBM**, **Microsoft**, **NewRelic**, **Nvidia**, **Red Hat**, **SAP**, **Selectel**, **TicketMaster**,
65
**Vimeo**, and many more!
@@ -72,9 +72,9 @@ We provide docker images for the most common architectures. These are statistics
72
### Registry
73
When you install multiple netdata, they are integrated into **one distributed application**, via a [netdata registry](registry/#registry). This is a web browser feature and it allows us to count the number of unique users and unique netdata servers installed. The following information comes from the global public netdata registry we run:
74
75
-[](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry)
76
-
77
-*in the last 24 hours:*<br/> [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry)
75
+[](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry)
76
+
77
+*in the last 24 hours:*<br/> [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry) [](https://registry.my-netdata.io/#menu_netdata_submenu_registry)
78
79
## Quick Start
80
@@ -145,9 +145,9 @@ Netdata is **open-source**, **free**, super **fast**, very **easy**, completely
145
It has been designed by **SysAdmins**, **DevOps** and **Developers** for troubleshooting performance problems,
146
not just visualize metrics.
147
148
-## News
148
+## News
149
150
-`Mar 14th, 2019` - **[netdata v1.13.0 released!](https://github.com/netdata/netdata/releases)**
150
+`Mar 14th, 2019` - **[netdata v1.13.0 released!](https://github.com/netdata/netdata/releases)**
151
152
Release 1.13.0 contains 14 bug fixes and 8 improvements.
153
@@ -157,20 +157,20 @@ A [major refactoring of the python.d plugin](https://github.com/netdata/netdata/
157
158
We also added charts for IPC shared memory segments and total memory used.
159
160
-`Feb 28th, 2019` - **[netdata v1.12.2 released!](https://github.com/netdata/netdata/releases)**
160
+`Feb 28th, 2019` - **[netdata v1.12.2 released!](https://github.com/netdata/netdata/releases)**
161
162
Patch release 1.12.2 contains 7 bug fixes and 4 improvements.
163
164
The main motivation behind a new patch release is the introduction of a **stable release channel**.
165
-A "stable" installation and update channel was always on our roadmap, but it became a necessity when we realized that our users in China could not use the nightly releases published on Google Cloud. The "stable" channel is based on our official GitHub releases and uses assets hosted on GitHub.
165
+A "stable" installation and update channel was always on our roadmap, but it became a necessity when we realized that our users in China could not use the nightly releases published on Google Cloud. The "stable" channel is based on our official GitHub releases and uses assets hosted on GitHub.
166
167
-We are also introducing a new **Oracle DB collector** module, implemented in Python.
167
+We are also introducing a new **Oracle DB collector** module, implemented in Python.
168
169
-`Feb 21st, 2019` - **[netdata v1.12.1 released!](https://github.com/netdata/netdata/releases)**
169
+`Feb 21st, 2019` - **[netdata v1.12.1 released!](https://github.com/netdata/netdata/releases)**
170
171
Patch release 1.12.1 contains 22 bug fixes and 8 improvements.
172
173
-`Feb 14th, 2019` - **[netdata v1.12.0 released!](https://github.com/netdata/netdata/releases)**
173
+`Feb 14th, 2019` - **[netdata v1.12.0 released!](https://github.com/netdata/netdata/releases)**
174
175
Release 1.12 is made out of 211 pull requests and 22 bug fixes.
176
The key improvements are:
@@ -182,22 +182,22 @@ The key improvements are:
182
- Bind different functions of the netdata APIs to different ports
183
- Improved installation and updates
184
185
-`Nov 22nd, 2018` - **[netdata v1.11.1 released!](https://github.com/netdata/netdata/releases)**
185
+`Nov 22nd, 2018` - **[netdata v1.11.1 released!](https://github.com/netdata/netdata/releases)**
186
187
- Improved internal database to support values above 64bit.
188
- New data collection plugins: [`openldap`](collectors/python.d.plugin/openldap/), [`tor`](collectors/python.d.plugin/tor/), [`nvidia_smi`](collectors/python.d.plugin/nvidia_smi/).
189
- Improved data collection plugins: netdata now supports monitoring network interface aliases, [`smartd_log`](collectors/python.d.plugin/smartd_log/), [`cpufreq`](collectors/proc.plugin/README.md#cpu-frequency), [`sensors`](collectors/python.d.plugin/sensors/).
190
- Health monitoring improvements: network interface congestion alarm restored, [`alerta.io`](health/notifications/alerta/), `conntrack_max`.
191
-- `my-netdata`menu has been refactored.
191
+- `my-netdata`menu has been refactored.
192
- Packaging: `openrc` service definition got a few improvements.
193
194
----
195
-
196
-`Sep 18, 2018` - **netdata has its own organization**
197
-
198
-Netdata used to be a [firehol.org](https://firehol.org) project, accessible as `firehol/netdata`.
199
-
200
-Netdata now has its own github organization `netdata`, so all github URLs are now `netdata/netdata`. The old github URLs, repo clones, forks, etc redirect automatically to the new repo.
194
+---
195
+
196
+`Sep 18, 2018` - **netdata has its own organization**
197
+
198
+Netdata used to be a [firehol.org](https://firehol.org) project, accessible as `firehol/netdata`.
199
+
200
+Netdata now has its own github organization `netdata`, so all github URLs are now `netdata/netdata`. The old github URLs, repo clones, forks, etc redirect automatically to the new repo.
201
202
## How it works
203
@@ -218,12 +218,12 @@ Function|Description|Documentation
218
219
The result is a highly efficient, low latency system, supporting multiple readers and one writer on each metric.
220
221
-## Infographic
222
-
223
-This is a high level overview of netdata feature set and architecture.
224
-Click it to to interact with it (it has direct links to documentation).
225
-
226
-[](https://my-netdata.io/infographic.html)
221
+## Infographic
222
+
223
+This is a high level overview of netdata feature set and architecture.
224
+Click it to to interact with it (it has direct links to documentation).
225
+
226
+[](https://my-netdata.io/infographic.html)
227
228
229
## Features
@@ -240,7 +240,7 @@ This is what you should expect from Netdata:
240
- **Zero disk I/O** - while it runs, it does not load or save anything (except `error` and `access` logs).
241
- **Zero configuration** - auto-detects everything, it can collect up to 10000 metrics per server out of the box.
242
- **Zero maintenance** - You just run it, it does the rest.
243
-- **Zero dependencies** - it is even its own web server, for its static web files and its web API (though its plugins may require additional libraries, depending on the applications monitored).
243
+- **Zero dependencies** - it is even its own web server, for its static web files and its web API (though its plugins may require additional libraries, depending on the applications monitored).
244
- **Scales to infinity** - you can install it on all your servers, containers, VMs and IoTs. Metrics are not centralized by default, so there is no limit.
245
- **Several operating modes** - Autonomous host monitoring (the default), headless data collector, forwarding proxy, store and forward proxy, central multi-host monitoring, in all possible configurations. Each node may have different metrics retention policy and run with or without health monitoring.
246
@@ -297,7 +297,7 @@ To improve visual anomaly detection across charts, the user can highlight a time
297
> Highlighted ranges are propagated from netdata server to netdata server, when navigating via the [`my-netdata` menu](registry#registry).
298
299
300
-## What does it monitor
300
+## What does it monitor
301
302
Netdata data collection is **extensible** - you can monitor anything you can get a metric for.
303
Its [Plugin API](collectors/plugins.d/) supports all programing languages (anything can be a netdata plugin, BASH, python, perl, node.js, java, Go, ruby, etc).
@@ -336,7 +336,7 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
336
- **[slab](collectors/proc.plugin/)** - collects info about the Linux kernel memory usage.
337
338
#### Disks
339
-- **[block devices](collectors/proc.plugin/)** - per disk: I/O, operations, backlog, utilization, space, etc.
339
+- **[block devices](collectors/proc.plugin/)** - per disk: I/O, operations, backlog, utilization, space, etc.
340
- **[BCACHE](collectors/proc.plugin/)** - detailed performance of SSD caching devices.
341
- **[DiskSpace](collectors/proc.plugin/)** - monitors disk space usage.
342
- **[mdstat](collectors/proc.plugin/)** - software RAID.
@@ -346,11 +346,12 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
346
- **[Veritas Volume Manager](collectors/proc.plugin/)** - naming disks.
347
- **[megacli](collectors/python.d.plugin/megacli/)** - adapter, physical drives and battery stats.
348
- **[adaptec_raid](collectors/python.d.plugin/adaptec_raid/)** - logical and physical devices health metrics.
349
+- **[ioping](collectors/ioping.plugin/)** - to measure disk read/write latency.
350
351
#### Filesystems
352
- **[BTRFS](collectors/proc.plugin/)** - detailed disk space allocation and usage.
353
- **[Ceph](collectors/python.d.plugin/ceph/)** - OSD usage, Pool usage, number of objects, etc.
353
-- **[NFS file servers and clients](collectors/proc.plugin/)** - NFS v2, v3, v4: I/O, cache, read ahead, RPC calls
354
+- **[NFS file servers and clients](collectors/proc.plugin/)** - NFS v2, v3, v4: I/O, cache, read ahead, RPC calls
355
- **[Samba](collectors/python.d.plugin/samba/)** - performance metrics of Samba SMB2 file sharing.
356
- **[ZFS](collectors/proc.plugin/)** - detailed performance and resource usage.
357
@@ -359,7 +360,7 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
360
- **[Netfilter](collectors/proc.plugin/)** - everything about the netfilter connection tracker.
361
- **[SynProxy](collectors/proc.plugin/)** - collects performance data about the linux SYNPROXY (DDoS).
362
- **[NFacct](collectors/nfacct.plugin/)** - collects accounting data from iptables.
362
-- **[Network QoS](collectors/tc.plugin/)** - the only tool that visualizes network `tc` classes in real-time
363
+- **[Network QoS](collectors/tc.plugin/)** - the only tool that visualizes network `tc` classes in real-time
364
- **[FPing](collectors/fping.plugin/)** - to measure latency and packet loss between any number of hosts.
365
- **[ISC dhcpd](collectors/python.d.plugin/isc_dhcpd/)** - pools utilization, leases, etc.
366
- **[AP](collectors/charts.d.plugin/ap/)** - collects Linux access point performance data (`hostapd`).
@@ -373,7 +374,7 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
374
375
#### Processes
376
- **[System Processes](collectors/proc.plugin/)** - running, blocked, forks, active.
376
-- **[Applications](collectors/apps.plugin/)** - by grouping the process tree and reporting CPU, memory, disk reads, disk writes, swap, threads, pipes, sockets - per process group.
377
+- **[Applications](collectors/apps.plugin/)** - by grouping the process tree and reporting CPU, memory, disk reads, disk writes, swap, threads, pipes, sockets - per process group.
378
- **[systemd](collectors/cgroups.plugin/)** - monitors systemd services using CGROUPS.
379
380
#### Users
@@ -430,7 +431,7 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
431
- **[dns_query_time](collectors/python.d.plugin/dns_query_time/)** - DNS query time statistics.
432
433
#### Time Servers
433
-- **[chrony](collectors/python.d.plugin/chrony/)** - uses the `chronyc` command to collect chrony statistics (Frequency, Last offset, RMS offset, Residual freq, Root delay, Root dispersion, Skew, System time).
434
+- **[chrony](collectors/python.d.plugin/chrony/)** - uses the `chronyc` command to collect chrony statistics (Frequency, Last offset, RMS offset, Residual freq, Root delay, Root dispersion, Skew, System time).
435
- **[ntpd](collectors/python.d.plugin/ntpd/)** - connects to multiple ntpd servers (local or remote) to provide statistics of system variables and optional also peer variables.
436
437
#### Mail Servers
@@ -482,10 +483,10 @@ Its [Plugin API](collectors/plugins.d/) supports all programing languages (anyth
483
#### Provisioning Systems
484
- **[Puppet](collectors/python.d.plugin/puppet/)** - connects to multiple Puppet Server and Puppet DB instances (local or remote) to collect real-time status metrics.
485
485
-You can easily extend Netdata, by writing plugins that collect data from any source, using any computer language.
486
-
487
----
488
-
486
+You can easily extend Netdata, by writing plugins that collect data from any source, using any computer language.
487
+
488
+---
489
+
490
## Documentation
491
492
The netdata documentation is at [https://docs.netdata.cloud](https://docs.netdata.cloud). But you can also find it inside the repo, so by just navigating the repo on github you can find all the documentation.
@@ -523,8 +524,8 @@ You can also find netdata on:
524
- [StackShare](https://stackshare.io/netdata)
525
526
## License
526
-
527
-netdata is [GPLv3+](LICENSE).
527
+
528
+netdata is [GPLv3+](LICENSE).
529
530
Netdata re-distributes other open-source tools and libraries. Please check the [third party licenses](REDISTRIBUTED.md).
531
build/subst.inc
+1
@@ -2,6 +2,7 @@
2
if sed \
3
-e 's#[@]localstatedir_POST@#$(localstatedir)#g' \
4
-e 's#[@]sbindir_POST@#$(sbindir)#g' \
5
+ -e 's#[@]pluginsdir_POST@#$(pluginsdir)#g' \
6
-e 's#[@]configdir_POST@#$(configdir)#g' \
7
-e 's#[@]libconfigdir_POST@#$(libconfigdir)#g' \
8
-e 's#[@]cachedir_POST@#$(cachedir)#g' \
collectors/Makefile.am
+1
@@ -11,6 +11,7 @@ SUBDIRS = \
11
cups.plugin \
12
diskspace.plugin \
13
fping.plugin \
14
+ ioping.plugin \
15
freebsd.plugin \
16
freeipmi.plugin \
17
idlejitter.plugin \
collectors/README.md
+1
@@ -30,6 +30,7 @@ plugin|lang|O/S|runs as|modular|description
30
[cups.plugin](cups.plugin/)|`C`|any|external|-|monitors **CUPS**
31
[diskspace.plugin](diskspace.plugin/)|`C`|linux|internal|-|collects disk space usage metrics on Linux mount points
32
[fping.plugin](fping.plugin/)|`C`|any|external|-|measures network latency, jitter and packet loss between the monitored node and any number of remote network end points.
33
+[ioping.plugin](ioping.plugin/)|`C`|any|external|-|measures disk read/write latency.
34
[freebsd.plugin](freebsd.plugin/)|`C`|freebsd|internal|yes|collects resource usage and performance data on FreeBSD systems
35
[freeipmi.plugin](freeipmi.plugin/)|`C`|linux, freebsd|external|-|collects metrics from enterprise hardware sensors, on Linux and FreeBSD servers.
36
[idlejitter.plugin](idlejitter.plugin/)|`C`|any|internal|-|measures CPU latency and jitter on all operating systems
collectors/apps.plugin/apps_groups.conf
+1
@@ -82,6 +82,7 @@ node.d.plugin: *node.d.plugin*
82
python.d.plugin: *python.d.plugin*
83
tc-qos-helper: *tc-qos-helper.sh*
84
fping: fping
85
+ioping: ioping
86
go.d.plugin: *go.d.plugin*
87
88
# -----------------------------------------------------------------------------
collectors/ioping.plugin/Makefile.am
new
+24
@@ -0,0 +1,24 @@
1
+# SPDX-License-Identifier: GPL-3.0-or-later
2
+
3
+AUTOMAKE_OPTIONS = subdir-objects
4
+MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
5
+
6
+CLEANFILES = \
7
+ ioping.plugin \
8
+ $(NULL)
9
+
10
+include $(top_srcdir)/build/subst.inc
11
+SUFFIXES = .in
12
+
13
+dist_plugins_SCRIPTS = \
14
+ ioping.plugin \
15
+ $(NULL)
16
+
17
+dist_noinst_DATA = \
18
+ ioping.plugin.in \
19
+ README.md \
20
+ $(NULL)
21
+
22
+dist_libconfig_DATA = \
23
+ ioping.conf \
24
+ $(NULL)
collectors/ioping.plugin/README.md
new
+82
@@ -0,0 +1,82 @@
1
+# ioping.plugin
2
+
3
+The ioping plugin supports monitoring latency for any number of directories/files/devices,
4
+by pinging them with `ioping`.
5
+
6
+A recent version of `ioping` is required (one that supports option ` -N `).
7
+The supplied plugin can install it, by running:
8
+
9
+```sh
10
+/usr/libexec/netdata/plugins.d/ioping.plugin install
11
+```
12
+
13
+The `-e` option can be supplied to indicate where the netdata environment file is installed. The default path is `/etc/netdata/.environment`.
14
+
15
+The above will download, build and install the right version as `/usr/libexec/netdata/plugins.d/ioping`.
16
+
17
+Then you need to edit `/etc/netdata/ioping.conf` (to edit it on your system run
18
+`/etc/netdata/edit-config ioping.conf`) like this:
19
+
20
+```sh
21
+# uncomment the following line - it should already be there
22
+ioping="/usr/libexec/netdata/plugins.d/ioping"
23
+
24
+# set here the directory/file/device, you need to ping
25
+destination="destination"
26
+
27
+# override the chart update frequency - the default is inherited from netdata
28
+update_every="1s"
29
+
30
+# the request size in bytes to ping the destination
31
+request_size="4k"
32
+
33
+# other iping options - these are the defaults
34
+ioping_opts="-T 1000000 -R"
35
+```
36
+
37
+## alarms
38
+
39
+netdata will automatically attach a few alarms for each host.
40
+Check the [latest versions of the ioping alarms](../../health/health.d/ioping.conf)
41
+
42
+## Multiple ioping Plugins With Different Settings
43
+
44
+You may need to run multiple ioping plugins with different settings or different end points.
45
+For example, you may need to ping one destination once per 10 seconds, and another once per second.
46
+
47
+netdata allows you to add as many `ioping` plugins as you like.
48
+
49
+Follow this procedure:
50
+
51
+**1. Create New ioping Configuration File**
52
+
53
+
54
+```sh
55
+# Step Into Configuration Directory
56
+cd /etc/netdata
57
+
58
+# Copy Original ioping Configuration File To New Configuration File
59
+cp ioping.conf ioping2.conf
60
+```
61
+
62
+Edit `ioping2.conf` and set the settings and the destination you need for the seconds instance.
63
+
64
+**2. Soft Link Original ioping Plugin to New Plugin File**
65
+
66
+```sh
67
+# Become root (If The Step Step Is Performed As Non-Root User)
68
+sudo su
69
+
70
+# Step Into The Plugins Directory
71
+cd /usr/libexec/netdata/plugins.d
72
+
73
+# Link ioping.plugin to ioping2.plugin
74
+ln -s ioping.plugin ioping2.plugin
75
+```
76
+
77
+That's it. netdata will detect the new plugin and start it.
78
+
79
+You can name the new plugin any name you like.
80
+Just make sure the plugin and the configuration file have the same name.
81
+
82
+[]()
collectors/ioping.plugin/ioping.conf
new
+40
@@ -0,0 +1,40 @@
1
+# no need for shebang - this file is sourced from ioping.plugin
2
+
3
+# ioping.plugin requires a recent version of ioping.
4
+#
5
+# You can get it on your system, by running:
6
+#
7
+# /usr/libexec/netdata/plugins.d/ioping.plugin install
8
+
9
+# -----------------------------------------------------------------------------
10
+# configuration options
11
+
12
+# The ioping binary to use. We need one that can output netdata friendly info
13
+# (supporting: -N). If you have multiple versions, put here the full filename
14
+# of the right one
15
+
16
+#ioping="/usr/libexec/netdata/plugins.d/ioping"
17
+
18
+
19
+# The directory/file/device to ioping
20
+
21
+destination=""
22
+
23
+
24
+# The update frequency of the chart in seconds (symbolic modifiers are supported)
25
+# the default is inherited from netdata
26
+
27
+#update_every="1s"
28
+
29
+
30
+# The request size in bytes to ioping the destination (symbolic modifiers are supported)
31
+# by default 4k chunks are used
32
+
33
+#request_size="4k"
34
+
35
+
36
+# Other ioping options
37
+# the defaults:
38
+# -T 1000000 = maximum valid request time (us)
39
+
40
+#ioping_opts="-T 1000000"
collectors/ioping.plugin/ioping.plugin.in
new
+212
@@ -0,0 +1,212 @@
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+
8
+#
9
+# This plugin requires a latest version of ioping.
10
+# You can compile it from source, by running me with option: install
11
+
12
+export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
13
+export LC_ALL=C
14
+
15
+usage="$(basename "$0") [install] [-h] [-e]
16
+
17
+where:
18
+ install install ioping binary
19
+ -e, --env path to environment file (defauls to '/etc/netdata/.environment'
20
+ -h show this help text"
21
+
22
+INSTALL=0
23
+ENVIRONMENT_FILE="/etc/netdata/.environment"
24
+
25
+while :; do
26
+ case "$1" in
27
+ -h | --help)
28
+ echo "$usage" >&2
29
+ exit 1
30
+ ;;
31
+ install)
32
+ INSTALL=1
33
+ shift
34
+ ;;
35
+ -e | --env)
36
+ ENVIRONMENT_FILE="$2"
37
+ shift 2
38
+ ;;
39
+ -*)
40
+ echo "$usage" >&2
41
+ exit 1
42
+ ;;
43
+ *) break ;;
44
+ esac
45
+done
46
+
47
+if [ "$INSTALL" == "1" ]
48
+ then
49
+ [ "${UID}" != 0 ] && echo >&2 "Please run me as root. This will install a single binary file: /usr/libexec/netdata/plugins.d/ioping." && exit 1
50
+
51
+ source "${ENVIRONMENT_FILE}" || exit 1
52
+
53
+ run() {
54
+ printf >&2 " > "
55
+ printf >&2 "%q " "${@}"
56
+ printf >&2 "\n"
57
+ "${@}" || exit 1
58
+ }
59
+
60
+ download() {
61
+ local git="$(which git 2>/dev/null || command -v git 2>/dev/null)"
62
+ [ ! -z "${git}" ] && run git clone "${1}" "${2}" && return 0
63
+
64
+ echo >&2 "Cannot find 'git' in this system." && exit 1
65
+ }
66
+
67
+ tmp=$(mktemp -d /tmp/netdata-ioping-XXXXXX)
68
+ [ ! -d "${NETDATA_PREFIX}/usr/libexec/netdata" ] && run mkdir -p "${NETDATA_PREFIX}/usr/libexec/netdata"
69
+
70
+ run cd "${tmp}"
71
+
72
+ if [ -d ioping-netdata ]
73
+ then
74
+ run rm -rf ioping-netdata || exit 1
75
+ fi
76
+
77
+ download 'https://github.com/netdata/ioping.git' 'ioping-netdata'
78
+ [ $? -ne 0 ] && exit 1
79
+ run cd ioping-netdata || exit 1
80
+
81
+ INSTALL_PATH="${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping"
82
+
83
+ run make clean
84
+ run make
85
+ run mv ioping "${INSTALL_PATH}"
86
+ run chown root:"${NETDATA_GROUP}" "${INSTALL_PATH}"
87
+ run chmod 4750 "${INSTALL_PATH}"
88
+ echo >&2
89
+ echo >&2 "All done, you have a compatible ioping now at ${INSTALL_PATH}."
90
+ echo >&2
91
+
92
+ exit 0
93
+fi
94
+
95
+# -----------------------------------------------------------------------------
96
+
97
+PROGRAM_NAME="$(basename "${0}")"
98
+
99
+logdate() {
100
+ date "+%Y-%m-%d %H:%M:%S"
101
+}
102
+
103
+log() {
104
+ local status="${1}"
105
+ shift
106
+
107
+ echo >&2 "$(logdate): ${PROGRAM_NAME}: ${status}: ${*}"
108
+
109
+}
110
+
111
+warning() {
112
+ log WARNING "${@}"
113
+}
114
+
115
+error() {
116
+ log ERROR "${@}"
117
+}
118
+
119
+info() {
120
+ log INFO "${@}"
121
+}
122
+
123
+fatal() {
124
+ log FATAL "${@}"
125
+ echo "DISABLE"
126
+ exit 1
127
+}
128
+
129
+debug=0
130
+debug() {
131
+ [ $debug -eq 1 ] && log DEBUG "${@}"
132
+}
133
+
134
+# -----------------------------------------------------------------------------
135
+
136
+# store in ${plugin} the name we run under
137
+# this allows us to copy/link ioping.plugin under a different name
138
+# to have multiple ioping plugins running with different settings
139
+plugin="${PROGRAM_NAME/.plugin/}"
140
+
141
+
142
+# -----------------------------------------------------------------------------
143
+
144
+# the frequency to send info to netdata
145
+# passed by netdata as the first parameter
146
+update_every="${1-1}"
147
+
148
+# the netdata configuration directory
149
+# passed by netdata as an environment variable
150
+[ -z "${NETDATA_USER_CONFIG_DIR}" ] && NETDATA_USER_CONFIG_DIR="@configdir_POST@"
151
+[ -z "${NETDATA_STOCK_CONFIG_DIR}" ] && NETDATA_STOCK_CONFIG_DIR="@libconfigdir_POST@"
152
+
153
+# the netdata directory for internal binaries
154
+[ -z "${NETDATA_PLUGINS_DIR}" ] && NETDATA_PLUGINS_DIR="@pluginsdir_POST@"
155
+
156
+# -----------------------------------------------------------------------------
157
+# configuration options
158
+# can be overwritten at /etc/netdata/ioping.conf
159
+
160
+# the ioping binary to use
161
+# we need one that can output netdata friendly info (supporting: -N)
162
+# if you have multiple versions, put here the full filename of the right one
163
+ioping="${NETDATA_PLUGINS_DIR}/ioping"
164
+
165
+# the destination to ioping
166
+destination=""
167
+
168
+# the request size in bytes to ping the disk
169
+request_size="4k"
170
+
171
+# ioping options
172
+ioping_opts="-T 1000000"
173
+
174
+# -----------------------------------------------------------------------------
175
+# load the configuration files
176
+
177
+for CONFIG in "${NETDATA_STOCK_CONFIG_DIR}/${plugin}.conf" "${NETDATA_USER_CONFIG_DIR}/${plugin}.conf"
178
+do
179
+ if [ -f "${CONFIG}" ]
180
+ then
181
+ info "Loading config file '${CONFIG}'..."
182
+ source "${CONFIG}"
183
+ [ $? -ne 0 ] && error "Failed to load config file '${CONFIG}'."
184
+ else
185
+ warning "Cannot find file '${CONFIG}'."
186
+ fi
187
+done
188
+
189
+if [ -z "${destination}" ]
190
+then
191
+ fatal "destination is not configured - nothing to do."
192
+fi
193
+
194
+if [ ! -f "${ioping}" ]
195
+then
196
+ fatal "ioping command is not found. Please set its full path in '${NETDATA_USER_CONFIG_DIR}/${plugin}.conf'"
197
+fi
198
+
199
+if [ ! -x "${ioping}" ]
200
+then
201
+ fatal "ioping command '${ioping}' is not executable - cannot proceed."
202
+fi
203
+
204
+# the ioping options we will use
205
+options=( -N -i ${update_every} -s ${request_size} ${ioping_opts} ${destination} )
206
+
207
+# execute ioping
208
+info "starting ioping: ${ioping} ${options[*]}"
209
+exec "${ioping}" "${options[@]}"
210
+
211
+# if we cannot execute ioping, stop
212
+fatal "command '${ioping} ${options[*]}' failed to be executed (returned code $?)."
collectors/plugins.d/README.md
+2
@@ -11,6 +11,7 @@ plugin|language|O/S|description
11
[charts.d.plugin](../charts.d.plugin/)|`BASH`|all|a **plugin orchestrator** for data collection modules written in `BASH` v4+.
12
[cups.plugin](../cups.plugin/)|`C`|all|monitors **CUPS**
13
[fping.plugin](../fping.plugin/)|`C`|all|measures network latency, jitter and packet loss between the monitored node and any number of remote network end points.
14
+[ioping.plugin](../ioping.plugin/)|`C`|all|measures disk latency.
15
[freeipmi.plugin](../freeipmi.plugin/)|`C`|linux|collects metrics from enterprise hardware sensors, on Linux servers.
16
[nfacct.plugin](../nfacct.plugin/)|`C`|linux|collects netfilter firewall, connection tracker and accounting metrics using `libmnl` and `libnetfilter_acct`.
17
[xenstat.plugin](../xenstat.plugin/)|`C`|linux|collects XenServer and XCP-ng metrics using `lxenstat`.
@@ -64,6 +65,7 @@ Example:
65
66
# charts.d = yes
67
# fping = yes
68
+ # ioping = yes
69
# node.d = yes
70
# python.d = yes
71
```
configure.ac
+1
@@ -692,6 +692,7 @@ AC_CONFIG_FILES([
692
collectors/checks.plugin/Makefile
693
collectors/diskspace.plugin/Makefile
694
collectors/fping.plugin/Makefile
695
+ collectors/ioping.plugin/Makefile
696
collectors/freebsd.plugin/Makefile
697
collectors/freeipmi.plugin/Makefile
698
collectors/cups.plugin/Makefile
docs/Add-more-charts-to-netdata.md
+4
-1
@@ -65,6 +65,7 @@ To control which plugins netdata run, edit `netdata.conf` and check the `[plugin
65
# node.d = yes
66
# python.d = yes
67
# fping = yes
68
+ # ioping = yes
69
# charts.d = yes
70
# apps = yes
71
# xenstat = yes
@@ -94,7 +95,7 @@ sudo su -s /bin/bash netdata
95
```
96
97
Similarly, you can use `charts.d.plugin` for BASH plugins and `node.d.plugin` for node.js plugins.
97
-Other plugins (like `apps.plugin`, `freeipmi.plugin`, `fping.plugin`) use the native netdata plugin API and can be run directly.
98
+Other plugins (like `apps.plugin`, `freeipmi.plugin`, `fping.plugin`, `ioping.plugin`) use the native netdata plugin API and can be run directly.
99
100
If you need to configure a netdata plugin or module, all user supplied configuration is kept at `/etc/netdata` while the stock versions of all files is at `/usr/lib/netdata/conf.d`.
101
To copy a stock file and edit it, run `/etc/netdata/edit-config`. Running this command without an argument, will list the available stock files.
@@ -113,6 +114,7 @@ plugin | language | plugin<br/>configuration | modules<br/>configuration |
114
`charts.d.plugin`<br/>(external plugin orchestrator for BASH modules)|`BASH`|`charts.d.conf`|a file for each module in `/etc/netdata/charts.d/`
115
`diskspace.plugin`<br/>(internal plugin for collecting Linux mount points usage)|`C`|`netdata.conf` section `[plugin:diskspace]`|N/A
116
`fping.plugin`<br/>(external plugin for collecting network latencies)|`C`|`fping.conf`|This plugin is a wrapper for the `fping` command.
117
+`ioping.plugin`<br/>(external plugin for collecting disk latencies)|`C`|`ioping.conf`|This plugin is a wrapper for the `ioping` command.
118
`freeipmi.plugin`<br/>(external plugin for collecting IPMI h/w sensors)|`C`|`netdata.conf` section `[plugin:freeipmi]`
119
`idlejitter.plugin`<br/>(internal plugin for monitoring CPU jitter)|`C`|N/A|N/A
120
`macos.plugin`<br/>(internal plugin for monitoring MacOS system resources)|`C`|`netdata.conf` section `[plugin:macos]`|one section for each module `[plugin:macos:MODULE]`. Each module may provide additional sections in the form of `[plugin:macos:MODULE:SUBSECTION]`.
@@ -318,6 +320,7 @@ xenstat|C|Collects host and domain statistics for XenServer or XCP-ng hypervisor
320
application|language|notes|
321
:---------:|:------:|:----|
322
apps|C|`apps.plugin` collects resource usage statistics for all processes running in the system. It groups the entire process tree and reports dozens of metrics for CPU utilization, memory footprint, disk I/O, swap memory, network connections, open files and sockets, etc. It reports metrics for application groups, users and user groups.<br/> <br/>[Documentation of `apps.plugin`](../collectors/apps.plugin/).<br/> <br/>netdata plugin: [`apps_plugin.c`](../collectors/apps.plugin)<br/>configuration file: [`apps_groups.conf`](../collectors/apps.plugin)|
323
+ioping|C|Charts disk latency statistics for a directory/file/device, using the `ioping` command. A recent (probably unreleased) version of ioping is required. The plugin supplied can install it in `/usr/local`.<br/> <br/>netdata plugin: [ioping.plugin](../collectors/ioping.plugin) (this is a shell wrapper to start ioping - once ioping is started, netdata and ioping communicate directly - it can also install the right version of ioping)<br/>configuration file: [ioping.conf](../collectors/ioping.plugin)|
324
cpu_apps|BASH<br/>Shell Script|Collects the CPU utilization of select apps.<br/><br/>DEPRECATED IN FAVOR OF `apps.plugin`. It is still supplied only as an example module to shell scripting plugins.<br/> <br/>netdata plugin: [charts.d.plugin](../collectors/charts.d.plugin#chartsdplugin)<br/>plugin module: [cpu_apps.chart.sh](../collectors/charts.d.plugin/cpu_apps)<br/>configuration file: [charts.d/cpu_apps.conf](../collectors/charts.d.plugin/cpu_apps)|
325
load_average|BASH<br/>Shell Script|Collects the current system load average.<br/><br/>DEPRECATED IN FAVOR OF THE NETDATA INTERNAL ONE. It is still supplied only as an example module to shell scripting plugins.<br/> <br/>netdata plugin: [charts.d.plugin](../collectors/charts.d.plugin#chartsdplugin)<br/>plugin module: [load_average.chart.sh](../collectors/charts.d.plugin/load_average)<br/>configuration file: [charts.d/load_average.conf](../collectors/charts.d.plugin/load_average)|
326
mem_apps|BASH<br/>Shell Script|Collects the memory footprint of select applications.<br/><br/>DEPRECATED IN FAVOR OF `apps.plugin`. It is still supplied only as an example module to shell scripting plugins.<br/> <br/>netdata plugin: [charts.d.plugin](../collectors/charts.d.plugin#chartsdplugin)<br/>plugin module: [mem_apps.chart.sh](../collectors/charts.d.plugin/mem_apps)<br/>configuration file: [charts.d/mem_apps.conf](../collectors/charts.d.plugin/mem_apps)|
docs/generator/buildyaml.sh
+1
@@ -224,6 +224,7 @@ echo -ne " - BASH:
224
navpart 3 collectors/apps.plugin
225
navpart 3 collectors/cups.plugin
226
navpart 3 collectors/fping.plugin
227
+navpart 3 collectors/ioping.plugin
228
navpart 3 collectors/freeipmi.plugin
229
navpart 3 collectors/nfacct.plugin
230
navpart 3 collectors/xenstat.plugin
health/Makefile.am
+1
@@ -39,6 +39,7 @@ dist_healthconfig_DATA = \
39
health.d/elasticsearch.conf \
40
health.d/entropy.conf \
41
health.d/fping.conf \
42
+ health.d/ioping.conf \
43
health.d/fronius.conf \
44
health.d/haproxy.conf \
45
health.d/httpcheck.conf \
health/health.d/ioping.conf
new
+13
@@ -0,0 +1,13 @@
1
+template: disk_latency
2
+families: *
3
+ on: ioping.latency
4
+ lookup: average -10s unaligned of average
5
+ units: ms
6
+ every: 10s
7
+ green: 500
8
+ red: 1000
9
+ warn: $this > $green OR $max > $red
10
+ crit: $this > $red
11
+ info: average round trip delay during the last 10 seconds
12
+ delay: down 30m multiplier 1.5 max 2h
13
+ to: sysadmin
netdata-installer.sh
+6
@@ -718,6 +718,11 @@ if [ "${UID}" -eq 0 ]; then
718
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/xenstat.plugin"
719
fi
720
721
+ if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping" ]; then
722
+ run chown root:${NETDATA_GROUP} "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping"
723
+ run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/ioping"
724
+ fi
725
+
726
if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network" ]; then
727
run chown "root:${NETDATA_GROUP}" "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network"
728
run chmod 4750 "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/cgroup-network"
@@ -989,6 +994,7 @@ NETDATA_PREFIX="${NETDATA_PREFIX}"
994
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS}"
995
NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS}"
996
INSTALL_UID="${UID}"
997
+NETDATA_GROUP="${NETDATA_GROUP}"
998
REINSTALL_COMMAND="${REINSTALL_COMMAND}"
999
RELEASE_CHANNEL="${RELEASE_CHANNEL}"
1000
# This value is meant to be populated by autoupdater (if enabled)
packaging/makeself/install-or-update.sh
+1
-1
@@ -195,7 +195,7 @@ run chown -R ${NETDATA_USER}:${NETDATA_GROUP} /opt/netdata
195
196
progress "fix plugin permissions"
197
198
-for x in apps.plugin freeipmi.plugin cgroup-network
198
+for x in apps.plugin freeipmi.plugin ioping cgroup-network
199
do
200
f="usr/libexec/netdata/plugins.d/${x}"
201
packaging/makeself/jobs/50-ioping-1.1.install.sh
new
+18
@@ -0,0 +1,18 @@
1
+#!/usr/bin/env bash
2
+# SPDX-License-Identifier: GPL-3.0-or-later
3
+
4
+. $(dirname "${0}")/../functions.sh "${@}" || exit 1
5
+
6
+fetch "netdata-ioping-43d15a5" "https://github.com/netdata/ioping/tarball/master"
7
+
8
+export CFLAGS="-static"
9
+
10
+run make clean
11
+run make -j$(find_processors)
12
+run mkdir -p ${NETDATA_INSTALL_PATH}/usr/libexec/netdata/plugins.d/
13
+run install -o root -g root -m 4750 ioping ${NETDATA_INSTALL_PATH}/usr/libexec/netdata/plugins.d/
14
+
15
+if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]
16
+then
17
+ run strip ${NETDATA_INSTALL_PATH}/usr/libexec/netdata/plugins.d/ioping
18
+fi
web/gui/dashboard_info.js
+6
@@ -213,6 +213,12 @@ netdataDashboard.menu = {
213
info: 'Network latency statistics, via <b>fping</b>. <b>fping</b> is a program to send ICMP echo probes to network hosts, similar to <code>ping</code>, but much better performing when pinging multiple hosts. fping versions after 3.15 can be directly used as netdata plugins.'
214
},
215
216
+ 'ioping': {
217
+ title: 'ioping',
218
+ icon: '<i class="fas fa-exchange-alt"></i>',
219
+ info: 'Disk latency statistics, via <b>ioping</b>. <b>ioping</b> is a program to read/write data probes from/to a disk.'
220
+ },
221
+
222
'httpcheck': {
223
title: 'Http Check',
224
icon: '<i class="fas fa-heartbeat"></i>',