-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd behavior of cpu-load check #101
Comments
Looking at the logic, the condition is greater than, where this is equal so reports as warning. This does seem to be a bit ambiguous and should probably be updated to be greater than or equal to. |
It only seems to behave this way when you're using an asset and using the command Scheme "powershell.exe -ExecutionPolicy ByPass -C [check-name].ps1 [warn] [crit]" If you use the -File flag and specify a path, it the status will match the check output's status, but then it defeats the nice advantage of not having to specify a path when using assets. |
The documentation provides that |
I understand the -C vs -File switches. Using -File works, and is the workaround I'm using at the moment. I would like to use -C if possible so I don't have to specify a path. Looking at the documentation on this page, it looks like you should be able to use the -C switch without using a path. Using -C also works fine with metrics, but those don't really have exit statuses of 0, 1, or 2 |
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:
Sensu only ever shows a warning, even if the load is over the threshold:
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.
The text was updated successfully, but these errors were encountered: