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.
For this configuration we are going to use our Linux Shell Script Sensor. This Sensor provides the maximum flexibility.
ramkin-connectors
db2connect.sh
db2jcc4.jar --> jdbc driver for your DB2 version
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
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
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
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
This is just a simple example how you can perform a connectivity test against a DB2 Database our of GreenLight