Skip to content
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

Invoke-IcingaCheckScheduledTask returns false perfdata #97

Closed
Mikesch-mp opened this issue Nov 16, 2020 · 7 comments · Fixed by #101
Closed

Invoke-IcingaCheckScheduledTask returns false perfdata #97

Mikesch-mp opened this issue Nov 16, 2020 · 7 comments · Fixed by #101
Assignees
Labels
bug Something isn't working needs-feedback We'll only proceed once we hear from you again
Milestone

Comments

@Mikesch-mp
Copy link

Invoke-IcingaCheckScheduledTask returns invalid perfdata. Either remove them at all (state check) or print out correct perfdata which can be used by icinga. Or disable them by default.

Why i dont disable it and be quiet. Most of the user will not disable them and then they will get a lot of warning entries in the icinga.log about broken perfdata from this check.

For perfdata see this guideline

PS C:\Users\Administrator> Invoke-IcingaCheckScheduledTask -TaskName 'QueueReporting' -State 'Ready';
[OK] Check package "Scheduled Tasks"
| 'queuereporting_microsoftwindowswindows_error_reporting'=Ready;;Ready
@Mikesch-mp
Copy link
Author

Also the output

Value "Ready" is not matching threshold "Disabled"

should be more hnting the asked state it should have like

Value "Ready" is not matching state "Disabled"

and if you are at it, i think making the State parameter an array would be nice. So we dont get an critical when the tasks runs ;)

@LordHepipud LordHepipud self-assigned this Nov 16, 2020
@LordHepipud LordHepipud added the bug Something isn't working label Nov 16, 2020
@LordHepipud LordHepipud added this to the v1.3.0 milestone Nov 16, 2020
@LordHepipud
Copy link
Collaborator

Thank you very much - I just created a PR to fix the invalid performance metrics of the plugin. That sadly slipped through.

Renaming the check output Value "Ready" is not matching threshold "Disabled" is not yet possible with the Framework, as this is a generic approach.

For converting the argument to an array I agree that the current implementation did not consider this. How ever, there is a mayjor problem for this because as far as I can tell we would not be able to create generic arrays within the Icinga Director for example (will have to re-evaluate).

I would want to have a list of fixed items (in this case the states) I can add into an array instead of having to Copy&Paste them from the help description.

This will require a more detailed lookup.

@Mikesch-mp
Copy link
Author

Same Problem with Invoke-IcingaCheckFirewall, True is not a correct perfdata :)

@LordHepipud
Copy link
Collaborator

I created a linked PR for the states of the plugin. This will change them from string to array, allowing to set multiple values.

How ever: You will require to update the Framework as well to render a proper configuration, as arrays with a ValidateSet were not supported before. In addition, you will have to update your configuration once importing the Director basket and re-assign your values.

I hope this is also clear by having a look on the upgrading docs

Once I received feedback I will merge the PR.

@LordHepipud LordHepipud added the needs-feedback We'll only proceed once we hear from you again label Nov 18, 2020
@Mikesch-mp
Copy link
Author

I will test it these days and give feedback

@LordHepipud
Copy link
Collaborator

Hello,

did you have the opportunity to check the plugin yet?

@LordHepipud
Copy link
Collaborator

I did som tests and from my side it looks fine. I will merge it if no negative feedback is added by Monday.
In case the upgrading docs are followed, there should be no issue in this PR, otherwise the plugin will throw exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-feedback We'll only proceed once we hear from you again
Projects
None yet
2 participants