Sensu Plugins vmstats Plugin
- Overview
- Files
- Usage examples
- Configuration
- Sensu Go
- Asset registration
- Asset definition
- Check definition
- Sensu Core
- Check definition
- Sensu Go
- Installation from source
- Additional notes
- Contributing
Overview
This plugin provides native vmstat instrumentation for metrics collection, including processes waiting, interrupts per second, and more.
Files
- bin/metrics-vmstat.rb
metrics-vmstat Uses vmstat to collect basic system metrics and produces Graphite-formatted output.
Usage examples
Help
metrics-vmstat.rb
Usage: metrics-vmstat.rb (options)
--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-vmstats
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-vmstats
spec:
url: https://assets.bonsai.sensu.io/5c97f93791b98b2542c5c9739e88ca28b76a95ac/sensu-plugins-vmstats_2.0.0_centos_linux_amd64.tar.gz
sha512: 366eb41a1ad3b7750d7de5f510b6a17393729eac09d4b786e9af440b8036a737fa3ff8da1e137238edce8585898fa936cf096c4c12c226f628d998ca59769e6f
Check definition
---
type: CheckConfig
api_version: core/v2
metadata:
name: metrics-vmstats
namespace: default
spec:
check_hooks: null
command: metrics-vmstat.rb -exporter-url http://localhost:8080/metrics
output_metric_format: graphite
output_metric_handlers:
- graphite
runtime_assets:
- sensu/sensu-plugins-metrics-vmstats
- sensu/sensu-ruby-runtime
stdin: false
subdue: null
subscriptions:
- linux
timeout: 5
ttl: 0
Sensu Core
Check definition
{
"checks": {
"metrics-vmstats": {
"type": "metric",
"command": "metrics-vmstat.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.