Page 2 of 2
Re: Memory usage monitoring for process
Posted: Mon Feb 15, 2021 9:18 am
by kalyanpabolu
Hello,
We have tried making the changes to the script as per your suggestion and the output was altogether different. It did not give correct output.
After that I have reverted the changes and we are again getting approx 10 MB difference in the output.
Is there any other way we can monitor this?
Re: Memory usage monitoring for process
Posted: Mon Feb 15, 2021 5:01 pm
by ssax
In the windows task manager, expand the column for memory so you can see what it's showing, it's currently cutoff and is only showing
Memory (Private.... Let us know what it shows.
Try changing the plugin to use:
Code: Select all
perfcount_value="Working Set - Private"
Try this one as well:
Code: Select all
./check_nrpe -H 10.50.10.51 -p 5666 -t 60 -c CheckCounter -a 'Counter:JavaService=\Process(JavaService)\Working Set- Private' ShowAll
Re: Memory usage monitoring for process
Posted: Tue Feb 16, 2021 9:35 am
by kalyanpabolu
Hello,
PFA the complete screenshot for your reference. If you compare the output with the screenshot value, we can see 10 MB difference.
[root@monprdmgtss03 plugins]# ./check_process_memory.sh -H 10.50.10.51 -p 12489 -P JavaService -w 1000 -c 5000
WARNING: Used Memory of JavaService: 1769 MB|UsedMemory=1769;1000;5000;;
[root@monprdmgtss03 plugins]#
Also, I tried all below commands.
[root@monprdmgtss03 plugins]# ./check_nrpe -H 10.50.10.51 -p 5666 -t 60 -c CheckCounter -a 'Counter:JavaService=\Process(JavaService)\Working Set- Private' ShowAll
CRIT: Counter not found: \Process(JavaService)\Working Set- Private: The specified counter could not be found. (C0000BB9)
[root@monprdmgtss03 plugins]#
[root@monprdmgtss03 plugins]# ./check_nrpe -H 10.50.10.51 -p 5666 -t 60 -c CheckCounter -a 'Counter:JavaService=\Process(JavaService)\Private Working Set' ShowAll CRIT: Counter not found: \Process(JavaService)\Private Working Set: The specified counter could not be found. (C0000BB9)
[root@monprdmgtss03 plugins]#
[root@monprdmgtss03 plugins]# ./check_nrpe -H 10.50.10.51 -p 5666 -t 60 -c CheckCounter -a 'Counter:JavaService=\Process(JavaService)\Memory(Private Working Set)' ShowAll
CRIT: Counter not found: \Process(JavaService)\Memory(Private Working Set): The specified counter could not be found. (C0000BB9)
[root@monprdmgtss03 plugins]#
Please suggest.
Re: Memory usage monitoring for process
Posted: Tue Feb 16, 2021 6:20 pm
by ssax
You were really close (you were missing a space before the dash, there is a space before and after the dash), try this one:
Code: Select all
./check_nrpe -H 10.50.10.51 -p 5666 -t 60 -c CheckCounter -a 'Counter:JavaService=\Process(JavaService)\Working Set - Private' ShowAll
Re: Memory usage monitoring for process
Posted: Wed Feb 17, 2021 11:17 am
by kalyanpabolu
Hello,
Thanks a lot!!
it is working fine now.
[root@monprdmgtss03 plugins]# ./check_process_memory.sh -H 10.50.10.51 -p 12489 -P JavaService -w 1000 -c 5000
WARNING: Used Memory of JavaService: 1855 MB|UsedMemory=1855;1000;5000;;
[root@monprdmgtss03 plugins]#
Could you please help me with command and service definition here.
Re: Memory usage monitoring for process
Posted: Wed Feb 17, 2021 6:40 pm
by ssax
Put the plugin in
/usr/local/nagios/libexec and do this:
Code: Select all
chown apache.nagios /usr/local/nagios/libexec/check_process_memory.sh
chmod ug+x /usr/local/nagios/libexec/check_process_memory.sh
Command Name: check_process_memory
Command Line:
Code: Select all
$USER1$/check_process_memory.sh -H $HOSTADDRESS$ -p 12489 -P '$ARG1$' $ARG2$
On your service:
Check Command: check_process_memory
$ARG1$: JavaService
$ARG2$: -w 1000 -c 5000
See here for any questions:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Memory usage monitoring for process
Posted: Wed Feb 24, 2021 12:18 pm
by kalyanpabolu
Hello,
Thank you for your support!!
We are good to close the ticket.
Re: Memory usage monitoring for process
Posted: Wed Feb 24, 2021 12:23 pm
by scottwilkerson
kalyanpabolu wrote:Hello,
Thank you for your support!!
We are good to close the ticket.
Locking thread