sensu / sensu-check-log

The Sensu Go log file monitoring check plugin and asset.
MIT License
2 stars 3 forks source link

Update readme to meet community plugin style guidelines #5

Closed cwjohnston closed 4 years ago

cwjohnston commented 4 years ago

Style guide is published here: https://github.com/sensu-plugins/community/blob/master/PLUGIN_STYLEGUIDE.md

Specifically, this readme would be more useful with an example check configuration. Here's one where I've captured sensu-backend logs into /tmp and I'm checking them for error:

type: CheckConfig
api_version: core/v2
metadata:
  name: tmp-backend-log
spec:
  check_hooks: null
  command: sensu-check-log -match error -state /tmp/backend.log.state -log /tmp/backend.log
  interval: 10
  publish: true
  runtime_assets:
  - sensu-check-log
  stdin: true
  subscriptions:
  - backend
  timeout: 10

It would be my preference to include an example which will be more immediately applicable to a wide cross section of users, but in most cases the standard log files on a Linux system are not readable by non-root users.