Skip to content

Adding Check for Clusterhealthcheck if this is really a ClusterNode #55

Open
@Wintermute2k6

Description

@Wintermute2k6

Installing the component on a non valid Cluster node and trying to execute the check ends in abrupt break and there seems to be no real error message.

Suggestion adding the following

function Invoke-IcingaCheckClusterHealth()
{
    param (
        [array]$Include               = @(),
        [array]$Exclude               = @(),
        [ValidateSet('Unknown', 'Up', 'Down', 'Paused', 'Joining')]
        [array]$WarningState          = @(),
        [ValidateSet('Unknown', 'Up', 'Down', 'Paused', 'Joining')]
        [array]$CriticalState         = @(),
        [switch]$SkipClusterRessource = $FALSE,
        [switch]$NoPerfData           = $FALSE,
        [ValidateSet(0, 1, 2, 3)]
        $Verbosity                    = 0
    );

    if((Get-WindowsFeature -Name Failover-Clustering).InstallState -eq "Available") {
       Write-IcingaEventMessage -EventId xxxx -Namespace 'Cluster';
       echo "This is not a vaild Failover cluster node this component shouldn't be installed here"
       break;
      }
      else {
        continue;
      }

    # Create a main CheckPackage under which all other checks will be placed
    $CheckPackage       = New-IcingaCheckPackage -Name 'Cluster Services' -OperatorAnd -Verbose $Verbosity -AddSummaryHeader;
    $ClusterServiceInfo = Get-IcingaClusterInfo;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions