Attached is my attempt, i am clearly doing something wrong.
Thanks.
Revise Query
Re: Revise Query
You do not have the required permissions to view the files attached to this post.
Re: Revise Query
RDP into the VIP and then give us the disk management screenshot like you did with the other.
Thank you
Thank you
Re: Revise Query
RDPing into the cluster VIP just takes me to the same server i provided the screen shot for earlier in this ticket.
Re: Revise Query
Hmm, interesting, does the inactive node show anything different?
Re: Revise Query
To be honest, I'm not sure if this is a bug or expected behavior in regards to reserved disks being locked to the initiator. Either way, we won't be able to get the built in API disk check one working with this quickly, we'll likely have to use a powershell script to get the information, will that work for you?
I've created a bug report for this anyways:
https://github.com/NagiosEnterprises/ncpa/issues/231
I've created a bug report for this anyways:
https://github.com/NagiosEnterprises/ncpa/issues/231
Re: Revise Query
Currently the module we use in NCPA does not take into account the root reserved space for % but I actually just put in a bug report and we fixed it in the module. It should be fixed in NCPA 2.0.0.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Revise Query
I am happy to work out a PS script to pull this info. Do you have anything pre-compiled?
Re: Revise Query
This should work:
Then just pass in the disk letter, the warning percent, and the critical percent:
Code: Select all
$diskName = $Args[0]
$warning = $Args[1]
$critical = $Args[2]
$used_percent = ((gdr -PSProvider 'FileSystem' -Name "$diskName" | select @{L='used_percent';E={"{0:N2}" -f (100-(($_.free/($_.used+$_.free))*100))}}).used_percent | Out-String) -replace "`n|`r"
if ($used_percent -gt $critical) {
Write-Host "CRITICAL - Disk $diskName is $used_percent% used! (> $critical%) |'used_percent'=$used_percent%;$warning;$critical;"
exit 2
} elseif ($used_percent -gt $warning) {
Write-Host "WARNING - Disk $diskName is $used_percent% used! (> $warning%) |'used_percent'=$used_percent%;$warning;$critical;"
exit 1
} else {
Write-Host "OK - Disk $diskName is $used_percent% used. |'used_percent'=$used_percent%;$warning;$critical;"
exit 0
}Code: Select all
PS C:\scripts> .\disk_check.ps1 C 80 95
WARNING - Disk C is 90.50% used! (> 80%) |'used_percent'=90.50%;80;95;Re: Revise Query
I am trying to setup the command and the service for this script but i am having trouble. I guess i need a little more hand holding. Can you spell out the command i need to create and provide the service syntax. Sorry, I have been testing this for over an hour without success.
Thanks.
Thanks.