Nagios / NSclient ++ / Nrpe ignores parameters


Hello everyone,

So today i’ve been setting up my nagios server and client to monitor their physical memory, I’m using a linux nagios box and a windows server 2012 with NSClient++

So i’ve went into my nsclient.ini and changed this;

[code]; Section for NRPE (NRPEServer.dll) (check_nrpe) protocol options. [/settings/NRPE/server]

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed. allow arguments = true[/code]

this is how the default checkMem looks in my nsclient.ini

; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page

(and restarted the nsclient service)

I also defined my command in my commands.cfg

# 'check_mem' command definition define command{ command_name check_mem command_line /usr/lib64/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$ MaxCrit=$ARG2$ type=physical }

And this is how my windows.cfg looks like where I define the service:

define service{ use generic-service host_name SEY-ERP03,SEY-ERP02 service_description Physical Memory Usage check_command check_mem!85!95 }

This is how it looks when I run it manually and I ask the errorcode = 2 according to the docs this is indeed critical

[[email protected] objects]# /usr/lib64/nagios/plugins/check_nrpe -H SEY-ERP03 -p 5666 -c CheckMEM -a MaxWarn=80 MaxCrit=90 ShowAll type=physical CRITICAL: physical memory: Total: 16G - Used: 11.5G (71%) - Free: 4.55G (29%) > critical|'physical memory %'=71%;99;99 'physical memory'=12298706944B;80;90;0;17179398144 [[email protected] objects]# echo $? 2

So my question is why is nagios ignoring my parameters ? I want them to only go on warning/critical when USED PHYSICAL MEM is 85% and 95% Any help would be greatly appreciated

EDIT: some extra information this is what I can read from the webui :

Current Status: CRITICAL (for 0d 1h 6m 46s) Status Information: CRITICAL: physical memory: Total: 16G - Used: 11.5G (71%) - Free: 4.49G (29%) > critical Performance Data: 'physical memory %'=71%;100;99 'physical memory'=12360978432B;0;90;0;17179398144 Current Attempt: 3/3 (HARD state) Last Check Time: 01-23-2017 16:37:56 Check Type: ACTIVE Check Latency / Duration: 0,000 / 0,000 seconds Next Scheduled Check: 01-23-2017 16:47:56 Last State Change: 01-23-2017 15:38:53 Last Notification: 01-23-2017 15:42:53 (notification 1) Is This Service Flapping? NO (5,00% state change) In Scheduled Downtime? NO Last Update: 01-23-2017 16:45:36 ( 0d 0h 0m 3s ago)

This is my nsclient++ version:

[[email protected] ~]# /usr/lib64/nagios/plugins/check_nrpe -H SEY-ERP03 I (0,4,1,73 2012-12-17) seem to be doing fine…

This is my nrpe version:

[[email protected] ~]# /usr/lib64/nagios/plugins/check_nrpe Incorrect command line arguments supplied

NRPE Plugin for Nagios Copyright © 1999-2008 Ethan Galstad ([email protected]) Version: 2.15 Last Modified: 09-06-2013

So could this be a bug with the nsclient++ version ? or something obvious i’m missing ?


Fixed this issue by upgrading my nsclient to nsclient 5.0