SQL execution

GermainUX can execute SQL queries against a configured database or the GermainUX Datamart. Query results can be included in an email, attached as a file, or used as part of an automated workflow.

🚀 Execution Modes

SQL Actions can run:

Mode

Manually

On a configurable schedule

When an SLA condition is met

🔧 Configure a SQL Action

✨ Using the Wizard

Go to GermainUX Workspace > Wizards > SQL Action.

image-20260825-155230.png
SQL Action Config Wizard - GermainUX

⚙️ Using the Configuration Screen

Go to GermainUX Workspace > Automation > SQL.

Select an existing SQL Action to edit it, or click + to open the SQL Action wizard.

📖 SQL Action Reference

Workspace field

Configuration key

Description

Possible values

Name

name

Unique name for the action.

String

Execute via Engine

remote

Executes the action through a GermainUX Engine. When enabled, a target server can be specified.

Boolean

Target Server

targetExpression

MVEL expression used to identify the target server for remote execution.

String

Logging Enabled

loggingEnabled

Records each execution of the action.

Boolean

Notify on Success

notifyOnSuccess

Creates a notification when the action succeeds.

Boolean

Notify on Failure

notifyOnFailure

Creates a notification when the action fails.

Boolean

Execution Count

limitCount

Maximum number of executions allowed during the configured interval.

Integer

Execution Interval

limitInterval

Period during which the execution-count limit applies.

YEAR, MONTH, WEEK, DAY, HOUR, or MINUTE

Distribution List

alertGroupName

Distribution list that receives the report.

Existing distribution-list name

Alert Template

templateName

Template used to generate the report message.

Existing template name

Suppress Email if Result Is Empty

suppressIfEmptyResult

Prevents report delivery when the query returns no results.

Boolean

Monitored Database

monitoredDatabase

Configured database against which the query runs.

Existing database configuration

Credentials

credentials

Configured credentials used to connect to the database.

Existing credential configuration

Attach Result

attachResult

Attaches the query results to the report.

Boolean

Datamart Query

datamartQuery

Runs the query against the GermainUX Datamart.

Boolean

Run on Schedule

schedule

Enables scheduled execution and allows a CRON expression to be defined.

Boolean

References

references

Advanced references to credentials, configuration entries, or custom values used by the action or template.

Reference collection

SQL Queries

sqlQueries

Queries included in the SQL report.

List of SqlReportQueryConfig objects

Triggered by SLAs

SLAs configured to trigger this action.

Collection of SLAs

📃 SQL Query Configuration

Each entry in sqlQueries can contain:

Property

Description

name

Unique name for the query.

sqlText

SQL statement to execute.

intervalType

Time interval applied to the query.

attachmentNameTemplate

Template used to name the result attachment.

🔗 References

References allow the action or report template to access other GermainUX configuration objects securely.

Property

Description

Example

name

Unique name used to reference the configuration item.

Credentials

key

GermainUX configuration collection key.

germain.apm.monitoringConfig.credentials

itemName

Name of the item within the collection.

ReportingCredentials

value

Direct custom value when no configuration item is referenced.

A non-sensitive report parameter

A referenced property can be accessed with an expression such as:

${Credentials.username}

Use configured credentials for usernames, passwords, tokens, and other secrets. Do not store sensitive values directly in SQL statements, templates, or custom references.

📅 Example: Scheduled GermainUX Login Report

This example creates a daily email report containing an attachment with the GermainUX login activity recorded during the previous day.

1️⃣ Step 1: Configure the SQL Action

  1. Go to GermainUX Workspace > Automation > SQL.

  2. Click + to open the SQL Action wizard.

  3. Enter a unique action name.

  4. Select or create the distribution list that will receive the report.

  5. Select or create the email template.

  6. Enable Attach Result.

  7. Click Next.

    image-20201109-123909.png
    Configure the SQL Action - GermainUX

2️⃣ Step 2: Configure the Connection

To query the GermainUX Datamart, enable Run against GermainUX Datamart.

To query another database:

  1. Select a configured database.

  2. Select the credentials used to access it.

  3. Test the connection, if that option is available.

  4. Click Next.

    image-20201109-124036.png
    Configure the Connection - GermainUX

3️⃣ Step 3: Add the SQL Query

Add the query that returns GermainUX login activity from the previous day.

A SQL Action can contain one or more queries. The selected database and credentials from the previous step determine where those queries execute.

Preview or validate the query results before continuing.

image-20201113-130947.png
Add the SQL Query - GermainUX

4️⃣ Step 4: Configure the Schedule

  1. Enable Run on Schedule.

  2. Configure the desired execution frequency or enter a CRON expression.

  3. Set the report to run once per day at the required time.

  4. Click Next.

    image-20201113-131053.png
    Configure the Schedule - GermainUX

5️⃣ Step 5: Configure an SLA Trigger

SQL Actions can run on a schedule or when an SLA is breached.

Because this example uses a daily schedule, leave the SLA selection empty and click Finish.

GermainUX will now execute the query each day and send the resulting login report to the selected distribution list.

image-20201113-131121.png
Configure an SLA Trigger - GermainUX
image-20260825-155647.png
Attachment in a report example - GermainUX

🛡️ Security and Performance Recommendations

Recommendation

Use a dedicated database account with the minimum required permissions.

Prefer read-only credentials for reporting queries.

Store credentials in GermainUX credential configurations.

Use parameterized values where supported.

Avoid unrestricted or destructive SQL statements.

Validate queries against a non-production database before enabling them.

Apply execution limits and query timeouts.

Schedule resource-intensive queries outside peak operating periods.

Suppress delivery when an empty result provides no useful information.

Component: Engine

Feature Availability: 8.6.0 or later