Skip to content

Odd behavior of cpu-load check #101

@asachs01

Description

@asachs01

Greetings Windows folks! I'm trying to wrap my mind around and issue that I'm seeing with the cpu-load ps script.

I'm testing the scripts out using @samroy92 's asset version of the plugin (https://github.com/samroy92/sensu-plugins-windows) and seeing some odd behavior.

When using this check from the readme:

---
type: CheckConfig
api_version: core/v2
metadata:
  namespace: default
  name: win-cpu-check
spec:
  command: powershell.exe -ExecutionPolicy ByPass -C check-windows-cpu-load.ps1 90
    95
  subscriptions:
  - windows
  handlers:
  - slack
  - email
  runtime_assets:
  - samroy92/sensu-plugins-windows
  interval: 10
  publish: true

Sensu only ever shows a warning, even if the load is over the threshold:

Screen Shot 2019-10-29 at 10 04 54 AM

However, if the full path to the check executable is provided, the check will return a critical status as expected.

Since my knowledge of Windows arcana isn't great, I was wondering if anyone else had seen this sort of behavior. I'm not quite sure if this is pathing (seems like it's not), or something in the way that the script itself is handling things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions