Get critical status from check_process when checking for high virtual memory consumtion


#1

I use naemon on Ubuntu Server and NSClient++ 0.5.0.52 on a Windows Server 2003 machine to monitor processes’ virtual memory. I want to warn when a process uses >2.3 G and assert critical when >2.5 G. I can’t get this to work.

Here is my command:

check_nrpe -H hostname --command check_process -a "warn=virtual>2.3g" "crit=virtual>2.5g" "top-syntax=%(status): %(problem_list)" "detail-syntax=%(exe)=%(virtual)" "perf-syntax=%(exe)" "ok=virtual<2.3g"

And here is the result:

CRITICAL: oracle.exe=2213641984

I expect to receive an OK since the process takes about 2,1g. I’ve tried skipping the ok-part and also added a filter with virtual<2g for instance but I can’t get it to work the way I want it to.

Anyone?


#2

It seems to be a floating point issue with filter. If I for instance replace 2.3g with 2355m, it works.