Skip to content

Add service whitelist functionality for OPNsense services#70

Open
somnium78 wants to merge 2 commits intobashclub:mainfrom
somnium78:main
Open

Add service whitelist functionality for OPNsense services#70
somnium78 wants to merge 2 commits intobashclub:mainfrom
somnium78:main

Conversation

@somnium78
Copy link

@somnium78 somnium78 commented Nov 10, 2025

Problem

The current OPNsense service check in CheckMK reports all stopped services as critical errors, even when services are intentionally disabled by the administrator.

Key issues:

  • No mechanism to whitelist or exclude specific services from monitoring
  • The check aggregates all services into a single CheckMK service, making it impossible to use CheckMK's built-in "Disabled Services" rules
  • Results in false-positive alerts for legitimately stopped services (e.g., unbound, ntopng, haproxy)
  • Administrators have no way to suppress these alerts without disabling the entire service check

Solution

This PR adds a whitelist functionality that allows administrators to exclude specific services from error reporting:

  • Automatically creates /usr/local/etc/checkmk_service_whitelist.conf on first run
  • Services listed in the whitelist file are excluded from critical status
  • Adds new whitelisted_services metric for monitoring
  • Maintains full backward compatibility (works without whitelist file)
  • Simple text-based configuration (one service name per line)

Edit:

  • changed "whitelist" to "blacklist"

@DerMistkaefer
Copy link

When the whitelist works as a blacklist we should call it blacklist.

Also please remove or change the german comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants