Monitoring Disk

This article will help you get the Disk plugin for sd-agent configured and returning metrics

Installing the disk plugin package

Install the disk plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-disk

Install the disk plugin on RHEL/CentOS:

sudo yum install sd-agent-disk

Read more about agent plugins.

Configuring the agent to monitor Disks

The disk check is automatically installed and configured with the agent, however there are some additional configuration options to exclude certain disks from being reported.

1. Configure /etc/sd-agent/conf.d/disk.yaml

Example config to exclude disks:

init_config:

instances:
  # The (optional) excluded_filesystems parameter will instruct the check to
  # ignore disks using these filesystems
  - excluded_disks:
     -/dev/sda1
    # The (optional) all_partitions parameter will instruct the check to
    # get metrics for all partitions. use_mount should be set to yes (to avoid
    # collecting empty device names) when using this option.
    # all_partitions: no

Example config to exclude disks using RegEX:

init_config:
instances:
  # The (optional) excluded_filesystems parameter will instruct the check to
  # ignore disks using these filesystems
  - excluded_disk_re: /dev/*
    # The (optional) all_partitions parameter will instruct the check to
    # get metrics for all partitions. use_mount should be set to yes (to avoid
    # collecting empty device names) when using this option.
    # all_partitions: no

Example config to exclude disks by mountpoint using RegEX:

init_config:
instances:
  # The (optional) excluded_filesystems parameter will instruct the check to
  # ignore disks using these filesystems
  - excluded_mountpoint_re: /home/virtfs/*
    # The (optional) all_partitions parameter will instruct the check to
    # get metrics for all partitions. use_mount should be set to yes (to avoid
    # collecting empty device names) when using this option.
    # all_partitions: no

2. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

disk
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check disk

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the disk metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
system.disk.free

The amount of disk space that is free.
byte / None
Type: float
system.disk.in_use

The amount of disk space in use as a fraction of the total.
fraction / None
Type: float
system.disk.read_time_pct

Percent of time spent reading from disk.
percent / None
Type: float
system.disk.total

The total amount of disk space.
byte / None
Type: float
system.disk.used

The amount of disk space in use.
byte / None
Type: float
system.disk.write_time_pct

Percent of time spent writing to disk.
percent / None
Type: float
system.fs.inodes.free

The number of free inodes.
inode / None
Type: float
system.fs.inodes.in_use

The number of inodes in use as a fraction of the total.
fraction / None
Type: float
system.fs.inodes.total

The total number of inodes.
inode / None
Type: float
system.fs.inodes.used

The number of inodes in use.
inode / None
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.