Page 1 of 1

Problems with Check_Disk

Posted: Thu Jun 11, 2015 7:32 am
by jal1992
Dear Community,

first off all i wanna say that i'm an newbie at Nagios.

I got problems with Check_Disk at NRPE.

I wanna check the Space of /dev/sda1

with check_disk -w 85% -c 90% -p /dev/sda1

But i get response

Linux_Festplattenspeicher KRITISCH 0 Tage, 5 Stunden, 26 Minuten DISK CRITICAL - free space: /dev 10 MB (100% inode=99%):

Hopefully someone can help me , if you need more information just ask for

Greetings JAL

Re: Problems with Check_Disk

Posted: Thu Jun 11, 2015 9:57 am
by jdalrymple
I'm assuming that you're confused by the thresholds:

Code: Select all

 -w, --warning=INTEGER
    Exit with WARNING status if less than INTEGER units of disk are free
 -w, --warning=PERCENT%
    Exit with WARNING status if less than PERCENT of disk space is free
 -c, --critical=INTEGER
    Exit with CRITICAL status if less than INTEGER units of disk are free
 -c, --critical=PERCENT%
    Exit with CRITICAL status if less than PERCENT of disk space is free
I think you probably want:

Code: Select all

check_disk -w 15% -c 10% -p /dev/sda1
Does that make based upon the usage?

Re: Problems with Check_Disk

Posted: Fri Jun 12, 2015 1:45 am
by jal1992
Ok, thx this fixed one of my problems

But i want to check the disk /dev/sda1 with ~10 GB, but it seems for me that it checks /dev with only 10 MB !?

Re: Problems with Check_Disk

Posted: Fri Jun 12, 2015 6:25 am
by lmiltchev
Then you can pass the "unit" flag to specify "GB" (- u), for example:

Code: Select all

./check_disk -u GB -w 15 -c 10 -p /dev/sda1
-u, --units=STRING
Choose bytes, kB, MB, GB, TB (default: MB)
You can review the plugin's usage by running:

Code: Select all

./check_disk -h