Question with check_mem
-
Leoncia
Question with check_mem
Hi,
I have a problem with the check_mem. When I monitor a service memory with this check, it checks the virtual memory plus the physical memory and I just want to know the Virutal memory; is there a type of argument for this check to achieve this?
I have Nagios XI and I am using check_nrpe and later in the argument I call the check_memory
Thanks
I have a problem with the check_mem. When I monitor a service memory with this check, it checks the virtual memory plus the physical memory and I just want to know the Virutal memory; is there a type of argument for this check to achieve this?
I have Nagios XI and I am using check_nrpe and later in the argument I call the check_memory
Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Question with check_mem
Hello and welcome to the forum!
Are you using a windows system or Linux system? If Linux, can you attach the plugin you are using?
Are you using a windows system or Linux system? If Linux, can you attach the plugin you are using?
-
Leoncia
Re: Question with check_mem
Hi!
Thank you for the welcoming
Well, I am using a Linux system and the plugin I am using is check_nt and the command line that I use is this one:
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
Later in the argument 2 I am using "MEMUSE"
Thanks
Thank you for the welcoming
Well, I am using a Linux system and the plugin I am using is check_nt and the command line that I use is this one:
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
Later in the argument 2 I am using "MEMUSE"
Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Question with check_mem
To remove virtual memory you are going to want to use check_nrpe, see an example here
https://support.nagios.com/kb/article.php?id=774
https://support.nagios.com/kb/article.php?id=774
-
Leoncia
Re: Question with check_mem
I want to see just the virtual memory. For what I see in the page, NCPA can do it, isn't?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Question with check_mem
Yes, but NSClient can too, listed on that page in this section:Leoncia wrote:I want to see just the virtual memory. For what I see in the page, NCPA can do it, isn't?
NSClient++ via check_nrpe
To only check the physical memory the type= argument can be used:
Command:Output:Code: Select all
./check_nrpe -H 10.25.14.10 -c check_memory -a type=physical 'warn=free<20%' 'crit=free<10%'Code: Select all
OK: physical = 2.101GB|'physical'=3.89902GB;1.19991;0.59995;0;5.99956 'physical %'=64%;19;9;0;100
-
Leoncia
Re: Question with check_mem
I did a new command and I wrote the next line:
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=virtual MaxWarn=$ARG1$ MaxCrit=$ARG2$
And it says:
CHECK_NRPE: Invalid packet type received from server.
I try it too with the type=physical and says the same thing.
I have correct connetion to the port 5666:
telnet 10.16.70.200 5666
Trying 10.16.70.200...
Connected to 10.16.70.200.
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=virtual MaxWarn=$ARG1$ MaxCrit=$ARG2$
And it says:
CHECK_NRPE: Invalid packet type received from server.
I try it too with the type=physical and says the same thing.
I have correct connetion to the port 5666:
telnet 10.16.70.200 5666
Trying 10.16.70.200...
Connected to 10.16.70.200.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Question with check_mem
Try this
where
$ARG1$ = 80
$ARG2$ = 90
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_memory -a type=physical 'warn=used>$ARG1$%' 'crit=used>$ARG2$%'$ARG1$ = 80
$ARG2$ = 90
-
Leoncia
Re: Question with check_mem
It works perfectly in the service that I was testing:
OK: |'virtual'=0.00011TB;102.4;115.2;0;128 'virtual %'=0%;79;89;0;100
But, I try to copy it to other hosts and reponds the next:
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
I think it's because of the nsclient.ini, that in the first one there is something that in others is not
OK: |'virtual'=0.00011TB;102.4;115.2;0;128 'virtual %'=0%;79;89;0;100
But, I try to copy it to other hosts and reponds the next:
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
I think it's because of the nsclient.ini, that in the first one there is something that in others is not
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Question with check_mem
in the section
You need
then you will need to restart nsclient++
Code: Select all
[/settings/NRPE/server]Code: Select all
allow nasty characters = 1
allow arguments = 1