Need Help in Configuring Process Memory Usage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Need Help in Configuring Process Memory Usage

Post by CloudOps »

Hi All,

I am trying to configure process memory usage on windows but getting bellow errro :

Plugin : https://exchange.nagios.org/directory/P ... ng/details

[root@VM-NAGIOSXI-TEST libexec]# ./check_process_memory.sh -H 172.26.2.12 -p 1248 -P java.exe -w 85 -c 90
(standard_in) 1: illegal character: R
(standard_in) 1: illegal character: I
(standard_in) 1: illegal character: T
(standard_in) 1: illegal character: I
(standard_in) 1: syntax error
(standard_in) 1: illegal character: L
(standard_in) 1: illegal character: S
(standard_in) 1: syntax error
./check_process_memory.sh: line 67: [: -ge: unary operator expected
./check_process_memory.sh: line 71: [: -ge: unary operator expected
OK: Used Memory of java.exe: MB|UsedMemory=;85;90;;
[root@VM-NAGIOSXI-TEST libexec]#


Can any one tell what i am missing? is there any other way to monitor memory or CPU usage of single process?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need Help in Configuring Process Memory Usage

Post by rkennedy »

What is the result if you run the command using check_nt? It looks like this script is just parsing the data that check_nt would produce.
Former Nagios Employee
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post by CloudOps »

rkennedy wrote:What is the result if you run the command using check_nt? It looks like this script is just parsing the data that check_nt would produce.
Hi Kennedy, Can you tell me command to run it??
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post by CloudOps »

Hello Kennedy,

i am able to get information using checkcounter, i want to set critical and warning alerts for this counter, can you guide me on this??

For CPU

[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:oracel_CPU_Usage_in%=\\Process(oracle)\\% Processor Time" ShowAll
OK: oracel_CPU_Usage_in%: 0|'oracel_CPU_Usage_in%'=0


For Memory :

[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:oracle_Memory_Usage_inBytes=\\Process(oracle)\\Working Set" ShowAll
OK: oracle_Memory_Usage_inBytes: 1.42291e+009|'oracle_Memory_Usage_inBytes'=1422909440


Also for memory can we get the output in MB? currently its giving output in bytes. Please help me on this.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Need Help in Configuring Process Memory Usage

Post by lmiltchev »

Can you open the "Performance Monitor", right-click on both counters, select "Properties", and show us a screenshot of the window?
Be sure to check out our Knowledgebase for helpful articles and solutions!
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Need Help in Configuring Process Memory Usage

Post by jolson »

i want to set critical and warning alerts for this counter, can you guide me on this??
You can set them in your check command itself - see this documentation: http://docs.nsclient.org/reference/Chec ... eckcounter
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Need Help in Configuring Process Memory Usage

Post by Box293 »

This KB article shows examples with warning and critical values:

https://support.nagios.com/kb/article.php?id=127
CloudOps wrote:Also for memory can we get the output in MB? currently its giving output in bytes. Please help me on this.
I don't beleive NSClient++ has a way of converting values, you would have to write a wrapper script to do that.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post by CloudOps »

jolson wrote:
i want to set critical and warning alerts for this counter, can you guide me on this??
You can set them in your check command itself - see this documentation: http://docs.nsclient.org/reference/Chec ... eckcounter

Hello Jolson,

I tried but not succeeded. Can you give me some example?? for process CPU usage also,can we use same check counters with critical and warning?? Please give me some example for understanding.

Thanks,
Shailesh
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need Help in Configuring Process Memory Usage

Post by rkennedy »

Can you show us what you attempted to do that didn't work so we can go from there?
Former Nagios Employee
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post by CloudOps »

rkennedy wrote:Can you show us what you attempted to do that didn't work so we can go from there?
Hi rkennedy,

I tried this but giving value as critical

CRITICAL: oracle_Memory_Usage_inBytes: 1.47789e+009 > critical|'oracle_Memory_Usage_inBytes'=1477894144;80;90
[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:oracle_Memory_Usage_inBytes=\\Process(oracle)\\Working Set" ShowAll MaxWarn=80 MaxCrit=90
CRITICAL: oracle_Memory_Usage_inBytes: 1.47449e+009 > critical|'oracle_Memory_Usage_inBytes'=1474490368;80;90
[root@VM-NAGIOSXI-TEST libexec]#


Also the output which i am getting is different. both are different values[ Screenshot attached]

I have added also tried to get Output in MB But its not giving :

[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:oracle_Memory_Usage_inMBytes=\\Process(oracle)\\Working Set" ShowAll MaxWarn=80 MaxCrit=90
CRITICAL: oracle_Memory_Usage_inMBytes: 1.47677e+009 > critical|'oracle_Memory_Usage_inMBytes'=1476771840;80;90
You do not have the required permissions to view the files attached to this post.
Locked