How to automate health check notifications in Denodo

You can translate the document:

Introduction

This document provides a comprehensive guide to monitor the health of Denodo servers and automatically trigger email alerts if any component becomes unavailable.

Denodo platforms consist of multiple components, including Virtual DataPort (VDP), Scheduler, Data Marketplace, Design Studio, Diagnostic & Monitoring Tool, and more. Ensuring these servers are always available is critical and to ensure this continuous availability we will see how to notify Denodo administrators via email when any component becomes unavailable.

The solution proposed is built on top of a Python script that logs server status and triggers email alerts automatically with two levels of health verification:

  • Level 1 – REST API Check: verifies each Denodo component (VDP, Scheduler, Data Catalog, Solution Manager, etc.) using their REST endpoints.
  • Level 2 – JDBC Connectivity Test: verifies the actual VDP database connectivity using a lightweight JDBC query (to confirm that the server and backend processes are operational, even if the web container is down).

This allows proactive monitoring and minimizes downtime.

Prerequisites

To run the Python script used for the health check and email notifications, ensure the following:

  • Python 3.x is installed on the machine where you are going to create and run the script.
  • Internet access (for SMTP email delivery).
  • Connectivity to the HTTP/HTTPS and JDBC ports of the Denodo installations being monitored.
  • Required Python libraries installed:
  • pip install requests
  • pip install jaydebeapi JPype1
  • Denodo JDBC driver (denodo-vdp-jdbcdriver.jar) downloaded and accessible.
  • SMTP email account for sending alerts.
  • Basic knowledge of scheduling tasks on Windows (Task Scheduler) or Linux (cron).

HTTPS Considerations

Please note that the sample scripts used in this document use HTTP for the API endpoint verification. If your Denodo endpoints use HTTPS, you must handle SSL verification properly:

Scenario

What to Do

HTTPS with a trusted certificate

No changes needed, the same script can be used

HTTPS with self-signed/internal certificate

Get the certificate and use verify="path/to/cert.pem"

Internal testing only

Use verify=false to skip SSL verification

Example for HTTPS:

def check_service(name, url):

   try:

resp = requests.get(url, timeout=10, verify="C:/certs/denodo_cert.pem")

Create and Expose vdp_ping View as a REST Web Service

Before running the Python health-check script, we must create a lightweight “heartbeat” view in Denodo VDP and expose it as a REST web service so the script can query it via HTTP/HTTPS.

Create the vdp_ping view (VQL)

In the Denodo Design Studio, create a small virtual view that always returns a result:

-- Create a simple ping view

CREATE OR REPLACE VIEW vdp_ping AS

SELECT 1;

Publish the view as a REST Web Service without authentication enabled (Design Studio / Web Admin)

Using Denodo Design Studio:

  • Open Design Studio and locate the vdp_ping view under the relevant database.
  • Right-click on the view → Publish as Web Service → choose REST.
  • Configure the service:
  • Service name: vdp_ping
  • Choose output format(s): JSON (recommended) and/or XML.
  • Save and Deploy/Publish the service.

After publishing, you can call the service using the Denodo web container host and port:

http://<VDP_HOST>:<WEB_PORT>/server/admin/vdp_ping/views/vdp_ping?$format=json

NOTE:

A lightweight REST Web Service (without authentication) can be configured as a health-check endpoint to verify the availability of the Virtual DataPort (VDP) server. However, this approach requires redeployment if the user's password used to publish the web service changes.

In future Denodo 9 updates a dedicated “ping” URL for checking the availability of the VDP server will be made available. This feature will eliminate the need to deploy or redeploy a REST service for availability monitoring.

Configuring Gmail for SMTP (Enable 2FA and Generate App Password)

This step is not required if you are using your organization’s SMTP server.

However, if you are using a Gmail account for SMTP configuration (for testing purposes), follow the steps below to enable Two-Factor Authentication (2FA) and generate an App Password.

Steps:

  1. Sign in to your Google Account → https://myaccount.google.com
  2. Navigate to Security > 2-Step Verification and enable it by following the on-screen instructions.
  3. Once 2FA is enabled, go to Security > App passwords.
  4. Select Other (Custom name), enter a name such as SMTP Testing, and click Generate.
  5. Copy the 16-character App Password shown and use it in your SMTP configuration instead of your Gmail password.

SMTP Configuration Example:

  • SMTP Server: smtp.gmail.com.
  • Port: 587 (TLS) or 465 (SSL).
  • Username: Your Gmail address.
  • Password: The App Password generated above.

Python Script

The script performs:

  • HTTP checks: Sends GET requests to REST endpoints of all Denodo services.
  • JDBC check for VDP: Confirms the Denodo VDP server is functional.
  • Logging: Writes a timestamped log file (denodo_status.log) with all service statuses.
  • Email notification: Sends an email with a summary of issues and the log file attached.

Note:

  • Replace placeholders like "denodo-alerts@company.com", "<PATH_TO_DENODO_JDBC_JAR>", and Denodo URLs and hostnames as needed.
  • Ensure the Denodo web container and services are reachable from the system where the script runs.
  • The Python script provided below is a working sample script for performing basic Denodo server checks.

import smtplib

import requests

import jaydebeapi

from email.mime.text import MIMEText

from email.mime.base import MIMEBase

from email.mime.multipart import MIMEMultipart

from email import encoders

from datetime import datetime

# ---------------- Configuration ----------------

DENODO_SERVERS = {

    "VDP": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/server/admin/vdp_ping/views/vdp_ping?$format=json",

    "Data Marketplace": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/denodo-data-catalog/Ping",

    "Denodo Design Studio": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/denodo-design-studio/Ping",

    "Diagnostic & Monitoring Tool": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/diagnostic-monitoring-tool/Ping",

    "Scheduler": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/webadmin/denodo-scheduler-admin/PingServer/scheduler",

    "Scheduler Administration Tool": "http://<YOUR_DENODO_PLATFORM_HOST>:9090/webadmin/denodo-scheduler-admin/Ping",

    "SolutionManager": "http://<YOUR_SOLUTION_MANAGER_HOST>:10090/pingSolutionManager",

    "License Manager": "http://<YOUR_SOLUTION_MANAGER_HOST>:10091/pingLicenseManager",

    "SM Denodo Design Studio": "http://<YOUR_SOLUTION_MANAGER_HOST>:19090/denodo-design-studio/Ping",

    "SM Diagnostic & Monitoring Tool": "http://<YOUR_SOLUTION_MANAGER_HOST>:19090/diagnostic-monitoring-tool/Ping",

    "SM Scheduler Administration Tool": "http://<YOUR_SOLUTION_MANAGER_HOST>:19090/webadmin/denodo-scheduler-admin/Ping",

    "Solution Manager Administration Tool": "http://<YOUR_SOLUTION_MANAGER_HOST>:19090/solution-manager-web-tool/Ping",

    "Security Token Server (Denodo SSO)": "http://<YOUR_SOLUTION_MANAGER_HOST>:19090/sso/ping"

}

# VDP JDBC configuration

VDP_JDBC_CONFIG = {

    "DRIVER_CLASS": "com.denodo.vdp.jdbc.Driver",

    "JAR_PATH": "<PATH_TO_DENODO_JDBC_JAR>",  # e.g., C:/DenodoPlatform9/tools/client-drivers/jdbc/denodo-vdp-jdbcdriver.jar

    "URL": "jdbc:denodo://<VDP_HOST>:<PORT>/admin",  # e.g., localhost:9999/admin

    "USER": "<VDP_USER>",

    "PASSWORD": "<VDP_PASSWORD>"

}

EMAIL_CONFIG = {

    "SMTP_SERVER": "smtp.company.com",  # Replace with your corporate SMTP hostname

    "SMTP_PORT": 25,                    # Usually 25 (no auth) or 587 (with TLS)

    "FROM": "denodo-alerts@company.com", # Service account or alert mailbox

    "TO": ["dba-team@company.com", "it-ops@company.com"],  # Recipients replace it according to your requirements

    "USE_TLS": True,                     # Set to True if your SMTP requires encryption

    "USERNAME": "denodo-alerts@company.com",  # Optional if authentication needed

    "PASSWORD": "********"               # Optional if SMTP requires authentication

}

LOG_FILE = "denodo_status.log"

# ---------------- Helper Functions ----------------

def send_email(subject, body, attachment_path=None):

    """Send email with optional attachment"""

    msg = MIMEMultipart()

    msg["Subject"] = subject

    msg["From"] = EMAIL_CONFIG["FROM"]

    msg["To"] = ", ".join(EMAIL_CONFIG["TO"])

   

    msg.attach(MIMEText(body, "plain"))

    if attachment_path:

        with open(attachment_path, "rb") as f:

            part = MIMEBase("application", "octet-stream")

            part.set_payload(f.read())

        encoders.encode_base64(part)

        part.add_header("Content-Disposition", f"attachment; filename={attachment_path}")

        msg.attach(part)

    with smtplib.SMTP(EMAIL_CONFIG["SMTP_SERVER"], EMAIL_CONFIG["SMTP_PORT"]) as server:

        server.ehlo()

        server.starttls()

        server.ehlo()

        server.login(EMAIL_CONFIG["FROM"], EMAIL_CONFIG["PASSWORD"])

        server.sendmail(EMAIL_CONFIG["FROM"], EMAIL_CONFIG["TO"], msg.as_string())

    print("✅ Email sent successfully!")

def check_service(name, url):

    """Check individual service and return status string"""

    try:

        resp = requests.get(url, timeout=10)

        status = "UP" if resp.status_code == 200 else f"DOWN (HTTP {resp.status_code})"

    except Exception as e:

        status = f"DOWN ({e})"

    with open(LOG_FILE, "a") as log:

        log.write(f"{datetime.now()} - [{name}] - {status}\n")

    print(f"[{name}] - {status}")

    return status

def test_vdp_jdbc():

    """Test VDP server via JDBC"""

    try:

        conn = jaydebeapi.connect(

            VDP_JDBC_CONFIG["DRIVER_CLASS"],

            VDP_JDBC_CONFIG["URL"],

            [VDP_JDBC_CONFIG["USER"], VDP_JDBC_CONFIG["PASSWORD"]],

            VDP_JDBC_CONFIG["JAR_PATH"]

        )

        curs = conn.cursor()

        curs.execute("SELECT 1")

        result = curs.fetchone()

        curs.close()

        conn.close()

        status = "UP (JDBC)" if result[0] == 1 else "DOWN (JDBC query failed)"

    except Exception as e:

        status = f"DOWN (JDBC: {e})"

    with open(LOG_FILE, "a") as log:

        log.write(f"{datetime.now()} - [VDP JDBC] - {status}\n")

    print(f"[VDP JDBC] - {status}")

    return status

# ---------------- Main Logic ----------------

def main():

    with open(LOG_FILE, "w") as log:

        log.write(f"Denodo Server Status Log - {datetime.now()}\n")

        log.write("="*50 + "\n")

    failures = []

    for name, url in DENODO_SERVERS.items():

        status = check_service(name, url)

        if status != "UP":

            failures.append(f"{name} - {status}")

    vdp_jdbc_status = test_vdp_jdbc()

    if "DOWN" in vdp_jdbc_status:

        failures.append(f"VDP JDBC - {vdp_jdbc_status}")

    if failures:

        subject = "⚠️ Denodo Server Issues Detected"

        body = f"Time: {datetime.now()}\n\nFollowing components are not responding:\n" + "\n".join(failures)

    else:

        subject = "✅ Denodo Server Status - All UP"

        body = f"Time: {datetime.now()}\n\nAll servers are UP"

    send_email(subject, body, LOG_FILE)

if __name__ == "__main__":

    main()

Note: For the Scheduler server, if it is not in the default host (localhost) and port (8000), then you have to specify them in the URL as query parameters:

http://<WEB_HOST>:<WEB_PORT>/webadmin/denodo-scheduler-admin/PingServer/scheduler?host=<SERVER_HOST>&port=<SERVER_PORT>

Key Functions

check_service(name, url)

  • Sends an HTTP GET request to the given service URL.
  • Returns UP if the status code is 200, otherwise DOWN.
  • Logs all results to a file.

test_vdp_jdbc()

  • Connects to the VDP server using JDBC.
  • Executes a simple SELECT 1 query.
  • Confirms server availability independently of the web container.

send_email(subject, body, attachment_path)

  • Sends email via SMTP.
  • Can attach a log file for detailed troubleshooting.

All checks are logged to the denodo_status.log file with timestamps, component name, and status.

Example log entry:

2025-10-17 14:00:05 - [Scheduler] - DOWN (HTTP 503)

2025-10-17 14:00:05 - [VDP JDBC] - UP (JDBC)

Automating Script Execution

The examples provided in this section for Windows Task Scheduler and Linux Cron are sample guidelines to illustrate how the Python script can be automated. Engage your system administration team to properly configure Task Scheduler or Cron jobs for automated task execution.

On Windows (using Task Scheduler)

  • Open Task Scheduler > Create Task.
  • Trigger: Choose Daily/Hourly.
  • Action: Start a Program, Program: python, Arguments: C:\path\to\denodo_healthcheck.py

On Linux (Cron)

  • Open terminal and run crontab -e
  • Add cron job to run every hour (adjust as needed):

0 * * * * /usr/bin/python3 /path/to/denodo_healthcheck.py

Conclusion

This Python-based script provides:

  • Automated monitoring of all Denodo components.
  • Double-check with the REST API and the JDBC test.
  • Email alerts with detailed logs.
  • Cross-platform scheduling on Windows and Linux.

It ensures administrators are proactively notified of any downtime, improving the reliability and uptime of Denodo services.

References

Health Monitoring

Configuring alerts in Denodo

Python Requests Library

JayDeBeApi Library

Python SMTP Library

Gmail App Password Setup

Disclaimer

The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.

For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.
Recommendation

Recommended resources Recommendations generated by AI

Automating status check of Denodo services

Automating status check and startup of Denodo processes

Checking the status of the VDP server startup

How to monitor the number of times a VDP server is restarted

Reading the VDP logs with Denodo Log Custom Wrapper

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here