HANA Cleaner Monitoring Setup in FRUN

Introduction

Maintaining SAP HANA systems requires regular housekeeping activities, and one of the critical components is the HANA Cleaner. Monitoring its activity ensures that log cleanup and housekeeping jobs are running as expected.

In this blog, i is explain how we implemented HANA Cleaner monitoring in SAP Focused Run (FRUN) using custom metrics via template maintenance, without requiring custom scripts. This approach leverages standard FRUN capabilities and provides a scalable and maintainable monitoring solution.


Solution Overview

The objective of this monitoring setup is:

  • Track the execution of HANA Cleaner jobs
  • Detect inactivity or failure scenarios
  • Alert operations teams proactively

We achieved this using:

  • Custom Metric based on File Monitoring
  • FRUN Template Maintenance
  • Diagnostic Agent (push) data collection

How It Works

The monitoring logic is simple but effective:

  1. The system monitors the last modified timestamp of HANA Cleaner log files
  2. A custom metric evaluates this timestamp continuously
  3. If no update is detected beyond a defined threshold (e.g., 2 days), an alert is triggered

This ensures immediate visibility into any issues with the HANA Cleaner process.


Implementation Details

Step 1: Create Custom Metric in FRUN

Navigate to:

Advanced System Management → System Monitoring → Template Maintenance

Create or enhance a metric such as:

HANA Cleaner Run Status

Category:

Exceptions

Step 2: Configure Data Collection

From the screenshot setup, the following configuration is used:

Data Collector Type

Diagnostic Agent (push)

Data Collector Name

File Information

Collection Interval

5 Minutes

Step 3: Maintain Collector Input Parameters

Here are the key parameters used:

Parameter IDDescription
DATEPATTERNDate format used (yyyy-MM-dd)
FILEPATTERNHANA Cleaner log file pattern
FOLDERPath to log directory
KEY_FIGMetric to evaluate
RECURSIVEEnable/disable recursive search

Actual Values Used

Plain Text

DATEPATTERN = yyyy-MM-dd

FILEPATTERN = hanacleanerlog_*

FOLDER = /usr/sap/${SAP_HDBSystemID}/${SAPSystemName}/hanacleaner/output

KEY_FIG = Last Modified age in seconds

RECURSIVE = False
Show more lines

✅ This configuration ensures the system monitors the latest file modification time in the HANA Cleaner output directory.


Step 4: Define Metric Logic

The key figure:

Last Modified Age in Seconds

This indicates how long it has been since the log file was updated.


Step 5: Threshold Configuration

Define thresholds based on your operational requirements.

Example:

ConditionThreshold
Green< 24 hours
Yellow24–48 hours
Red> 48 hours

👉 This ensures alerts are triggered if HANA Cleaner hasn’t executed in expected time.


Step 6: Assign Metric to Template

Assign the custom metric to:

  • Relevant HANA systems
  • Both Production and Non-Production landscapes

This ensures full coverage across your environment.


Monitoring Output

Once configured, FRUN displays:

  • Historical trend of HANA Cleaner activity
  • Status indicators (Green/Yellow/Red)
  • Alerts in case of inactivity

From your reference screenshot:

  • The metric appears under Exceptions
  • A graph shows activity progression
  • Alerts are triggered if thresholds are breached
  • ✅ System Monitoring
  • (Optional) Root Cause Analysis

Coverage

This setup can be implemented:

  • Across the entire HANA landscape
  • For all S/4HANA or standalone HANA systems
  • In both:
    • ✅ Production
    • ✅ Non-Production environments

Advantages of This Approach

✅ No Custom Coding Required

Uses standard FRUN capabilities

✅ Scalable

Can be applied across multiple systems via templates

✅ Real-Time Monitoring

Frequent polling (every 5 minutes)

✅ Proactive Alerting

Detects failures before business impact

✅ Low Maintenance

Simple file-based monitoring logic


Key Learnings & Best Practices

  • Always ensure correct file path and pattern
  • Validate that Diagnostic Agent has access to directory
  • Fine-tune thresholds based on:
    • HANA Cleaner job frequency
    • Business requirements
  • Use template-based rollout for consistency

Conclusion

Monitoring housekeeping activities like HANA Cleaner is critical for maintaining system health. By leveraging FRUN custom metrics and file monitoring, we can implement an efficient, scalable, and proactive monitoring solution.

This approach eliminates the need for custom scripts while fully utilizing standard SAP monitoring capabilities.

Author: Gaurav Dwivedi

Gaurav Dwivedi is an SAP Basis professional specializing in SAP Basis Admin operations, monitoring, SAP Focused Run, and automation within the SAP ecosystem. He is passionate about making the SAP world more automated and efficient, and actively shares practical, hands‑on technical knowledge through blogs and community engagement.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.