A Dynatrace Extension 2.0 that monitors PIX transactions from a MySQL/MariaDB database and converts them to Business Events through OpenPipeline.
- Overview
- Extension Structure
- Configuration
- Certificate Setup
- Database SSL/TLS Configuration
- Deployment
This extension:
- Queries MySQL/MariaDB database every minute for PIX transaction data
- Sends data as logs to Dynatrace
- Uses OpenPipeline to convert logs to Business Events
- Does NOT retain logs (only Business Events are stored)
Data Sources:
pix_started_events- PIX transactions initiatedpix_received_events- PIX transactions received
BusinessEventsExtension/
├── extension/
│ ├── extension.yaml # Main extension definition
│ ├── pix-to-bizevents.pipeline.json # OpenPipeline configuration
│ └── pix-to-bizevents.source.json # OpenPipeline routing/source
├── config/ # Extension activation configs
├── dist/ # Built extension packages
└── .vscode/
└── developer.p12 # Developer certificate
name: custom:db.logspixbizevent.extension
version: 0.1.0
minDynatraceVersion: "1.331.0"
sqlMySql:
- group: pix_started_events
interval:
minutes: 1
ingest: log
query: |
SELECT
id, timestamp, e2eID, value,
origin_account, destination_account,
destination, bank, type, created_at,
'pix_started' AS event_type
FROM send_pix
WHERE timestamp >= DATE_SUB(NOW(), INTERVAL 1 MINUTE)
ORDER BY timestamp DESC
openpipeline:
pipelines:
- displayName: PIX to BizEvents Pipeline
pipelinePath: pix-to-bizevents.pipeline.json
configScope: logs
sources:
- displayName: PIX to BizEvents Source
sourcePath: pix-to-bizevents.source.json
configScope: logs{
"name": "MySQL PIX Monitoring",
"extensionId": "custom:db.logspixbizevent.extension",
"activation": {
"remote": {
"unified": {
"enabled": true
}
}
},
"properties": {
"sqlMySql.host": "database-instance.region.rds.amazonaws.com",
"sqlMySql.port": 3306,
"sqlMySql.username": "admin",
"sqlMySql.password": "your-password",
"sqlMySql.database": "business_events_test",
"sqlMySql.useSSL": true,
"sqlMySql.truststore": "sqlds_truststore"
}
}These certificates are used to sign your extension so Dynatrace trusts it.
The Dynatrace VS Code extension provides a built-in command to generate developer certificates automatically.
- Open Command Palette (
Ctrl+Shift+P) - Run:
Dynatrace Extensions: Generate certificates - The extension will create all necessary certificates
The generated certificates will be stored in the VS Code workspace storage directory. For example:
/home/ec2-user/.vscode-server/data/User/workspaceStorage/{workspace-id}/DynatracePlatformExtensions.dynatrace-extensions/certificates/
Generated files:
ca.pem- Root CA certificate (public)ca.key- Root CA private keydeveloper.pem- Developer certificate (public)developer.key- Developer private keydeveloper.p12- PKCS12 package for signing extensions
To find where the certificates were generated on your system:
-
Check the VS Code output panel during certificate generation for the exact path
-
Common locations:
- Linux:
/home/{user}/.vscode-server/data/User/workspaceStorage/{workspace-id}/DynatracePlatformExtensions.dynatrace-extensions/certificates/ - Windows:
C:\Users\{user}\AppData\Roaming\Code\User\workspaceStorage\{workspace-id}\DynatracePlatformExtensions.dynatrace-extensions\certificates\ - macOS:
/Users/{user}/Library/Application Support/Code/User/workspaceStorage/{workspace-id}/DynatracePlatformExtensions.dynatrace-extensions/certificates/
- Linux:
-
Find your workspace-id:
find ~/.vscode-server/data/User/workspaceStorage -name "certificates" -type d
The root CA certificate (ca.pem) must be copied to your ActiveGate so it can verify signed extensions.
First, transfer the ca.pem file from your development machine to the ActiveGate server.
Using SCP (Linux/macOS):
# Replace {certificates-path} with the actual path from step 1
# Replace {activegate-host} with your ActiveGate hostname or IP
scp {certificates-path}/ca.pem {user}@{activegate-host}:/tmp/Example:
scp ~/.vscode-server/data/User/workspaceStorage/abc123def456/DynatracePlatformExtensions.dynatrace-extensions/certificates/ca.pem \
ec2-user@activegate-server.example.com:/tmp/Alternative methods:
- WinSCP (Windows) - Use the graphical interface to transfer the file
- SFTP - Any SFTP client can be used
- rsync - For those who prefer rsync
- Any other file transfer method that can copy files to the ActiveGate server
Connect to the ActiveGate server and copy the certificate to the correct directory:
# SSH into the ActiveGate server
ssh {user}@{activegate-host}
# Copy certificate to ActiveGate certificates directory
sudo cp /tmp/ca.pem /var/lib/dynatrace/remotepluginmodule/agent/conf/certificates/sudo chown dtuserag:dtuserag /var/lib/dynatrace/remotepluginmodule/agent/conf/certificates/ca.pem
sudo chmod 644 /var/lib/dynatrace/remotepluginmodule/agent/conf/certificates/ca.pemsudo systemctl restart dynatracegatewayImportant Notes:
- Only the root certificate
ca.pemneeds to be copied to the ActiveGate - The destination directory is
/var/lib/dynatrace/remotepluginmodule/agent/conf/certificates/ - Ensure the certificate has correct permissions (644) and ownership (dtuserag:dtuserag)
The Dynatrace VS Code extension automatically uses the generated developer.p12 certificate when building and signing your extension. No additional configuration is needed in the project.
For AWS RDS:
# Create certificates directory
sudo mkdir -p /certs
sudo chown $USER:$USER /certs
# Download AWS RDS global certificate bundle
curl -o /certs/global-bundle.pem \
https://truststore.pki.rds.amazonaws.com/global/global-bundle.pemFor other databases, obtain the CA certificate from your database provider.
The extension requires a Java KeyStore (JKS) file containing the database CA certificate.
which keytool
# If not found: sudo dnf install java-11-amazon-correttokeytool -import -trustcacerts -noprompt \
-alias database-ca \
-file /certs/global-bundle.pem \
-keystore sqlds_truststore \
-storepass sqlds_truststoreImportant parameters:
-alias database-ca- Unique name for this certificate-keystore sqlds_truststore- Truststore filename (must match activation config)-storepass sqlds_truststore- Truststore password (must match config)
keytool -list -keystore sqlds_truststore -storepass sqlds_truststoreYou should see the database-ca entry in the list.
Copy the truststore to the ActiveGate extension runtime directory:
# Copy truststore
sudo cp sqlds_truststore \
/var/lib/dynatrace/remotepluginmodule/agent/conf/userdata/
# Set permissions
sudo chown dtuserag:dtuserag \
/var/lib/dynatrace/remotepluginmodule/agent/conf/userdata/sqlds_truststore
sudo chmod 644 \
/var/lib/dynatrace/remotepluginmodule/agent/conf/userdata/sqlds_truststoreIn your extension activation configuration, reference the truststore:
{
"properties": {
"sqlMySql.useSSL": true,
"sqlMySql.truststore": "sqlds_truststore"
}
}Verify SSL connection works:
mysql -h database-host.rds.amazonaws.com \
-P 3306 -u admin \
--password='your-password' \
--ssl-verify-server-cert \
--ssl-ca=/certs/global-bundle.pem \
-e "SELECT VERSION();"Expected output: Database version information
Using Dynatrace VS Code extension:
- Open Command Palette (
Ctrl+Shift+P) - Run:
Dynatrace: Build Extension - Extension package will be created in
dist/
- Go to Dynatrace Hub > Extensions 2.0
- Click Upload custom extension
- Select the
.zipfile fromdist/ - Verify and confirm upload
curl -X POST "https://{environment-url}/api/v2/extensions" \
-H "Authorization: Api-Token {api-token}" \
-H "Content-Type: application/octet-stream" \
--data-binary @dist/custom-db.logspixbizevent.extension-0.1.0.zip- Go to Extensions 2.0 in Dynatrace
- Find your extension:
custom:db.logspixbizevent.extension - Click Add monitoring configuration
- Configure:
- Host/IP of database
- Port (default: 3306)
- Username/password
- Database name
- SSL settings and truststore reference
After activation:
-
Check extension logs in ActiveGate:
sudo tail -f /var/lib/dynatrace/remotepluginmodule/log/extensions/custom_db_logspixbizevent_extension/*.log -
Query Business Events in Dynatrace:
fetch bizevents | filter event.provider == "custom:db.logspixbizevent.extension" | limit 100 -
Check for errors in the extension monitoring page
Problem: Extension fails to load or sign
Solution:
- Verify certificates were generated correctly using VS Code extension
- Ensure
ca.pemis copied to ActiveGate at/var/lib/dynatrace/remotepluginmodule/agent/conf/certificates/ - Check file permissions (644) and ownership (dtuserag:dtuserag)
- Restart ActiveGate after copying the certificate
Problem: ERROR 2026 (HY000): TLS/SSL error
Solution:
- Verify certificate exists:
ls -l /certs/global-bundle.pem - Re-download certificate if missing
- Verify truststore is deployed to ActiveGate
- Check truststore permissions (must be readable by
dtuserag)
Problem: Extension shows as running but no Business Events appear
Solution:
- Check SQL queries return data
- Verify OpenPipeline is configured correctly
- Check extension logs for query failures
- Ensure database user has SELECT permissions on tables
- Dynatrace Extensions 2.0 Documentation
- Dynatrace VS Code Extension
- AWS RDS SSL/TLS Certificates
- Java KeyStore and TrustStore
Proprietary - Copyright © 2026
Igor Osch Simões