Page 1 of 1

Wrong thresholds on the web interface

Posted: Mon Jul 16, 2018 8:27 am
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

Re: Wrong thresholds on the web interface

Posted: Tue Jul 17, 2018 7:53 am
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.

Re: Wrong thresholds on the web interface

Posted: Tue Jul 17, 2018 8:35 am
by ChCDL
Yes !! It's this, thanks a lot mcapra :)

Re: Wrong thresholds on the web interface

Posted: Tue Jul 17, 2018 9:31 am
by tmcdonald
Did you have further (related) questions or are we good to lock this up?

Re: Wrong thresholds on the web interface

Posted: Fri Jul 20, 2018 1:53 am
by ChCDL
Yes it's good for me, thanks again