Skip to content

Commit f0bc01d

Browse files
authored
Add ioping plugin (netdata#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
1 parent 1d1b466 commit f0bc01d

20 files changed

+461
-46
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ collectors/charts.d.plugin/charts.d.plugin
112112
collectors/node.d.plugin/node.d.plugin
113113
collectors/python.d.plugin/python.d.plugin
114114
collectors/fping.plugin/fping.plugin
115+
collectors/ioping.plugin/ioping.plugin
115116
collectors/go.d.plugin
116117

117118
# installer generated files

README.md

+45-44
Large diffs are not rendered by default.

build/subst.inc

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
if sed \
33
-e 's#[@]localstatedir_POST@#$(localstatedir)#g' \
44
-e 's#[@]sbindir_POST@#$(sbindir)#g' \
5+
-e 's#[@]pluginsdir_POST@#$(pluginsdir)#g' \
56
-e 's#[@]configdir_POST@#$(configdir)#g' \
67
-e 's#[@]libconfigdir_POST@#$(libconfigdir)#g' \
78
-e 's#[@]cachedir_POST@#$(cachedir)#g' \

collectors/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SUBDIRS = \
1111
cups.plugin \
1212
diskspace.plugin \
1313
fping.plugin \
14+
ioping.plugin \
1415
freebsd.plugin \
1516
freeipmi.plugin \
1617
idlejitter.plugin \

collectors/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ plugin|lang|O/S|runs as|modular|description
3030
[cups.plugin](cups.plugin/)|`C`|any|external|-|monitors **CUPS**
3131
[diskspace.plugin](diskspace.plugin/)|`C`|linux|internal|-|collects disk space usage metrics on Linux mount points
3232
[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.
3334
[freebsd.plugin](freebsd.plugin/)|`C`|freebsd|internal|yes|collects resource usage and performance data on FreeBSD systems
3435
[freeipmi.plugin](freeipmi.plugin/)|`C`|linux, freebsd|external|-|collects metrics from enterprise hardware sensors, on Linux and FreeBSD servers.
3536
[idlejitter.plugin](idlejitter.plugin/)|`C`|any|internal|-|measures CPU latency and jitter on all operating systems

collectors/apps.plugin/apps_groups.conf

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ node.d.plugin: *node.d.plugin*
8282
python.d.plugin: *python.d.plugin*
8383
tc-qos-helper: *tc-qos-helper.sh*
8484
fping: fping
85+
ioping: ioping
8586
go.d.plugin: *go.d.plugin*
8687

8788
# -----------------------------------------------------------------------------

collectors/ioping.plugin/Makefile.am

+24
Original file line numberDiff line numberDiff line change
@@ -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

+82
Original file line numberDiff line numberDiff line change
@@ -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+
[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fioping.plugin%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()

collectors/ioping.plugin/ioping.conf

+40
Original file line numberDiff line numberDiff line change
@@ -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"

0 commit comments

Comments
 (0)