sensu-plugins-memory-checks icon indicating copy to clipboard operation
sensu-plugins-memory-checks copied to clipboard

Memory check resource definition is not valid in README

Open rgeniesse opened this issue 5 years ago • 0 comments

The README currently has the following for a memory check resource definition example:

---
type: CheckConfig
spec:
  command: "check-memory.rb"
  handlers: []
  high_flap_threshold: 0
  interval: 10
  low_flap_threshold: 0
  publish: true
  runtime_assets:
  - sensu-plugins/sensu-plugins-memory-checks
  - sensu/sensu-ruby-runtime
  subscriptions:
  - linux

This isn't valid for a few reasons:

  • No metadata, so no check name can be set.
  • Missing the api_version attribute.
  • The memory check command throws an error that both warning and critical need to be set. The following worked for me:
---
type: CheckConfig
api_version: core/v2
metadata:
  name: check-memory
  namespace: default
spec:
  command: "check-memory.rb -w 80 -c 90"
  high_flap_threshold: 0
  interval: 10
  low_flap_threshold: 0
  publish: true
  runtime_assets:
  - sensu-plugins/sensu-plugins-memory-checks
  - sensu/sensu-ruby-runtime
  subscriptions:
  - linux

rgeniesse avatar Feb 27 '20 17:02 rgeniesse