Skip to content
master
Go to file
Code

README.md

Sensu Bonsai Asset Build Status Gem Version Code Climate Test Coverage Dependency Status

Sensu Plugins IO Checks Plugin

Overview

This plugin provides native system I/O instrumentation for metrics collection via the system ioping utility.

Files

  • bin/metrics-ioping.rb
  • bin/metrics-iostat-extended.rb

metrics-ioping Pushes ioping stats into Graphite.

metrics-iostat-extended Collects iostat data for a specified disk or all disks. Output is in Graphite format.

Usage examples

Help

metrics-ioping.rb

Usage: metrics-ioping.rb (options)
    -C                               Use cached I/O
    -c COUNT                         Stop after count requests
    -d DEVICE|FILE|DIRECTORY         Destination device, file or directory (required)
    -D                               Use direct I/O
    -i INTERVAL                      Interval between requests in seconds
    -n NAME                          Name of the series (required)
    -s, --scheme SCHEME              Metric naming scheme, text to prepend to metric

metrics-iostat-extended.rb

Usage: metrics-iostat-extended.rb (options)
    -d, --disk DISK                  Disk to gather stats for
    -x, --exclude-disk DISK[,DISK]   List of disks to exclude
    -i, --interval SECONDS           Period over which statistics are calculated (in seconds)
    -N, --show-dm-names              Display the registered device mapper names for any device mapper devices.  Useful for viewing LVM2 statistics
        --scheme SCHEME              Metric naming scheme, text to prepend to .$parent.$child

Configuration

Sensu Go

Asset registration

Assets are the best way to make use of this plugin. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 or later, you can use the following command to add the asset:

sensuctl asset add sensu-plugins/sensu-plugins-io-checks

If you're using an earlier version of sensuctl, you can download the asset definition from this project's Bonsai asset index page.

Asset definition

---
type: Asset
api_version: core/v2
metadata:
  name: sensu-plugins-io-checks
spec:
  url: https://assets.bonsai.sensu.io/60e1713ecd4f0d2e38aada33b15d41580e716048/sensu-plugins-io-checks_2.0.0_centos_linux_amd64.tar.gz
  sha512: de5f81305652edf93f459831a4a8d492207eb65120f28d249db7697c5dc1925e90d1483c6c46d70f3a48e530e62c1c3170d01c33b9e0d663081dffea52ff7bed

Check definition

---
type: CheckConfig
api_version: core/v2
metadata:
  name: metrics-ioping
  namespace: default
spec:
  check_hooks: null
  command: metrics-ioping.rb -exporter-url http://localhost:8080/metrics
  output_metric_format: graphite
  output_metric_handlers:
  - graphite
  runtime_assets:
  - sensu/sensu-plugins-io-checks
  - sensu/sensu-ruby-runtime
  stdin: false
  subdue: null
  subscriptions:
  - linux
  timeout: 5
  ttl: 0

Sensu Core

Check definition

{
  "checks": {
    "metrics-ioping": {
      "type": "metric",
      "command": "metrics-ioping.rb -exporter-url http://localhost:8080/metrics",
      "subscribers": ["app_tier"],
      "interval": 10,
      "handler": "graphite"
    }
  }
}

Installation from source

Sensu Go

See the instructions above for asset registration.

Sensu Core

Install and setup plugins on Sensu Core.

Additional notes

Sensu Go Ruby Runtime Assets

The Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator, or handler), make sure to include the corresponding Sensu Ruby Runtime Asset in the list of assets needed by the resource.

Contributing

See CONTRIBUTING.md for information about contributing to this plugin.

About

This plugin provides native system I/O instrumentation for metrics collection via the system `ioping` utility.

Resources

License

Languages

You can’t perform that action at this time.