nagios monitors db2 and websphere

Trevor Warren trevorwarren at gmail.com
Wed Feb 2 12:19:48 CET 2005


Hey folks,

A 10min howto on going about using Nagios to monitor DB2 and WAS.
Please use this a very..very basic framework and modify/enhance the
same to suit your needs.

         	> Monitoring DB2 < 

> Deploy the NRPE daemon on DB2 host(My hosts all are AIX 5.2 risc boxen).
> Write DB2 scripts to perform db2 snaps. This is in essence calling of a db2 snap
 application to create snapshots of the current instance.
> Parse this file using bash-awk-sed-perl or whatever you see fit and generate a text file output consisting of a one liner like the following:

"Buffer Pool Hit Ratio NA since no Active Applns : Buffer Pool is NA"
"DB2 Locks and Lock Waits held OK DB2 Locks held Currently : 4 and DB2
Lock Waits : 18"
"DB2 Max Connections CRITICAL : No of Current Connections is 155 "

  
 These are the output text files each line representing one file that
is created in a heirarchical structure on the db2 node. Follow these
steps towards getting alerts raised.

> DB2 snap dumps o/p to a file
> bash-awk-sed-perl to parse for relevant info and dumps it into another o/p file
> third script to see the o/p of the previous step, print a one liner(Please ensure only a line) as shown in the example above and most importantly triggers of a alert in Nagios by providing a return value based on the crossing of a threshold. The return value can be "0-1-2-3" based on what state you want Nagios to report your service in based on the info you have just parsed.
 


          	> Monitoring WAS < 

> Deploy the NRPE daemon on WAS host(My hosts all are AIX 5.2 risc boxen).
> Write a simple java program to connect to WAS's PerfServelet(See Developerworks) over http and get a dump of the appropriate parameters you want to log for purposes of alerting. This is in essence calling of PerfServlet servlet to obtain snapshots of the current WAS instance.
> Parse this file using bash-awk-sed-perl or whatever you see fit and generate a text file output consisting of a one liner like the following:

"Free JVM Memory is : 42136.0 KB "
"Total JVM Memory Allocated is : 135002.0 KB "
"Used JVM Memory is : 93880.0 KB "
"The No of Active threads in JDBC Thread Pool for DB tinprod is : 2.0 "

  
 These are the output text files each line representing one file that
is created in a heirarchical structure on the was node. Follow these
steps towards getting alerts raised.

> Was PerfServlet snap dumps o/p to a file
> bash-awk-sed-perl to parse for relevant info and dumps it into another o/p file
> third script to see the o/p of the previous step, print a one liner(Please ensure only a line) as shown in the example above and most importantly triggers of a alert in Nagios by providing a return value based on the crossing of a threshold. The return value can be "0-1-2-3" based on what state you want Nagios to report your service in based on the info you have just parsed.

HTH.

Trevor
-- 
         ___________________________________    
( >-   /  Scaling FreeSoftware & OpenSource        \   -< ) 
/~\   /           In the Enterprise                               \   /~\ 
|  \) \      | www.fsf.org | www.opensource.org |         /  (/ |
|_|_   \____________________________________/  _|_|


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list