Problems with Check_Disk

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jal1992
Posts: 2
Joined: Thu Jun 11, 2015 7:22 am

Problems with Check_Disk

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Problems with Check_Disk

Post 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?
jal1992
Posts: 2
Joined: Thu Jun 11, 2015 7:22 am

Re: Problems with Check_Disk

Post 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 !?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems with Check_Disk

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked