host-disk datasource
The host-disk datasource collects information about disks from the operating system and creates metric data points and entities.
Metrics
| Name | Units | Description | 
|---|---|---|
| disk.io_time | ms | Milliseconds spent doing I/Os in concrete moment of time. | 
| disk.iops_in_progress | operations | I/Os currently in progress. | 
| disk.merged_read_count | merged/sec | The number of read requests merged per second that were queued to the device. | 
| disk.merged_write_count | merged/sec | The number of write requests merged per second that were queued to the device. | 
| disk.read | sectors/sec | The number of sectors read from the device per second. | 
| disk.read_count | operations/sec | The number of read requests that were issued to the device per second. | 
| disk.read_time | ms | Milliseconds spent by all reads in concrete moment of time. | 
| disk.weighted_io | weighted percent | This field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress times the number of milliseconds spent doing I/O since the last update of this field. | 
| disk.write | sectors/sec | The number of sectors written to the device per second. | 
| disk.write_count | operations/sec | The number of write requests that were issued to the device per second. | 
| disk.write_time | ms | Milliseconds spent by all writes in concrete moment of time. | 
Name styles
This datasource supports two mutually exclusive naming styles for the metrics that it collects:
- canonical: The default style, which features namespace prefixes.
 - linuxMonitorZenPack: The legacy style, used in the Linux Monitor ZenPack.
 
To change the default style, set the metric-names-variant property in 
the datasource section to linuxMonitorZenPack.
| Canonical style | ZenPack style | 
|---|---|
| disk.io_time | diskstats_ioInProgress | 
| disk.iops_in_progress | diskstats_msDoingIO | 
| disk.merged_read_count | diskstats_readsMerged | 
| disk.merged_write_count | diskstats_writesMerged | 
| disk.read | diskstats_sectorsRead | 
| disk.read_count | diskstats_readsCompleted | 
| disk.read_time | diskstats_msReading | 
| disk.weighted_io | diskstats_msDoingIOWeighted | 
| disk.write | diskstats_sectorsWritten | 
| disk.write_count | diskstats_writesCompleted | 
| disk.write_time | diskstats_msWriting | 
Entities
| Property | Description | 
|---|---|
| name | Disk label (if present) or the name used by the kernel | 
| label | Disk label (may be empty) | 
| kernel-name | Disk name used by the kernel | 
| block_type | Block type (for example, disk, part, lvm) | 
| major_minor | Major and minor number of the disk, separated by a colon | 
| mountpoint | Path of disk mount point; empty if unmounted | 
| serialNumber | Disk serial number; may be empty for virtual disks | 
| size | Disk capacity, in bytes | 
Example
{
  "block_type": "lvm",
  "kernel-name": "dm-2",
  "label": "docker-docker--pool_tmeta",
  "major_minor": "253:2",
  "mountpoint": "",
  "name": "docker-docker--pool_tmeta",
  "serialNumber": "",
  "size": "943718400"
}
Configuration
If you specify the host-disk datasource during installation, its configuration file is placed in the following location:
/etc/zendatamon-configs/configs/host-disk.config.yaml
Otherwise, you must copy it from the templates directory:
cp /etc/zendatamon-configs/.templates/.configs/host-disk.config.yaml \
  /etc/zendatamon-configs/configs/host-disk.config.yaml
The Zenoss Cloud agent service monitors the /etc/zendatamon-configs/configs directory
and loads any new or changed configuration files immediately.
Properties
interval(number)- The number of seconds to wait between collection attempts.
This value overrides the 
defaultIntervalvalue in the Zenoss Cloud agent service configuration file. timeout(number)- The number of seconds to wait before dropping a collection attempt.
 metric-names-variant(string, default =canonical)- The metric name style, either 
canonicalorlinuxMonitorZenPack. protocol(string, default =local)- Collection type; only 
localis supported, so this key can be omitted. ignore-unmounted(boolean, default =false)- Whether to skip unmounted disks during collection.
 include-block-types(array)- 
A list of block types to collect.
- If populated, then only disks with matching block types are collected
    and the 
exclude-block-typeslist is ignored. - If empty or omitted, all block types are collected.
 
 - If populated, then only disks with matching block types are collected
    and the 
 exclude-block-types(array)- A list of block types not to collect.
 use-sudo(boolean, default =false)- Whether to use 
sudoto run thelsblkcommand. 
Example
apiVersion: v1
kind: datasource
name: host-disk
spec:
  type: host-disk
  datasource:
    interval: 60
    timeout: 30 
    metric-names-variant: canonical
    protocol: ""
    ignore-unmounted: false 
    include-block-types: 
      - disk
      - part
      - lvm
      - raid1
    exclude-block-types: []
    use-sudo: true