Tag: JBoss AS6

Application Monitoring using MongoDB Monitoring Service (MMS) on Openshift

Hi,

In this article we will discuss about monitoring the appliation which are deployed over Openshift. We will use MongoDB Monitoring Service (MMS) to achieve this. Application monitoring is very important for developers before and after deploying the applications in production, let that be performance measurement, some tuning or random health checks.

The MongoDB Monitoring Service (MMS) is a cloud-based monitoring service, designed by 10gen, to monitor the health of MongoDB deployments. MMS provides an agent that runs on MongoDB servers, and this agent reports information such as opcounters, memory information, number of connections, network I/O, database storage size, and more. All of this information is available in customizable charts that are displayed in your web browser.

Openshift provides us a cartridge that can be used for monitoring the MongoDB apps. Ofcourse you would need to add a MongoDB cartridge as well, but this doesn’t mean that you can not use any other databse. 🙂

I tried a sample app that uses mysql database and I was still able to get the monitoring set up for that. 🙂

Below are the steps that you need to follow to have MMS setup :

Step-1: Create a test application (in this example a java app) :

$ rhc app create -a monitoringDemo -t jbossas-7

Step-2 : Add MongoDB cartridge to above application :

$ rhc app cartridge add -a monitoringDemo -c mongodb-2.0

Step-3 : Login to https://mms.10gen.com and create an account.

Step-4 : Once done download the mms agent by clicking on “download the agent” link on the Hosts page. Extract the zip file, you will get a dir as “mms-agent”.

Step-5 : Open a terminal and navigate to your project directory, from where you executed Step-1.

Step-6 : You will see a directory created as “monitoringDemo”, move upto “.openshift” inside it :

..
[userone@userone monitoringDemo]$ ls -ltra
total 44
-rw-rw-r--.  1 userone userone    7 Jul 25 18:58 .gitignore
drwxrwxr-x.  3 userone userone 4096 Jul 25 18:58 src
-rw-rw-r--.  1 userone userone 1695 Jul 25 18:58 pom.xml
-rw-rw-r--.  1 userone userone   56 Jul 25 19:01 README.md
-rwxrwxr-x.  1 userone userone    0 Jul 25 19:09 .gitkeep
-rwxrwxr-x.  1 userone userone    0 Jul 25 19:09 mysql-connector-java-5.1.13-bin.jar.dodeploy
-rw-rw-r--.  1 userone userone 7629 Jul 25 19:09 README
drwxrwxr-x.  4 userone userone 4096 Jul 25 19:10 deployments
drwxr-xr-x.  6 userone userone 4096 Jul 25 19:10 .
drwxrwxrwx. 24 userone userone 4096 Aug  2 19:41 ..
drwxrwxr-x.  7 userone userone 4096 Aug  7 14:54 .openshift
drwxrwxr-x.  8 userone userone 4096 Aug  7 14:56 .git
[userone@userone monitoringDemo]$ pwd
/myProjDir/monitoringDemo
[userone@userone monitoringDemo]$ cd .openshift/
..

Step-7 : Create a new directory as “mms” :

..
[userone@userone .openshift]$ mkdir mms
[userone@userone .openshift]$ ls -ltra
total 28
drwxrwxr-x. 7 userone userone 4096 Jul 25 18:58 cron
drwxrwxr-x. 3 userone userone 4096 Jul 25 18:58 config
drwxrwxr-x. 2 userone userone 4096 Jul 25 18:58 action_hooks
drwxrwxr-x. 2 userone userone 4096 Jul 25 18:58 markers
drwxr-xr-x. 6 userone userone 4096 Jul 25 19:10 ..
drwxrwxr-x. 7 userone userone 4096 Aug  7 14:54 .
drwxrwxr-x. 2 userone userone 4096 Aug  7 14:55 mms
[userone@userone monitoringDemo]$ pwd
/myProjDir/monitoringDemo/.openshift
..

Step-8 : After step-4 you would have got a directory as “mms-agent” navigate inside it and copy “settings.py” file to “/myProjDir/monitoringDemo/.openshift/mms”

Note : Make sure you do that, or else MMS won’t work.

Step-9 : Navigate back to project directory add the changes to git repo, commit those changes and then push:

$ cd /myProjDir/monitoringDemo/

$ git add .openshift/mms/

$ git commit -a -m “some commit message”

$ git push

Step-10 : Now add the MMS agent cartridge to your application :

$ rhc app cartridge add -a monitoringDemo -c 10gen-mms-agent-0.1

Phewww setup is almost done, now lets make it work 🙂

Step-11 : ssh to your application :

$ ssh UUID@applicationname-namespace.rhcloud.com

for eg :

ssh 90497856323c4122a11602485445c7b2@monitoringDemo-userone.rhcloud.com

and run below command :

..
$ echo $OPENSHIFT_NOSQL_DB_URL
mongodb://admin:ABCD8YrgQth2@10.10.10.10:27017/
..

here:

* admin = MongoDB username
* ABCD8YrgQth = password
* 10.10.10.10 = IP address of your MongoDB host/node

Step-12 : Navigate to https://mms.10gen.com and click the Hosts + button at the top of the page and add all the details from the output of Step-11.

Step-13 : Click the name of the host that you want to monitor to view the available data collection streams. First time it will take some time as it needs to schedule the checks.

This is not over yet, you can also configure multiple alerts and can can customize your view according to your requirement. Pretty simple,easy, open-source monitoring 🙂

Regards,
Middlewaremagic Team


JBoss AS7 How can i be always updated !!!

Hi,

JBoss AS7 is adding many many features which were needed by admins and developers always. There are many major changes happening on this product day by day. Many new functionality and many new powers. Much better performances….etc, So the question arises how to get informed with all these changes which are developer and admin friendly and How to stay tuned with this great Application Server.

Here are few very useful links which you might have missed. Following are few very useful links which can be refered any time to get connected with the new technologies and to know what all changes are happening all around you.

1). RedHat you tube Channel:

Which gives you a visual medium to see and feel the technologies which are keep changing all around you day to day.
http://www.youtube.com/user/RedHatVideos

2). JBoss Community:

Most probably worlds most active and powerful community which connects and develops great technologies. If you have any query related to any middleware technologies then following link is your life saver.
http://community.jboss.org/

And If you want to know more about the projects which are keep running in this great community then refer to the following link:
http://www.jboss.org/projects

For Webinars views on various middleware technologies
http://www.jboss.org/webinars

3). Vimeo Videos:

If you want to learn technologies by gong through videos and video tutorials then Vimeo JBoss and redHat sessions will be the best options for you. In the below link there is a search box just type “JBoss” there and then see the magic

http://vimeo.com/25831010

4). Facebook Channel:

.       If you spend most of your time on FaceBook and love the technology at the same time then you can get in touch with this amazing Middleware Application Sever through FaceBook as well. by joining the channel:

http://www.facebook.com/jboss

http://www.facebook.com/redhatsummit

http://www.facebook.com/JBossAPAC

5). Source Codes:

If you are moving to JBoss and if you like coding and peeping inside the java codes or want to see some coded demos then you can get the whole JBoss AS Source code from the following link:

Till JBoss AS 6  http://anonsvn.jboss.org/repos/jbossas/tags/

From JBoss AS 7 Onwards : https://github.com/jbossas/jboss-as If you want to know how to use JBoss AS7 source code from github you can have a look at the following link: http://community.jboss.org/wiki/HackingOnAS7

JBoss Downloads:

How & Why to download JBoss is mentioned in the following link: http://middlewaremagic.com/jboss/?p=9
.
.
.

Which JBoss To Choose?

JBoss AS7 is a Community release and we always recommend you to use the RedHat Supported JBoss Enterprise Application Platform, There are various reasons behind this. Please refer to the Video: http://www.youtube.com/watch?v=iNFV0r9v14g&feature=player_detailpage

.
.
.
Thanks
Middleware Magic Team


How to download JBoss Server ?

Hi,

JBoss is worlds one of the most popular and reliable application server which provides you a lots of features including full customization.  It comes in two flavours

1). JBoss Community Release

2). JBoss RedHat Enterprise Release

Community Versus Enterprise JBoss Which one is Best?

The JBoss Community releases are the base of JBoss Enterprise Releases. But the JBoss Enterprise Release has many additional advantages in terms of standard life cycles and support and Many additional advantages and features which are required, mandatory and essential in running a Production environment using JBoss. For more informations of JBoss Community Release Vs JBoss Enterprise Release please refer to the following article:

JBoss Application ServerCommunity Release can be downloaded from the following link:
http://www.jboss.org/jbossas/downloads/

JBoss Enterprise Releases can be downloaded from the following link:
http://www.jboss.com/downloads/

The JBoss Enterprise release can be downloaded with “Subscription” as well as “Evaluation Version for 30 Days” In the above page you will get these options so based on your requirement you can choose.

If you already have a RedHat Subscription then you can download the software’s through the following link:
https://access.redhat.com/jbossnetwork/restricted/listSoftware.html

There are many JBoss  Community Releases and projects are going on in parallel which can be found in the following link:
http://www.jboss.org/projects/matrix

.
.
Thanks
MiddlewareMagic


Copyright © 2010-2012 Middleware Magic. All rights reserved. |