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

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

Open
Wintermute2k6 opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@Wintermute2k6
Copy link

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;
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant