GT.M Monitoring

Your InfoHub distribution comes with a GT.M Monitoring Reference Implementation that can monitor GT.M messages in the system log and GT.M databases V6.0-002 and above. It is possible to monitor any GT.M version prior to V6.0-002 with some modifications. Modifications are necessary because the format and content of file header listings, messages, and gleaning techniques vary from release to release. For example, to monitor an earlier release which lacks the $ZPEEK() function, you would have to use other techniques, such as parsing DSE output for example, with a program such as the %DSEWRAP utility.

The following table contains information about the files that are used with the GT.M Monitoring Reference Implementation. These files reside in an InfoHub installation. You can view the configuration files from the samples subdirectory of your InfoHub distribution or download them from the links in the table. You can also click Download GT.M Monitoring Ref Implementation to download all files of the GT.M Monitoring Reference Implementation together or open directly from http://tinco.pair.com/bhaskar/gtm/applications/infohub/GTM_Monitoring_RI.zip.

Component

Name

Description

Download

Server Configuration File

server1.conf

Configuration file used to configure a server. It contains an include file for each database being monitored.

Download server1.conf

DBInstances Configuration File

dbinstances.conf

Provides the DBInstance InfoDict which is used to define database instances being monitored. It contains include files defining the database regions and database fields.

Download dbinstances.conf

Database Fields Configuration File

dbfields.conf

Defines InfoDict Items for a subset of database fields being monitored. Please see IHRegionReplInfoDict.conf for the full set.

Download dbfields.conf

Full Region and Replication InfoDict

IHRegionReplInfoDict.conf

Defines region and replication fields of a GT.M region and groups them in the following categories (InfoDict Domains)–Gdregion, Gtmrecvlocal, Jnlpoolctl, Nodelocal, Recvpoolctl, Replinsthdr, Sgmntaddrs, Sgmntdata, Updhelperctrl, and Updproclocal.

Download IHRegionReplInfoDict.conf

SyslogInstances Configuration File

sysloginstances.conf

Provides the SyslogInstances InfoDict which is used to define Syslog instances to be monitored.

Download sysloginstances.conf

Syslog FileLine Gleaner

FileLineSyslogGleaner.m

A gleaner whose InfoExpr function reads /var/log/messages line-by-line and converts GT.M only messages in the form of key:value pairs and files them in the InfoHub Database. A set of GT.M version specific routines are provided (in the plugins subdirectory of the distribution) that assist the gleaner, e.g., messages60002.m.

Download FileLineSyslogGleaner.m

GT.M Database Gleaner

PipeLineRRGleaner.m

A gleaner routine whose InfoExpr extract region and replication information and stores it in the InfoHub. This gleaner can also monitor for processes excessively holding crit on any of the database's regions. The GT.M Monitoring reference implementation as delivered can only monitor GT.M versions V6.0-002 and above because that version added the $ZPEEK() functionality. A set of platform and GT.M version specific pipe commands (that assist the gleaner) are provided in the pipecmds subdirectory of the distribution. Please see the README in that directory for more information.

Download PipeLineRRGleaner.m

Automatic Configuration generator for GT.M database regions

gtmRegionConfGenerator.m

Creates dbregions.conf which contains configuration entries for GT.M database regions. This file is included by dbinstances.conf to configure the set of regions contained in databases to be monitored.

Download gtmRegionConfGenerator.m

Automatic Configuration generator for a GT.M database

gtmDBConfGenerator.m

By default, creates db1.conf which contains configuration entries for the GT.M database. This file is included by server1.conf to configure a particular database to be monitored.

Download gtmDBConfGenerator.m

SNMP daemon sample configuration

snmpd.conf

A sample configuration for the Net-SNMP daemon

Download snmpd.conf

SNMP trap daemon sample configuration

snmptrapd.conf

A sample configuration for the Net-SNMP trap daemon

Download snmptrapd.conf

To install the GT.M Monitoring Reference Implementation, perform the following steps:

  1. Install InfoHub and create an InfoHub database. For more information, refer to Installing InfoHub.

  2. Install the FIS GT.M SNMP Plugin. For installation instructions and prerequisites, refer to Installing the SNMP Plugin.

  3. From the samples directory copy server1.conf, dbinstances.conf, dbfields.conf, IHRegionReplInfoDict.conf and sysloginstances.conf to the configs directory.

  4. Open a new terminal session and create an environment of the GT.M database you want to monitor. Ensure that gtmroutines contains the path to the InfoHub samples directory. Run the following command to generate InfoDict entries for the database regions.

    $gtm_dist/mumps -r ^gtmRegionConfGenerator

    This command creates the dbregions.conf file. Copy this file to configs directory.

    In the same terminal, run the following command to automatically generate the configuration for the GT.M database you want to monitor.

    $gtm_dist/mumps -r ^gtmDBConfGenerator

    By default, this command creates the db1.conf file in the current directory. The command will prompt for a publisher name, operating system and hardware type, and GT.M version (of database to be monitored).

  5. Review the output of the command as there may be some editing needed (use your favorite editor). If the global directory uses environment variables, add Env: directives for them. One way to check for this is to run $gtm_dist/mumps -r GDE show -segment and look at the "File" column. If all of the environment variables share a common prefix, for example, "SCAU_DB_", then running env|grep SCAU_DB_*|sort may be helpful in gathering the environment variables and their corresponding values. If the global directory uses relative paths when referencing the database file(s), add an Env:IHCD directive containing the path to the start of the relative paths. Make sure that the gtmroutines entry includes InfoHub's PipeCmd directory.

    Copy the file to the configs directory.

    If you did not use the default publisher name, db1, in server1.conf change the line including db1.conf to the appropriate name.

  6. In server1.conf the default location used for the SysLog is /var/log/messages. If the SysLog on the system is in a different location, please change /var/log/messages to the appropriate location. Please ensure that the userid running the InfoHub has read access to the SysLog (and will maintain read access even after SysLog rotation).

    The next several steps are based upon using "server1" for the server name, "db1" for the database name, "UBG" for one of the databases regions, and port 161 for the port where the SNMP daemon listens (see the agentAddress line in snmpd.conf). Please adjust accordingly.

  7. Execute the following command to load the server1.conf configuration file and start InfoHub.

    $gtm_dist/mumps -run InfoHub --action=configure --file=configs/server1.conf
    $gtm_dist/mumps -run InfoHub --action=start

    For more information, refer to Loading a Configuration File and Starting an InfoHub.

  8. Execute the following command to generate the MIB.

    $gtm_dist/mumps -run generatemib >INFOHUB-1-MIB
  9. Execute the following command to start the M SNMP Plugin using Subscriber Id 9. Note that the SNMP Subscriber Descriptor (entry starting with Subscriber:) in server1.conf specifies 9 as the Subscriber Id.

    $gtm_dist/mumps -run IHsnmp --action=start --plugin=9

    For more information, refer to Starting the SNMP Plugin.

  10. Execute the following command to see the most recent GT.M SysLog message.

    snmpget -v2c -c $communitystring -M +$PWD -m INFOHUB-1-MIB -Oaq 127.0.0.1:161 infohubtestserver1syslogSyslogGTMcurr.0
    

    Execute the following command to see the next ten most recent GT.M SysLog messages in reverse chronological order.

    snmpbulkget -v2c -c $communitystring -M +$PWD -m INFOHUB-1-MIB -Oaq 127.0.0.1:161 infohubtestserver1syslogSyslogGTMhist.0
    

    Execute the following command to see the most recent values for the first ten items from database "db1"'s "UBG" region.

    snmpbulkget -v2c -c $communitystring -M +$PWD -m INFOHUB-1-MIB -Oaq 127.0.0.1:161 infohubtestdb1RegReplFetchUBGGdregRnamecurr.0
    
  11. Execute the following commands to check the status of InfoHub and the SNMP Plugin:

    $gtm_dist/mumps -run InfoHub --action=status 
    $gtm_dist/mumps -run IHsnmp --action=status --plugin=9

    For more information, refer to Monitoring an InfoHub and Monitoring the SNMP Plugin.

  12. Congratulations! Your GT.M Monitoring Reference Implementation is now installed .

The following illustration shows how the GT.M Monitoring Reference Implementation sets up an InfoHub framework for monitoring your GT.M database.

GT.M Monitoring Reference Implementation setup

Related Information: