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.
Error with Quota thresholds
-
Srinija544
- Posts: 58
- Joined: Mon Oct 15, 2018 9:30 pm
Error with Quota thresholds
- Attachments
-
Quota Script.txt- (1.72 KiB) Downloaded 129 times
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Error with Quota thresholds
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.
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
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;;;;"
}
https://www.nagios.org/ncpa/help.php#api-modules-disk
Let me know if that's an option.
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
srinija1994
- Posts: 4
- Joined: Thu Jul 23, 2020 9:29 pm
Re: Error with Quota thresholds
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.
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.
-
srinija1994
- Posts: 4
- Joined: Thu Jul 23, 2020 9:29 pm
Re: Error with Quota thresholds
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.
Unable to get the correct space details from the attached script.
Can any one please help me on this issue.
Thanks in Advance.
Srinija.