To run the check with default parameters:
sensu-top-processThis will execute the check with the default CPU and memory thresholds (10%) and no specific scheme or expansion for process names.
To specify custom thresholds and a scheme:
sensu-top-process --cpu 15.5 --memory 20 --scheme my_custom_schemeThis sets the CPU threshold to 15.5%, the memory threshold to 20%, and prepends my_custom_scheme to all emitted metrics.
To expand the process name to include arguments:
sensu-top-process --expand bashThis expands the names of processes named 'bash' to include their command-line arguments.
The sensu-top-process check can be configured with various command-line arguments:
--cpuor-c: Set the CPU usage threshold as a percentage.--memoryor-m: Set the memory usage threshold as a percentage.--schemeor-s: Specify a scheme to prepend to metric outputs.--expandor-e: Expand process name to include arguments (useful for processes like bash or powershell).
Note: Detailed descriptions and default values for these configurations are provided in the Overview section.
Sensu 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 with Sensu Backend 5.13 or later, you can use the following command to add the asset:
sensuctl asset add elfranne/sensu-top-process
If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][https://bonsai.sensu.io/assets/elfranne/sensu-top-process].
---
type: CheckConfig
api_version: core/v2
metadata:
name: sensu-top-process
namespace: default
spec:
command: sensu-top-process --cpu 15.5 --memory 20 --scheme my_scheme --expand bash
subscriptions:
- system
runtime_assets:
- elfranne/sensu-top-processThe preferred way of installing and deploying this plugin is to use it as an Asset. If you would like to compile and install the plugin from source or contribute to it, download the latest version or create an executable script from this source.
From the local path of the sensu-top-process repository:
go build
For more information about contributing to this plugin, see Contributing.