Cacti (home)ForumsDocumentation

IBM DB2

type:
user_template_graph
usertemplate:
db2
description:
DB2 Graph templates. (Sorts, Locks, Connections, Activity, Commits)
Cacti:
0.8.7d
includes:
yes
templates:
ibm,
db2,
database

Download

VersionFile
0.8.7bdb2-v1.tgz

Installation

Instructions are also in the tarball README:

  • Copy the *.pl scripts to your Cacti /scripts/ directory
  • Create /scripts/data directory, writable by apache user
  • Edit the 3 scripts to change paths, usernames, passwords, and select the tables you want to graph.
 (These should probably be done with a data query, but I only monitor
 a few important tables so it wasn't worth the effort)

FOR DB2 V8.1

The activity tables are not as detailed for 8.1. Upgrade to 9.5 if you can! The tables-81.pl script needs ssh keys setup as the apache user → db2_username@host. The db2 user is whatever user has the catalogs setup (IE: has ~/sqllib/db2profile)

If anyone would like to setup an SNMPd script for this instead of ssh keys, I'll add it to the forum. I personally think this is a cleaner approach when dealing with a lot of servers.

  • $ su - apache

edit /etc/passwd and change the shell to /bin/bash if the account is disabled

  • -bash-3.2$ ssh2keysetup.sh db2_username host.mydomain.com

DO NOT type in a password when generating a private key. Just press ENTER. After that, type in your db2 password a few times. After it's finished, try to ssh to the machine, it should allow you in with no password

  • run tables-81.pl host.mydomain.com as apache. It should return some debug info.

FOR DB2 V9.5

  • Setup a DB2 user on the Cacti server, and add the appropriate

catalogs to the machine.

  • Check out the top of the tables-95.pl file. If you have a catalog named HOST and add the device

“host.mydomain.com” then change the domain name in the Perl script.

  • Import the template XML files
  • ENJOY!

If you have problems, please post to the forum page here: http://forums.cacti.net/about32169.html.

Screenshots

Table activity for the table PREFS






Personal Tools