CMK version: 2.4.0
OS version: Windows 2022
Hi Team,
Am starting trying local checks with Powershell scripts onto Check_mk.
More specifically, I am trying to monitor our Omnissa cluster in a simple way. The objective is to monitor our Pools states.
The script seem to be working perfectly and I do get the general situation in checkMK through :
# Set the overall message based on the status
if ($overallStatus -eq 0) {
$overallMessage = "All pools are OK."
} else {
$overallMessage = "One or more pools have a CRITICAL status."
}
# Print a summary line for the entire check
Write-Host "$overallStatus horizon_pools_summary - $overallMessage"
Output CheckMK :

But I have also for each pool the following :
# Print the detailed CheckMK output for each service
Write-Host "$poolEnabledCheckMKStatus horizon_pool_`"$poolName`"_enabled - $poolEnabledMessage"
Write-Host "$provisioningCheckMKStatus horizon_pool_`"$poolName`"_provisioning - Provisioning status is '$provisioningEnabledMessage'"
Write-Host "0 horizon_pool_`"$poolName`"_availability - $availabilityMessage"
Write-Host "0 horizon_pool_`"$poolName`"_goldenimage - $goldenImageMessage"
See output :
0 horizon_pool_“T-C-METIER"enabled - Enabled
0 horizon_pool"T-C-METIER"provisioning - Provisioning status is ‘Enabled’
0 horizon_pool"T-C-METIER"availability - 3 available, 0 used. (0% utilization)
0 horizon_pool"T-C-METIER"goldenimage - Golden Image: //vm/M-C-METIER-
0 horizon_pool"T-C-RHUMAN"enabled - Enabled
0 horizon_pool"T-C-RHUMAN"provisioning - Provisioning status is ‘Enabled’
0 horizon_pool"T-C-RHUMAN"availability - 3 available, 0 used. (0% utilization)
0 horizon_pool"T-C-RHUMAN”_goldenimage - Golden Image: //vm/M-C-RHUMAN-
0 horizon_pools_summary - All pools are OK.
I tried following CheckMk documentation, but seem stuck. Hope you can help.