Question with check_mem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Leoncia

Re: Question with check_mem

Post by Leoncia »

Ok, it works!

Can I change to GB? I am trying with ShowAll=long but doesn't work
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Question with check_mem

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Leoncia

Re: Question with check_mem

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Question with check_mem

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Leoncia

Re: Question with check_mem

Post 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:
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Question with check_mem

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked