icinga-powershell-plugins icon indicating copy to clipboard operation
icinga-powershell-plugins copied to clipboard

Invoke-IcingaCheckEventlog not working for Application and Services Logs section

Open drapiti opened this issue 1 year ago • 5 comments

The eventlog check does not seem to be working for logs outside of windows logs. The following example does not find any events:

Invoke-IcingaCheckEventlog -Warning 0 -Critical 0 -LogName 'Microsoft-Windows-FailoverClustering/Operational' -IncludeEventId 1641 -IncludeEntryType Information -IncludeSource 'Microsoft-Windows-FailoverClustering' -Verbosity 3 image

drapiti avatar Jun 06 '23 11:06 drapiti

I think it's something with the slash in the middle. Have you tried to mask it?

K0nne avatar Jun 06 '23 13:06 K0nne

How would you suggest to mask it?

drapiti avatar Jun 06 '23 14:06 drapiti

I'm not sure on how MSSQL logs work, but I do know the plugin is working properly in the Hyper-V space, having a similar log and source naming.

I will report back once I had a chance to test this on my test environment.

LordHepipud avatar Jun 06 '23 17:06 LordHepipud

Also there is another bug we are experiencing. Exclusively on Windows Server 2012 we get the following error:

[UNKNOWN] Icinga Exception: Could not compare "06/10/2023 22:08:23" to "2023/06/10 23.05.55". Error: "Cannot convert value "2023/06/10 23.05.55" to type "System.DateTime". Error: "String was not recognized as a valid DateTime."" CheckCommand: Invoke-IcingaCheckEventlog Arguments: System.Collections.Hashtable StackTrace: at Get-IcingaEventLog, C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-plugins\compiled\icinga-powershell-plugins.ifw_compilation.psm1: line 8056 at Invoke-IcingaCheckEventlog, C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-plugins\compiled\icinga-powershell-plugins.ifw_compilation.psm1: line 1237 at Exit-IcingaExecutePlugin, C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\cache\framework_cache.psm1: line 26525 at , : line 1 using the following settings as an example: image Newer windows versions work perfectly fine with the exact same checks. We have this problem consistently on Windows Server 2012/r2 image

drapiti avatar Jun 10 '23 21:06 drapiti

which framework/plugin-version is used?

tectumopticum avatar Oct 26 '23 14:10 tectumopticum

This issue is no longer present with the updated versions.

drapiti avatar May 15 '24 15:05 drapiti