项目作者: denis-jdsouza

项目描述 :
Custom Nagios plugin to monitor disk IO utilization
高级语言: Shell
项目地址: git://github.com/denis-jdsouza/nagios-plugin-disk-io-usage.git
创建时间: 2021-06-26T12:55:15Z
项目社区:https://github.com/denis-jdsouza/nagios-plugin-disk-io-usage

开源协议:MIT License

下载


License: MIT

Overview

Custom Nagios plugin to monitor disk IO utilization.

Database serves (MySQL, InfluxDB, MongoDB, Elasticsearch, etc) heavily depend on disk performance as these type of workload are disk IO bound, as such the disk IO can quickly become a bottleneck resulting in degraded performance, hense monitoring the disk performance for these types of servers is important.

This plugin will monitor the disk IO utilization of all disks connected to the server, including any swap disks.

Example output

  1. $ lsblk
  2. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
  3. nvme0n1 259:0 0 8G 0 disk
  4. └─nvme0n1p1 259:1 0 8G 0 part /
  5. nvme1n1 259:2 0 1000G 0 disk /data
  6. $ ./check_disk_io.sh -W 80
  7. OK: Disk-IO Utilization for Disks: nvme0n1:0% nvme1n1:67%, Warning:80%
  8. $ ./check_disk_io.sh -W 80
  9. WARNING: Disk-IO Utilization for Disks: nvme1n1:84%; Warning:80%

Dependencies

This plugin uses ‘iostat’ tool to gather disk IO metrics, it can be installed as follows:

  • apt-get install sysstat (Ubuntu, Debian)
  • yum install sysstat (Redhat, CentOS)

Configuration

  1. Copy script to NRPE plugin directory: “/usr/lib/nagios/plugins/“
  2. NRPE config entry: “/etc/nagios/nrpe.cfg”
    1. command[check_disk_io]=/usr/lib/nagios/plugins/check_disk_io.sh -W 80
  3. Example Nagios-server configuration
    ```
    define service {
    1. use local-service
    2. host_name <remote_linux_host>
    3. service_description Disk-IO
    4. check_command check_nrpe!check_disk_io
    }

define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
```

Nagios UI screenshots


License

Code released under the MIT License