LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using jboss objects (https://www.linuxquestions.org/questions/linux-newbie-8/using-jboss-objects-882576/)

brownie_cookie 05-25-2011 02:11 AM

using jboss objects
 
Hi all

I need to make a script that controls or checks certain assets of a JBoss server. Like if the server is running or down, or how much memory he uses, etc.
Now, via the website of Nagios, i've found a script which i can use

Code:

# ./check_mbean_collector -H host -p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400
JMX attribute ActiveThreadCount has value 63|jboss.system:type=ServerInfo:ActiveThreadCount=63

So this is an example of it working, but now i want to check the used memory and when the free memory gets below a certain value, i need to get a CRIT...
Where can i find the things i need to check on this?
On the JBoss server i get an overview of everything, but i really don't have a clue where to start looking...

Can someone help me with this ^^?

:hattip: thanks in advance

brownie_cookie 05-25-2011 02:31 AM

UPDATE

okay, i've found it :p
Code:

# ./check_mbean_collector -H host -p 5566 -m jboss.system:type=ServerInfo -a FreeMemory -w 460280464 -c 500000000
JMX attribute FreeMemory has value 404803920|jboss.system:type=ServerInfo:FreeMemory=404803920

so i geuss the memory is in bytes?
but that doesn't matter, so when i run this i get the result as you see above
when i run this through Centreon/Nagios i get an Ok or CRIT or whatever when the value gets above a certain value.
So actually i get a WARNING when the free memory gets ABOVE a certain value (that doesn't make sense.. because i need to know when it gets BELOW a certain value...)
how can i manage this?

Thanks :hattip:

nasiruddin 07-22-2011 01:58 AM

NRPE unable to read output
 
hi
i am using the same plugin its showing the output as you have given when executed directly but when i am tryingto execute it through NRPE is showing "NRPE unable to read output".
May i know how do you incorporated this plugin in your nagios.


All times are GMT -5. The time now is 03:45 AM.