Missing -l parameters



I’ve recently installed Nagios 3.0.6 under Ubuntu 9.10 using Ubuntu apt-get and the installation worked fine. I’m using Nagion for monitor some windows and linux servers, but with commands check_nt that uses -l arguments doesn’t work.

Check_nt commands as UPTIME or MEMUSE are working fine, but others like PROCSTATE, USEDDISKSPACE or CPULOAD are not working. For example:

    check_command           check_nt!USEDDISKSPACE! -l c -w 80 -c 90

This one returns “missing -l parameters”.

The same happens with

    check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe

I’ve tried with many windows servers, changing arguments (the default that comes with windows.cfg also fails) and searching across internet I don’t find any issue about that.

forgiveness for my English level.

Thanks in advance.


have you tried running them from command line first?


In command line it works fine:

./check_nt -H -p 12489 -v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90
CPU Load 1% (5 min average) 2% (10 min average) | ‘5 min avg Load’=1%;80;90;0;100 ‘10 min avg Load’=2%;80;90;0;100

The same arguments in config file returns missing -l parameters.

Config file:

    check_command           check_nt!CPULOAD! -w 80 -c 90 -l 5,80,90,10,80,90

Any idea?



yes, you’re probably doing it wrong :slight_smile:

look here: nagios.sourceforge.net/docs/3_0/macros.html
Have a look at example 2.

Check how your command is defined in the commads.cfg file and in the services and see how it would expand.

You can’t simply add something at the end of a command and expect it to work. :slight_smile:


Fine, now it’s working.

If I make my own commands it works fine.

For example: If I write this command in commands.cfg

    command_name    check_cpu
    command_line    /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90 -p 12489

It works, but if I call check_nt directly from the service it doesn’t work (calling check_nt directly is said in de configuracion manual). But anyway now is working fine.



Your problem was in how you used the parameters.
If you don’t need any parametric value because all servers should have the same thresholds, how you have it now is ok.