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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Need Help in Configuring Process Memory Usage

Post 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?
Former Nagios Employee.
me.
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Need Help in Configuring Process Memory Usage

Post 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
Former Nagios Employee.
me.
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post 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]#
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 »

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?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
CloudOps
Posts: 88
Joined: Mon Feb 08, 2016 12:52 am

Re: Need Help in Configuring Process Memory Usage

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need Help in Configuring Process Memory Usage

Post 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
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: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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need Help in Configuring Process Memory Usage

Post 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?
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: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?
You do not have the required permissions to view the files attached to this post.
Locked