Page 2 of 2

Re: Question with check_mem

Posted: Wed Dec 04, 2019 11:25 am
by Leoncia
Ok, it works!

Can I change to GB? I am trying with ShowAll=long but doesn't work

Re: Question with check_mem

Posted: Wed Dec 04, 2019 11:29 am
by scottwilkerson
I believe you can add 'perf-config=*(unit:G)'

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=physical 'perf-config=*(unit:G)' 'warn=used>$ARG1$%' 'crit=used>$ARG2$%'
Re:
https://docs.nsclient.org/reference/win ... eck_memory

Re: Question with check_mem

Posted: Thu Dec 05, 2019 6:29 am
by Leoncia
Ok, perfect!!

One last thing, in the User part, I want to show the used and the free, something like this:

Memory usage: total:18770,70 MB - used: 4193,00 MB (22%) - free: 14577,70 MB (78%)

But I got:

OK: physical = 3.419GB

And I thought that it was with the show-all

How do I get It?

Thanks!

Re: Question with check_mem

Posted: Thu Dec 05, 2019 7:42 am
by scottwilkerson
Something like this

Code: Select all

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=physical 'perf-config=*(unit:G)' 'detail-syntax=Memory usage: total:${size} - used: ${used} (${used_pct}) - free: ${free} (${free_pct})' 'warn=used>$ARG1$%' 'crit=used>$ARG2$%'
https://docs.nsclient.org/reference/win ... ail-syntax

Re: Question with check_mem

Posted: Thu Dec 05, 2019 9:46 am
by Leoncia
Ok, I tried it and doesn't work. I even try to simplify the command to see if it worked:

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=physical 'detail-syntax=Memory usage: total:${size} - used: ${used} (${used_pct}) - free: ${free} (${free_pct})'

And in the User part just shows this:

OK:

Re: Question with check_mem

Posted: Thu Dec 05, 2019 9:55 am
by scottwilkerson
This is a bit out of the scope for us as NSClient++ isn't even our project.

I would suggest looking through https://docs.nsclient.org/reference/win ... ail-syntax and possible asking the developer directly