Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


asachs01/sensu-go-hook-has-process-filter (4) Versions 0.0.3 Community Tier

Filters Sensu Go check hook process table info

Downloads in last month
0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Commits in last year
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
README
Release Notes

sensu-go-hook-has-process-filter

Build Status

This project is provides a filter library for evaluating the output of a Sensu check hook that gathers process table information.

Configuration

Let's start with an example check. In this case, we're checking the CPU of a group of given systems. Of note is the check hook "get_top_processes"

Example Check

type: CheckConfig
api_version: core/v2
metadata:
  name: check-cpu
  namespace: default
spec:
  command: sensu-go-cpu-check -w 70 -c 85
  runtime_assets:
  - sensu-go-cpu-check-linux
  interval: 10
  publish: true
  output_metric_format: nagios_perfdata
  output_metric_handlers: ["influxdb"]
  check_hooks:
  - warning:
    - get_top_processes
  - critical:
    - get_top_processes
  handlers:
  - slack
  subscriptions:
  - system

Example Hook

Here is the example hook. It just runs a ps command and does a bit of sorting by percent of CPU used.

type: HookConfig
api_version: core/v2
metadata:
  annotations: null
  labels: null
  name: get_top_processes
  namespace: default
spec:
  command: |-
    ps -eo user,pid,cmd:50,%cpu --sort=-%cpu | head -n 6
  stdin: false
  timeout: 60

Example Filter

---
type: EventFilter
api_version: core/v2
metadata:
  name: hook_process_gremlin
  namespace: default
spec:
  action: allow
  runtime_assets:
    - sensu-go-hook-has-process-filter
  expressions:
    - has_hook_process(even)

Are you sure you want to report this asset?

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.

×

You must be signed in to report this asset.

Sign In with Github