DB2 monitoring
The main aim of this document is to describe the DB2 systems monitoring based on Unix.
Some “base” modules have been chosen according to our experience in system monitoring and the necessities of some of our clients. In addition, all the specifications collected in different real production environments have been added, taking real specifications of database administrators.
For extracting information it is used:
● An external configuration file where all the plugin parameters are defined. This configuration file is able to perform calls (includes) to other files.
● We use the software that is already installed in the system (db2, df, etc), for the monitoring with the plugin without having to install libraries or third-party utilities.
- Introduction
- Compatibility matrix
- Requirements
- Configuration
- Manual execution
- Modules created by the plugin
Introduction
The main aim of this document is to describe the DB2 systems monitoring based on Unix.
Some “base” modules have been chosen according to our experience in system monitoring and the necessities of some of our clients. In addition, all the specifications collected in different real production environments have been added, taking real specifications of database administrators.
For extracting information it is used:
● An external configuration file where all the plugin parameters are defined. This configuration file is able to perform calls (includes) to other files.
● We use the software that is already installed in the system (db2, df, etc), for the monitoring with the plugin without having to install libraries or third-party utilities.
Compatibility matrix
Systems where it has been tested: Linux.
Systems where it works: Linux, Unix.
Systems where it works with limited features: Windows.
Requirements
●A db2 installation.
●Perl.
●List of applications to be monitored.
●List of processes to be monitored.
Configuration
This is an example of the configuration file:
#=============================================================
# DB2 configuration guide:
#=============================================================
#
#logparser <path_to_log>
#volume <web_server>;<X>
#process <module_name>;<process_path>
#log <path_to_log>;<regexp to match>
# Next fields going on the same line:
#db2_stats db2;
# <check_type>;
# <instance_name>;
# <database_name>;
# <app_name>;
# <system_username>;
#
#
<db2_username>;
<db2_password>
logparser /var/opt/pandora/etc/pandora/plugins/grep_log
log /tmp/db2backup.log;DB2_BackupStatus;successful
db2_stats db2;check_dbconnect;db2instl;SAMPLE;;db2instl;;
db2_stats db2;check_application;db2instl;SAMPLE;db2stmm;db2instl;;
db2_stats db2;check_application;db2instl;SAMPLE;;db2instl;;
volume vol1;vol2;vol3
log file;name; expression
process process;process1
#process name2;process2
#process name3;process3
#process name4;process4
Manual execution
Copy the plugin to the agent plugin directory, or distribute it with file collections. Do the same with the conf.file . The call from the agent will be similar to this, but using the paths where the plugin and the conf are installed.
perl pandora_db2.pl pandora_db2.conf
We recommend first to do a manual execution to see if everything is working as expected.
It will show the XML file created. You can check the logfile, in the temporal directory defined, for errors in the plugin execution.
Modules created by the plugin
Some modules generated by the plugin are:
●DB2 Service status
●DB2 Server RAM usage
●DB2 Server CPU usage
●Process_process
●Proc_MEM_process
●Proc_CPU_process
●db2instl/SAMPLE status