|
| 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 | +[]() |
0 commit comments