Icinga / icinga-powershell-cluster

A collection of Cluster plugins for the Icinga Powershell Framework
GNU General Public License v2.0
5 stars 1 forks source link

Invoke-IcingaCheckClusterSharedVolume: since framework 1.5.0 - "MethodInvocationException: Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""" #32

Closed K0nne closed 3 years ago

K0nne commented 3 years ago

Hello!

I am testing with the current masters (cluster, framework) and found an issue with Invoke-IcingaCheckClusterSharedVolume. Since framework 1.5.0 I am getting the following exception in the plugin output:

icinga> Invoke-IcingaCheckClusterSharedVolume -Verbosity 2

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

Exception calling "CritIfMatch" with "1" argument(s): "Exception calling "CritIfLike" with "1" argument(s): "Invalid unit type "Direct" specified for convertion. Allowed units: ms, s, m, h, d, w, M, y""
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-cluster\plugins\Invoke-IcingaCheckClusterSharedVolume.psm1:188 char:17
+                 $NodeCheckPackage.AddCheck(
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

[OK] Network Volumes Package
LordHepipud commented 3 years ago

Thank you for the issue. Is only this plugin behaving different or other plugins as well? I just did a test and could not reproduce this issue.

K0nne commented 3 years ago

It's only this plugin.

K0nne commented 3 years ago

I compared the plugin output with the version from before. One attribute is missing now:

StateInfo: Direct

Here an example output from before:

[OK] Check package "Network Volumes Package" (Match All)
[...]
\_ [OK] Check package "SharedVolume %NAME_LUN002%" (Match All)
   \_ [OK] %NAME_LUN002% Fault State: NoFaults
   \_ [OK] %NAME_LUN002% FreeSpace: 81.44%
   \_ [OK] %NAME_LUN002% State: Online
   \_ [OK] Check package "Members" (Match All)
      \_ [OK] Check package "SharedVolume %NAME_LUN002% (Node: %HOSTNAME1100001%)" (Match All)
         \_ [OK] %NAME_LUN002% Block RedirectedIOReason: NotBlockRedirected
         \_ [OK] %NAME_LUN002% FileSystem RedirectedIOReason: NotFileSystemRedirected
         \_ [OK] %NAME_LUN002% StateInfo: Direct
      \_ [OK] Check package "SharedVolume %NAME_LUN002% (Node: %HOSTNAME1100002%)" (Match All)
         \_ [OK] %NAME_LUN002% Block RedirectedIOReason: NotBlockRedirected
         \_ [OK] %NAME_LUN002% FileSystem RedirectedIOReason: NotFileSystemRedirected
         \_ [OK] %NAME_LUN002% StateInfo: Direct
      \_ [OK] Check package "SharedVolume %NAME_LUN002% (Node: %HOSTNAME4100001%)" (Match All)
         \_ [OK] %NAME_LUN002% Block RedirectedIOReason: NotBlockRedirected
         \_ [OK] %NAME_LUN002% FileSystem RedirectedIOReason: NotFileSystemRedirected
         \_ [OK] %NAME_LUN002% StateInfo: Direct
      \_ [OK] Check package "SharedVolume %NAME_LUN002% (Node: %HOSTNAME4100002%)" (Match All)
         \_ [OK] %NAME_LUN002% Block RedirectedIOReason: NotBlockRedirected
         \_ [OK] %NAME_LUN002% FileSystem RedirectedIOReason: NotFileSystemRedirected
         \_ [OK] %NAME_LUN002% StateInfo: Direct
[...]