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?
Memory usage monitoring for process
-
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Memory usage monitoring for process
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:
Try this one as well:
Try changing the plugin to use:
Code: Select all
perfcount_value="Working Set - Private"
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
-
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Memory usage monitoring for process
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.
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.
You do not have the required permissions to view the files attached to this post.
Re: Memory usage monitoring for process
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
-
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Memory usage monitoring for process
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.
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
Put the plugin in /usr/local/nagios/libexec and do this:
Command Name: check_process_memory
Command Line:
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
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 Line:
Code: Select all
$USER1$/check_process_memory.sh -H $HOSTADDRESS$ -p 12489 -P '$ARG1$' $ARG2$
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
-
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Memory usage monitoring for process
Hello,
Thank you for your support!!
We are good to close the ticket.
Thank you for your support!!
We are good to close the ticket.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Memory usage monitoring for process
Locking threadkalyanpabolu wrote:Hello,
Thank you for your support!!
We are good to close the ticket.