GEM — Generic Enterprise Manager

GEM is an enterprise infrastructure monitoring and inventory management platform built for hedge funds and investment banks managing heterogeneous on-premises environments. It provides a unified view of all databases and servers from a single web console.

What GEM Does

CapabilityDescription
Configuration ManagementFull CMDB — hosts, databases, applications, and service dependencies inventoried and tracked.
Monitoring & AlertingContinuous MDA-based collection with rule-driven alarm routing, escalation, and notification.
Operations ManagementScheduled batch jobs, on-demand operations, run history, and status tracking.
ReportingWeb-based reports covering space, performance, locking, blocking, and configuration drift.
Stored Procedure LibraryExtended sp__ procedures for Sybase and SQL Server — installed and managed by GEM.

Build & Version

Build 758 (Dec 4 2012). Legacy production codebase — Perl 5.8+, Sybase-backed, cross-platform (Windows via Win32_perl_lib_5_8/, Unix native).


Architecture

GEM is a Perl application backed by a central Sybase database (GEMDB server, gemalarms schema). All monitoring data, inventory records, alarm rules, and configuration live in this schema.

Stack

LayerTechnology
LanguagePerl 5.8+
DatabaseSybase — GEMDB server, gemalarms schema
Web ServerIIS (Windows) or Apache (Unix) — serves Perl CGI console
DBI AbstractionDBIFunc.pm — Sybase, SQL Server, Oracle, MySQL
CredentialsEncrypted password files under conf/ via Repository.pm

Key Directories

DirectoryContents
lib/Core Perl modules — alarm engine, inventory, DBI, reports
conf/Configuration and encrypted credential files
scripts/Monitoring and data-collection scripts
bin/Build tools, admin utilities, and test scripts
console/Web console Perl CGI pages
doc/Full documentation (frameset HTML)

Supported Platforms

GEM is designed to monitor heterogeneous environments. The collector runs on any platform where Perl 5.8+ is available.

Monitored Database Types

DatabaseDBD Driver
Sybase ASEDBD::Sybase (Unix) / DBD::ODBC (Windows)
Microsoft SQL ServerDBD::ODBC
OracleDBD::Oracle
MySQLDBD::mysql

Monitored Host Types

Windows servers, Unix/Linux hosts. Platform capability checks are gated by RunOn.pm — controls which monitors execute on which platform/database combination.


Monitoring & Alerting

The alarm engine (MlpAlarm.pm, 287 KB) is the largest and most critical module. It evaluates collected data against configured alarm rules, routes alerts, manages escalation, and sends notifications.

Data Collection

Monitoring scripts under scripts/ run on a schedule managed by JobScheduler.pm. They collect MDA (Monitor and Diagnostic Architecture) metrics and write results back to the gemalarms schema.

Alarm Processing

PhaseDescription
EvaluationCollected metrics are compared against configured thresholds in gemalarms
RoutingAlarms are routed to configured notification targets (email, pager, etc.)
EscalationUnacknowledged alarms escalate through a defined severity chain
NotificationAlerts dispatched via configured channels; acknowledgement tracked in the database

Alarm Rule Storage

All alarm rules, thresholds, routing logic, and notification targets are stored in the gemalarms Sybase schema — not in flat config files. Changes take effect without restarting any process.


Inventory & CMDB

Inventory.pm manages system inventory and attribute data. GEM maintains a CMDB that covers all monitored systems and their relationships.

Inventory Records

Entity TypeDescription
HostsWindows and Unix servers — OS, hardware, role, status
DatabasesSybase, SQL Server, Oracle, MySQL instances — version, space, configuration
ApplicationsApplications and services running on monitored hosts
DependenciesService dependency relationships between systems

Discovery scripts (bin/discover_sybase.pl, bin/discover_sqlsvr.pl, bin/unix_metadata.pl, bin/mysql_metadata.pl) populate inventory automatically.


Scheduled Operations

JobScheduler.pm reads and writes conf/jobscheduler.dat, which defines all scheduled monitoring and maintenance tasks.

Job Types

TypeDescription
Monitoring collectorsPeriodic scripts that gather metrics from monitored systems
Maintenance jobsDatabase maintenance, log rotation, configuration sync
Report generationScheduled report runs that populate the web console
Alarm sweepsPeriodic evaluation of alarm rules against collected data

On Windows, jobs are registered as Scheduled Tasks via bin/schedule_tasks_on_win32.pl. On Unix, they run via crontab (managed by bin/create_crontab.pl).


Reports

GEM generates web-based reports covering all aspects of the monitored environment. Reports are rendered as HTML and accessed through the web console.

Report Categories

CategoryExamples
Space & CapacityDatabase space, device utilisation, growth trends
PerformanceI/O stats, lock/block analysis, tempdb usage
ConfigurationConfig drift reports, parameter comparison across servers
SecurityLogin auditing, permission review, role assignment
Batch JobsJob run history, success/failure, duration trends
IncidentsAlarm history, escalation log, incident tickets

Core report modules: GemReport.pm (base framework), MlpReports.pm (extended report library).


Console

The GEM web console is a Perl CGI application served by IIS (Windows) or Apache (Unix). It provides access to all monitoring data, reports, inventory, and alarm configuration through a browser interface.

Build & Deploy

ScriptPurpose
bin/build_the_console.plAssemble console pages from templates
bin/publish_the_console.plDeploy built console to web server root
bin/rollout_web_server.plFull web server configuration rollout

Configuration

GEM configuration is split between the conf/ directory (flat files and encrypted credentials) and the gemalarms database (alarm rules, thresholds, routing). Run-time configuration is managed by gem_conf_editor.pl.

Credential Management

Repository.pm / RepositoryRun.pm manage encrypted password files stored under conf/. These files hold database login credentials for all monitored systems. Credentials are never stored in plain text.

Initial Setup

StepScript
Configure monitoring targetsbin/mustedit_discover.pl → edit then run gem_conf_editor.pl
Set up GEM databasebin/setup_gem_database.pl
Install stored procsbin/install_gemalarms.pl
Sync config to databasebin/sync_configfiles_and_db.pl
Test connectivitybin/test_dbi_connectivity.pl

Database Schema

All GEM data lives in a Sybase database server named GEMDB. The primary schema is gemalarms. This is the single source of truth for all monitoring state, inventory records, alarm rules, and configuration.

Key Tables (gemalarms)

Table AreaContents
InventoryHosts, databases, applications, and service dependencies
Alarm RulesThresholds, conditions, routing targets per monitored resource
Collected DataCurrent and historical metrics from monitoring scripts
Alarm StateActive alarms, acknowledgement status, escalation chain state
Job DefinitionsScheduled job configuration (mirrored from jobscheduler.dat)
IncidentsIncident tickets raised from alarm escalations

Schema creation: bin/gemalarms_create_actual.sql (production) / bin/gemalarms_create_template.sql (template).


Module Reference

All core Perl modules live in lib/.

Core Modules

ModulePurpose
MlpAlarm.pmMaster alarm routing engine (287 KB) — evaluation, routing, escalation, notification
Inventory.pmSystem inventory and attribute management
DBIFunc.pmGeneric DBI abstraction across Sybase, SQL Server, Oracle, MySQL
Repository.pmEncrypted credential file management
RepositoryRun.pmRuntime credential access and caching
JobScheduler.pmReads/writes conf/jobscheduler.dat; controls scheduled jobs
RunOn.pmPlatform capability checks — gates which monitors run per platform/DB type
GemReport.pmBase report generation framework
MlpReports.pmExtended report library
Incident.pmIncident ticket management
CommonFunc.pmShared utility functions
LogFunc.pmLogging framework

Sybase-Specific

ModulePurpose
lib/Sybase/SybFunc.pmSybase-specific helpers
lib/Sybase/DBISybFunc.pmDBI+Sybase combination utilities
lib/Sybase/Login.pmSybase login and connection management
lib/Sybase/Release.pmSybase release/version detection

Full Documentation

The complete GEM documentation — installation guide, configuration reference, console user guide, alarm configuration, and troubleshooting — is in the legacy frameset documentation under doc/.

DocumentLink
Full Documentation (frameset)doc/index.htm
Change LogCHANGE_LOG.html
FAQFAQ.html
Troubleshooting GuideTroubleshooting_Guide.htm
GEM Database SchemaGemDatabase.htm
Stored Procedure LibraryEdBarlowsStoredProcs