Introduction

Individual applications such as IBM Connections, IBM Traveler, IBM Sametime, etc.. are using mainly DB2 Databases in the back-end. Therefore it is pretty important to monitor the connectivity against these Databases o a regular basis. 

The following example demonstrates how you can achieve a simple DB2 connectivity check with GreenLight.


Configuration

For this configuration we are going to use our Linux Shell Script Sensor. This Sensor provides the maximum flexibility.

  • Before you can perform this DB2 connectivity check you need to request the following files from panagenda support. At the moment these files are not part of the appliance. In addition to that the customer has to upload the right DB2 jdbc driver to the virtual appliance box.

 
 ramkin-connectors
 db2connect.sh   
 db2jcc4.jar                --> jdbc driver for your DB2 version

 

 

  •   open/modify the db2connect.sh file

        enter the password for the db2 database next to "password= "

            e.g.
                DB2Result=`java -Dgl.jdbc.url="jdbc:db2://"$1":"$3"/"$4":user="$5";password=mypassword;" -c

 

 

  • upload these files to your GreenLight appliance

        create a folder db2 underneath of /opt/panagenda/share
            ==> /opt/panagenda/share/db2

        * upload  the db2jcc4.jar AND ramkin-connectors-1.0.jar into that folder

        * upload DB2Connect.sh to /opt/panagenda/scripts/gl_sensors

 

  • create a Linux Shell Script Action (GreenLight Frontend)
    in this example we want to check the database connectivity against the homepage db of IBM Connections

Filename:      DB2Connect

        Parameters:    
                Portnumber
                db name
                username

            e.g.
                50000
                homepage
                lcuser       

 

 

 

 

 

        on the Targets Tab  please add your DB2 server
        Make sure that you use the FQDN of the DB2 server
            e.g

 

 

Result:

 

 

Whenever the measurement was successful you get the value 1
        if it was not successful you get a 0 back

 

So you could use this information then for an action
        e,g.,

 

 

 

copy/paste:        ${result.details['greenlight.shell.script.db2.check.successful']!=1}

 

 

 

As you already know from other example, you could even depict this information on the Health Grid Level

Conclusion

This is just a simple example how you can perform a connectivity test against a DB2 Database our of GreenLight