Wrong thresholds on the web interface

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ChCDL
Posts: 11
Joined: Mon Jul 16, 2018 7:35 am

Wrong thresholds on the web interface

Post by ChCDL »

Hello everybody,

On my Nagios server (localhost), when I execute in command line a check_disk, I have this :
check-disk.JPG
and on the web interface :
web.JPG
I don't understand why I don't have the good values like on the result of the command line and if I modify the critical's thresholds or warning, the web interface is still on OK.

Here my config file of the service :
service check-disk.JPG
The nagios service was restart and I've checked my config with : /opt/nagios/bin/nagios -v /etc/nagios/nagios.cfg
All is fine

Thanks in advance

Best Regards
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Wrong thresholds on the web interface

Post by mcapra »

Your execution from the CLI contains a percentage, but your service definition only contains an integer. check_disk supports both percent and integer values and has different behaviors depending on what you pass it:

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
If you want to be alerted when the disk availability falls below a certain percentage, I would recommend including a percentage value passed to the warning/critical args in your service definition.
Former Nagios employee
https://www.mcapra.com/
ChCDL
Posts: 11
Joined: Mon Jul 16, 2018 7:35 am

Re: Wrong thresholds on the web interface

Post by ChCDL »

Yes !! It's this, thanks a lot mcapra :)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Wrong thresholds on the web interface

Post by tmcdonald »

Did you have further (related) questions or are we good to lock this up?
Former Nagios employee
ChCDL
Posts: 11
Joined: Mon Jul 16, 2018 7:35 am

Re: Wrong thresholds on the web interface

Post by ChCDL »

Yes it's good for me, thanks again
Locked