Skip to content

Reporting Module 1.0.5: Filter Dropdown Missing & "Undefined array key filter" Error #257

@rimat420

Description

@rimat420

Environment:

  • Icinga2: 2.14.6 (Docker)
  • IcingaWeb2: Latest Docker image
  • IcingaDB: 1.2.0 / 1.3.0 (tested both)
  • IcingaDB Web Module: 1.1.3
  • Reporting Module: 1.0.5 (released April 7, 2025)
  • MySQL: 8.0 with --sql-mode=ANSI_QUOTES
  • Redis: 7-alpine

Problem Description:

After setting up a containerized Icinga environment, the Reporting module has two critical issues:

  1. Missing Filter Dropdown: When creating/editing reports, the "Filter" field shows as empty text input instead of dropdown with available hosts/services
  2. Runtime Error: After container restart, existing reports show: Undefined array key "filter" (SlaReport.php:69)

What Works:

  • ✅ Hosts/Services visible in IcingaWeb2 monitoring interface
  • ✅ IcingaDB synchronization successful (no errors in logs)
  • ✅ Report templates can be created and are persistent
  • ✅ Report-template relationship exists in database
  • ✅ Redis contains host data in hash format

What Doesn't Work:

  • ❌ Filter dropdown in report creation/editing
  • ❌ Reports lose filter configuration after container restart
  • ❌ Filter parameter not persisted in config table

Debugging Results:

Redis Structure (IcingaDB 1.3.0 & 1.2.0):

redis-cli type "icinga:host"
# Returns: hash (not set as expected?)

redis-cli hgetall "icinga:host"
# Returns: Valid host data with proper JSON structure

Database Analysis:

-- Reports and templates exist correctly
SELECT r.id, r.name, r.template_id, rl.id as reportlet_id 
FROM report r LEFT JOIN reportlet rl ON r.id = rl.report_id;
# Shows proper relationship

-- Filter config missing after restart
SELECT * FROM config WHERE reportlet_id = X AND name = 'filter';
# Returns empty after container restart

Browser Network Analysis:

  • No AJAX calls for filter options are made
  • No JavaScript errors in console
  • Filter field renders as plain text input

Questions:

  1. Is the Redis hash structure change in IcingaDB 1.3.0 breaking the Reporting module's filter dropdown?
  2. Should the filter dropdown work with current versions, or is this a known limitation?
  3. Is there a specific IcingaDB/Reporting module version combination that's known to work?
  4. Are there configuration parameters to make the filter dropdown functional?

Workaround Attempts:

  • Tested both IcingaDB 1.2.0 and 1.3.0 (same behavior)
  • Verified MySQL ANSI_QUOTES mode for IcingaDB compatibility
  • Confirmed all permissions (* for admin user)
  • Checked Redis key structures match IcingaDB documentation

Expected Behavior:
Filter field should show dropdown with available hosts/services for selection, and filter configuration should persist after container restarts.

Any insights on this would be greatly appreciated! This seems like a fundamental feature for the Reporting module.

Configuration Details:

# Relevant docker-compose configuration
icingadb:
  image: icinga/icingadb:1.2.0  # or 1.3.0
icingaweb2:
  # Uses latest official image with Reporting 1.0.5
mysql:
  command: --sql-mode=ANSI_QUOTES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions