Disk space alert based on GB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sahilrana
Posts: 32
Joined: Sat Feb 20, 2021 6:55 am

Disk space alert based on GB

Post by sahilrana »

Hi Team,

I am trying to set the disk space alerts based on GB instead of % since the disk size is large.
So I set critical alert at free space less than 200 GB. The drive size is 14 TB. I used the below command in the argument.

-t 'xxxxxxxx' -P 5693 -M 'disk/logical/M:|/free' -w 250 -c 200: -u G

When I run it to see the result I get this

OK: Free was 2116.22 GB | 'free'=2116.22GB;250:;200:;

But the actual free size on the drive is 1.92 TB = 1966 GB. So there is a difference of 160 GB.

When I changed GB to MB in the command the difference was down to 100 GB.

So is it because of conversion ? Still looks like a huge difference when setting up the alerts. Do you guys have any advise?
Last edited by ssax on Thu May 06, 2021 4:56 pm, edited 1 time in total.
Reason: Removed token from command
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk space alert based on GB

Post by ssax »

What does this one show?

Code: Select all

-t 'xxxxxxxx' -P 5693 -M 'disk/logical/M:|/free' -w 250 -c 200: -u Gi
sahilrana
Posts: 32
Joined: Sat Feb 20, 2021 6:55 am

Re: Disk space alert based on GB

Post by sahilrana »

Tried what you shared. -t '***********' -P 5693 -M 'disk/logical/C:|/free' -w 250: -c 200: -u Gi
It gave a weird result. For the same server it is now showing only 30 GB free whereas the free space is 1.2 TB.

CRITICAL: Free was 30.27 GiB | 'free'=30.27GiB;250:;200:;
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk space alert based on GB

Post by ssax »

Your original post was using M: but the one you just sent is showing C:, could that be related?
sahilrana
Posts: 32
Joined: Sat Feb 20, 2021 6:55 am

Re: Disk space alert based on GB

Post by sahilrana »

Sorry, my bad.
Yup, looks like using Gi gives a close result. This should solve the issue. Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disk space alert based on GB

Post by scottwilkerson »

sahilrana wrote:Sorry, my bad.
Yup, looks like using Gi gives a close result. This should solve the issue. Thanks.
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked