License
MIT License
This plugin provides native instrumentation for collecting uptime and idletime metrics.
check-uptime
Checks the system's uptime and warns if the system has been rebooted.
metrics-uptime
Provides uptime metrics.
check-uptime.rb
Usage: check-uptime.rb (options)
-g, --greater-than This compare uptime > threshold. Default behavior uptime < threshold
-w SEC Warn threshold in SEC
metrics-uptime.rb
Usage: metrics-uptime.rb (options)
-s, --scheme SCHEME Metric naming scheme, text to prepend to metric
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-uptime-checks
If you're using an earlier version of sensuctl, you can download the asset definition from this project's Bonsai asset index page.
---
type: Asset
api_version: core/v2
metadata:
name: sensu-plugins-uptime-checks
spec:
url: https://assets.bonsai.sensu.io/65a0f4378e92721cf5565e3be73bbe30632df6c7/sensu-plugins-uptime-checks_3.1.0_centos_linux_amd64.tar.gz
sha512: 2c0337391edfafa308c18bec7cae1c641012d6225c92d7bba98c79665e34311a2b13250a60b5b0074da82b274355e4715bca73c1b428b04132cd8152e39d120f
---
type: CheckConfig
spec:
command: "check-uptime.rb"
handlers: []
high_flap_threshold: 0
interval: 10
low_flap_threshold: 0
publish: true
runtime_assets:
- sensu-plugins/sensu-plugins-uptime-checks
- sensu/sensu-ruby-runtime
subscriptions:
- linux
{
"checks": {
"check-uptime": {
"command": "check-uptime.rb",
"subscribers": ["linux"],
"interval": 10,
"refresh": 10,
"handlers": ["influxdb"]
}
}
}
See the instructions above for asset registration.
Install and setup plugins on Sensu Core.
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.
See CONTRIBUTING.md for information about contributing to this plugin.
Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.
×