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-IcingaCheckUNCPath - Add parameter to check as an individual user and wrong check state if share cant be acessed #332

Closed
K0nne opened this issue Dec 9, 2022 · 2 comments · Fixed by #350
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@K0nne
Copy link
Contributor

K0nne commented Dec 9, 2022

Hello,

I need to monitor some network shares. Those shares are only accessable for a specific subset of users.
It whould be helpful if the check could execute with individual user credentials.

Right now - even if the check cant read the target share - the check state is OK with zeroed plugin output. Whoudn't UNKNOWN be more appropriate in this case?

[OK] \\target\share\without\access
\_ [OK] Free Space: 0B
\_ [OK] Size: 0B
\_ [OK] Total Free: 0B

I tested this with the latest releases.

@LordHepipud
Copy link
Collaborator

LordHepipud commented May 26, 2023

I have made a implementation draft of the UNC plugin, allowing different credentials.
Could you please test the linked PR?

Please ensure to delete the following file before testing the plugin:

\icinga-powershell-framework\cache\dll\IcingaUNCPath.dll

This file will be rebuild, once it was deleted before. The new DLL will then try to handle the authentication,

Example:

icinga { Invoke-IcingaCheckUNCPath -Path '\\myshare' -User 'cstein@icinga' -Password (ConvertTo-IcingaSecureString -String 'my_secret_password') -Verbosity 3 } -DeveloperMode -RebuildCache

@K0nne
Copy link
Contributor Author

K0nne commented May 30, 2023

The PR works as intended. Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants