Page 1 of 1
Error with Quota thresholds
Posted: Thu Jul 23, 2020 10:05 pm
by Srinija544
Hello All,
We have a quote service where the threshold values are configured as warn-10 and crit-5.
Even 79.83% is used, we are getting critical alerts which is wrong.
Please find the attached script and help me in resolving this alert.
Check-command:
check_quota_prophet_data_non_prod=check_quota.ps1 -Path "E:\Shares\PROPHET_DATA_NON_PROD" -Warn 5 -Crit 3
Thanks in Advance.
Srinija.
Re: Error with Quota thresholds
Posted: Fri Jul 24, 2020 5:05 pm
by benjaminsmith
HI,
I would recommend printing out some of the values in your script, the likely case here is that the script is not parsing/computing the space correctly.
Code: Select all
try {
$gbUsage = "{0:n2} GB" -f ($quotaObject.Usage / 1GB)
$gbLimit = "{0:n2} GB" -f ($quotaObject.Size / 1GB)
$percentUsed = "{0:n2}" -f ($quotaObject.Usage / $quotaObject.Size * 100)
$percentFree = "{0:n2}" -f (100 - $quotaObject.Usage / $quotaObject.Size * 100)
$perfData = "usage=$($quotaObject.Usage)B;$warn;$crit;0; limit=$($quotaObject.Size)B;;;;"
}
Also, you can probably achieve a similar check using the NCPA agent. Take a look at the API documentation:
https://www.nagios.org/ncpa/help.php#api-modules-disk
Let me know if that's an option.
Benjamin
Re: Error with Quota thresholds
Posted: Sun Jul 26, 2020 2:24 am
by srinija1994
HI Benjamin,
Thanks for your response.
I have checked the attached URL but unfortunately it doesn't match our issue.
The drives size is not capturing correctly with the any scripts provided.
could you please let me know any other option for this?
Regards,
Srinija.
Re: Error with Quota thresholds
Posted: Mon Jul 27, 2020 9:13 pm
by srinija1994
Hi All,
Unable to get the correct space details from the attached script.
Can any one please help me on this issue.
Thanks in Advance.
Srinija.