Matthew1
(Matthew)
May 9, 2024, 7:53am
1
Hi to all,
can anyone recommend me a way to monitor S2D / a hyperV Cluster?
I have seen some github scripts is this the best way?
This are the scripts that I have found:
# 30.01.2019 # CL
# Constantin.Lotz@ruv-bkk.de
# Check Storage Spaces Direct Disk
#
# Dieser Check prüft den Status aller Virtual Disks sowie des StoragePool
# Außerdem werden aktuelle StorageJobs aufgelistet
#
# Version 0.1
#
$vdisks = Get-VirtualDisk | Select FriendlyName, OperationalStatus, HealthStatus, Size, AllocatedSize, FootprintOnPool
foreach ($vdisk in $vdisks) {
if ($vdisk.OperationalStatus -eq "OK" -and $vdisk.HealthStatus -eq "Healthy") {
# All good
$status = "0"
$statusText = "OK - " + $vdisk.Friendlyname + " is in good state. OperationalStatus:" + $vdisk.OperationalStatus + " | HealthStatus:" + $vdisk.HealthStatus
} else {
$status = "1"
$statusText = "Warning - " + $vdisk.Friendlyname + " is in unusual state. OperationalStatus:" + $vdisk.OperationalStatus + " | HealthStatus:" + $vdisk.HealthStatus
}
This file has been truncated. show original
# 30.01.2019 # CL
# Constantin.Lotz@ruv-bkk.de
# Check Storage Spaces Direct Disk
#
# Dieser Check prüft den Status aller Physical Disks
# und liefert die Summe der gesamten Festplatten
#
# Version 0.2
#
# Changelog: 24.02.2020 -Remove Whitespaces from SerialNumber (by Andreas, afaassl)
#
# PhysicalDisk
$pdisks = Get-PhysicalDisk | Where { $_.FriendlyName -ne "HP LOGICAL VOLUME" } | Select FriendlyName, SerialNumber, OperationalStatus, HealthStatus, Usage, Size, AllocatedSize, VirtualDiskFootprint
foreach ($pdisk in $pdisks) {
if ($pdisk.OperationalStatus -eq "OK" -and $pdisk.HealthStatus -eq "Healthy") {
# All good
$status = "0"
#Remove Whitespaces
$serial=$pdisk.SerialNumber.replace(' ','') #afassl
This file has been truncated. show original
Can anyone tell me where I have to insert this script?
I’m not a pro user using checkmk maybe someone can guide me through this process.
Thank you very much!
aeckstein
(Andre Eckstein)
May 9, 2024, 8:00am
2
Hi,
for 2.1 there is Andreas check, I will migrate it to the 2.2 “API” in the next days…
1 Like
Matthew1
(Matthew)
May 9, 2024, 8:03am
3
I installed the mkp file on the omd I see that the mkp hyperv_cluster 2.0 is enabled.
But how can I now monitor the hyper-v cluster?
Can you give me a hint?
Normaly I find the checks under other integrations but this time I cannot find anything:
aeckstein
(Andre Eckstein)
May 9, 2024, 2:58pm
4
The cluster data is fetched by Powershell scripts triggered by the checkmk Agent on the Cluster nodes, you can either bake them into a MSI package in the bakery or put them manually in the agents Plugin folder with the Raw Edition.
1 Like
Matthew1
(Matthew)
May 10, 2024, 10:17am
5
Ok thank you, I was able to copy the files now manually (hyperv checks) into this path: /local/lib/check_mk/base/plugins/agent_based and they are now into this folder.
Can you provide me the next steps?
Or should I be able now to rescan the object and see the available checks?
I can’t find something helpful from the documentation.
Thank you @aeckstein
aeckstein
(Andre Eckstein)
May 10, 2024, 12:54pm
6
Hi Matthias,
a discovery of the hosts should be enough.
You can try to run the powershell scripts manually and see if they provide a valid output and you can see if the checkmk agent output contains the hyper_v sections e. g. <<<hyperv_cluster_general>>> .
1 Like
Matthew1
(Matthew)
June 10, 2024, 9:37am
7
Hey @aeckstein ,
sorry for my late answer on that, was in trouble with other stuff until yet.
I tried to run the powershell script manually (with and without admin credentials) and there I got this error:
So manually the powershell script doesn’t work.
For this reason the checks on checkmk site don’t work too.
Matthew1
(Matthew)
July 26, 2024, 9:30am
8
I’m still stuck here…can you tell me where (checkmk server, server etc.) I should try to run the powershell script manually?
I think you need to test it inside a elevated powershell.
CheckMK agent runs normally as local system and has these rights.
Matthew1
(Matthew)
September 3, 2024, 9:01am
10
Where should the checkmk agent run? It can’t run on the node, unfortunately I haven’t really understood that yet, maybe you can help me.
Thank you.
The PowerShell scripts must run on the HyperV node.
That means a CheckMK agent must be installed on the HyperV nodes.
Matthew1
(Matthew)
September 3, 2024, 10:19am
12
Ok thank you, but is there any official guideline how to set this up?
It is the same as with any other agent plugin script.
1 Like