Page 2 of 3

Re: Need Help in Configuring Process Memory Usage

Posted: Tue Mar 15, 2016 4:35 pm
by hsmith
Box293 wrote: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.

Have you reviewed this article?

Re: Need Help in Configuring Process Memory Usage

Posted: Wed Mar 16, 2016 10:58 am
by CloudOps
hsmith wrote:
Box293 wrote: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.

Have you reviewed this article?
Hi hsmith,

I have checked it that why i have set MB in my command. but still output was coming in bytes. Can you guide?

Re: Need Help in Configuring Process Memory Usage

Posted: Wed Mar 16, 2016 3:22 pm
by hsmith
What happens if you try this from the command line? It's not going to give you oracle information, but I want to see if it gives the right unit

./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=500 MinCrit=256

Re: Need Help in Configuring Process Memory Usage

Posted: Wed Mar 16, 2016 5:00 pm
by CloudOps
hsmith wrote:What happens if you try this from the command line? It's not going to give you oracle information, but I want to see if it gives the right unit

./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=500 MinCrit=256
Please find the Out of what you have requested :

[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.13 -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=500 MinCrit=256
OK: Memory Available: 4048|'Memory Available'=4048;500;256
[root@VM-NAGIOSXI-TEST libexec]#

Re: Need Help in Configuring Process Memory Usage

Posted: Thu Mar 17, 2016 1:45 pm
by lmiltchev
It seems like that the check produces the expected output (in MB).
example01.PNG

Code: Select all

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=500 MinCrit=256
OK: Memory Available = 29052|'Memory Availablenone'=29052;500;256

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=30000 MinCrit=20000
WARNING: Memory Available = 28959|'Memory Availablenone'=28959;30000;20000

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=40000 MinCrit=30000
CRITICAL: Memory Available = 28958|'Memory Availablenone'=28958;40000;30000
Is this what you were trying to accomplish?

Re: Need Help in Configuring Process Memory Usage

Posted: Thu Mar 17, 2016 4:40 pm
by CloudOps
lmiltchev wrote:It seems like that the check produces the expected output (in MB).
example01.PNG

Code: Select all

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=500 MinCrit=256
OK: Memory Available = 29052|'Memory Availablenone'=29052;500;256

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=30000 MinCrit=20000
WARNING: Memory Available = 28959|'Memory Availablenone'=28959;30000;20000

[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c CheckCounter -a "Counter:Memory Available=\\Memory\\Available MBytes" ShowAll MinWarn=40000 MinCrit=30000
CRITICAL: Memory Available = 28958|'Memory Availablenone'=28958;40000;30000
Is this what you were trying to accomplish?

Hi Lmiltchev,

I want to monitor Memory usage (IN MB) of any process using checkcounter with thresholds. But i am getting the output in Bytes. :

[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 i wanted to set threshold value for CPU usage of any process :

./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

Re: Need Help in Configuring Process Memory Usage

Posted: Thu Mar 17, 2016 4:56 pm
by rkennedy
When you look at the actual counter in Windows, how is it displayed? Can you show us a screenshot?

This second one looks like you spelt oracle wrong -

Code: Select all

./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

Re: Need Help in Configuring Process Memory Usage

Posted: Thu Mar 17, 2016 5:22 pm
by CloudOps
rkennedy wrote:When you look at the actual counter in Windows, how is it displayed? Can you show us a screenshot?

This second one looks like you spelt oracle wrong -

Code: Select all

./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

Hi rkennedy,

checkcounter for CPU is giving correct output, i just want to set value for critical and warning. Main issue is with Process memory usage, i want output in MB,currently its giving out in Bytes.

Re: Need Help in Configuring Process Memory Usage

Posted: Fri Mar 18, 2016 10:26 am
by rkennedy
Got it.

Can you navigate to the Performance Monitor on windows, and when you look at the actual counter, what type is it displayed as? Can you show us a screenshot?

Re: Need Help in Configuring Process Memory Usage

Posted: Mon Mar 21, 2016 10:03 am
by CloudOps
rkennedy wrote:Got it.

Can you navigate to the Performance Monitor on windows, and when you look at the actual counter, what type is it displayed as? Can you show us a screenshot?
Hi rkennedy,

Today when i was checking the cpu usage of a process, i am getting wrong information :

[root@VM-NAGIOSXI-TEST libexec]# ./check_nrpe -H 172.26.2.137 -c CheckCounter -a "Counter:oracel_CPU_Usage_in%=\Process(oracle)\% Processor Time" ShowAll MaxWarn=80 MaxCrit=90
CRITICAL: oracel_CPU_Usage_in% = 99|'oracel_CPU_Usage_in%none'=99;80;90

but when i am checking for the cpu usage of oracle, its just 25 % usage. but result which i am getting is completely different.

please help to get the correct values?