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

InfoHub Configuration File

dbinstances.conf

Configuration file used to configure a server. It includes InfoDict files gtmmessages.conf, gtmfields.conf, gtmdbregions.conf and gtminstances.conf for monitoring database instances. gtmmessages.conf and gtmfields.conf are user created files and are subsets of IHRegionReplInfoDict.conf and IHGtmSyslogMessages.conf respectively. gtmdbregions.conf and gtminstances.conf are created and updated by the routine gtmConfigGenerator, described below.

Download dbinstances.conf

GT.M Sylog Messages InfoDict

IHGtmSyslogMessages.conf

Provides the SyslogInstances InfoDict which is used to define GT.M messages to be monitored. Use this file as the basis for gtmmessages.conf.

Download IHGtmSyslogMessages.conf

Limited InfoDict of GT.M Sylog Messages

sysloginstances.conf

Provides a sample SyslogInstances InfoDict that defines a small subset of GT.M messages to be monitored. This is a simple starting point for testing InfoHub's syslog monitoring capabilities.

Download sysloginstances.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)a?? Gdregion, Gtmrecvlocal, Gtmsourcelocal, Gtmsrclcl, Jnlpoolctl, Nodelocal, Recvpoolctl, Replinsthdr, Sgmntaddrs, Sgmntdata, Updhelperctrl, and Updproclocal. Use this file as the basis for gtmdbfields.conf.

Download IHRegionReplInfoDict.conf

Full Region and Replication InfoDict

dbfields.conf

Defines a subset of region and replication fields of a GT.M region and groups them in the following categories (InfoDict Domains)a?? Gdregion, Gtmrecvlocal, Gtmsourcelocal, Gtmsrclcl, Jnlpoolctl, Nodelocal, Recvpoolctl, Replinsthdr, Sgmntaddrs, Sgmntdata, Updhelperctrl, and Updproclocal. This is a simple starting point for testing InfoHub's GT.M database monitoring capabilities.

Download dbfields.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 Application Instance Configuration Extraction Script

gather_instance_info.sh

Use this script to source your GT.M application configuration and output the relevant pieces of information to monitor the GT.M application. The output file is processed by gtmConfGenerator (described below) to generate an publisher configuration and InfoDict entries for the GT.M instance to be monitored.

This standalone script does not require any part of the InfoHub to be present.

The script will not extract GT.M encryption settings. Those must be defined after gtmConfGenerator generates the Publisher configuration for the GT.M application.

Download gather_instance_info.sh

InfoHub Configuration generator for GT.M application instances

gtmConfGenerator.m

Creates and/or updates InfoHub configuration files, gtmdbregions.conf and gtminstances.conf, and instance specific gleaners named IdMapFor<PublisherNameHere>.m. dbinstances.conf includes gtmdbregions.conf and gtminstances.conf. You should not need to edit these files by hand. After each execution of this routine, be sure to reload the InfoHub configuration file.

gtmdbregions.conf contains unique InfoDict entries for each newly discovered GT.M database region and replication instance.

gtminstances.conf contains the publisher configuration for the to be monitored GT.M application instance.

IdMapFor<PublisherNameHere>.m gleaners should be placed in $ihsrcdir by default. If the routine cannot find that directory, the user will be directed to copy the files there.

Download gtmRegionConfGenerator.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. Change to the InfoHub configs directory.

  4. Open a new terminal session and execute gather_instance_info.sh passing it as a parameter the environment configuration of the GT.M database you want to monitor.

    /path/to/inofhub/samples/gather_instance_info.sh /path/to/gtm/instance/env_file > someinstance1.out

    Please ensure that you generate only one file per instance. Do not concatentate these files into one.

  5. Open a new terminal session and source environment of the InfoHub and configure the new instance using the output file from above

    $gtm_dist/mumps -run gtmConfGenerator someinstance1.out

    Follow the prompts to create a new configuration, modify an existing configuration or create a new configuration as a copy of another configuration. Copies will acquire the Publisher configuration of the original configuration will all of the InfoDict IDs changed for the new configuration.

  6. Copy all desired files from samples/IHRegionReplInfoDict.conf into configs/gtmfields.conf

    Copy all desired files from samples/IHGtmSyslogMessages.conf into configs/gtmmessages.conf or remove the "Include" directive from dbinstances.conf

  7. Copy all desired files from samples/IHRegionReplInfoDict.conf into configs gtmfields.conf

    Review the new configuration files as there may be some editing needed (use your favorite editor). If the global directory uses environment variables, add Env: directives for them. In the gather_instance_info.sh output file, e.g. someinstance1.out, look under the "GlobalDirectory" section for environment variables. 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.

    After each execution og gtmConfGenerator, load dbinstances.conf. This loads all newly generated IDs into the InfoHub so that subsequent executions of gtmConfGenerator can avoid re-using them.

    $gtm_dist/mumps -run InfoHub --action=configure --file=dbinstances.conf

    The next several steps are based upon using dbinstances.conf with the generated configuration files and port 161 for the port where the SNMP daemon listens (see the agentAddress line in snmpd.conf). Please adjust accordingly.

  8. Execute the following command to and start InfoHub.

    $gtm_dist/mumps -run InfoHub --action=start

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

  9. Execute the following command to generate the MIB.

    $gtm_dist/mumps -run generatemib >INFOHUB-1-MIB
  10. 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.

  11. 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
    
  12. 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.

  13. 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

loading table of contents...