Icinga / Icinga/icinga2

icinga2 to ignore "hidden" directories like .git

Open
#10,378 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
616
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Hello team, we noticed the "hidden" directories like .git are processed by the icinga2 service during the configuration distribution and so copied to all sub-zones.
Even the service state in the logs the files are not supported, they are still copied/sync to other endpoints.

Would it be possible to simply exclude the directories starting with "." (like: .git) from any parsing, synchronization?
Thanks.

Here a snipped from the log:

...
[2025-03-14 05:36:56 +0000] critical/ApiListener: Ignoring file '/etc/icinga2/zones.d/global-templates/templates/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391' for cluster config sync: Does not contain valid UTF8. Binary fi
les are not supported.
        (0) Creating config update for file '/etc/icinga2/zones.d/global-templates/templates/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391'
[2025-03-14 05:36:56 +0000] critical/ApiListener: Ignoring file '/etc/icinga2/zones.d/global-templates/templates/.git/objects/eb/8cf69d68d6fe5e72cff44bfefa4f589cf4f024' for cluster config sync: Does not contain valid UTF8. Binary fi
les are not supported.
        (0) Creating config update for file '/etc/icinga2/zones.d/global-templates/templates/.git/objects/eb/8cf69d68d6fe5e72cff44bfefa4f589cf4f024'
[2025-03-14 05:36:56 +0000] information/ApiListener: Copying 179 zone configuration files for zone 'global-templates' to '/var/lib/icinga2/api/zones/global-templates'.
[2025-03-14 05:36:56 +0000] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/global-templates//_etc/EU/.git/COMMIT_EDITMSG
[2025-03-14 05:36:56 +0000] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/global-templates//_etc/EU/.git/FETCH_HEAD
[2025-03-14 05:36:56 +0000] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/global-templates//_etc/EU/.git/HEAD
[2025-03-14 05:36:56 +0000] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/global-templates//_etc/EU/.git/ORIG_HEAD
[2025-03-14 05:36:56 +0000] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/global-templates//_etc/EU/.git/config
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ApiListener cluster configuration sync behavior shown in the log and trace how files under /etc/icinga2/zones.d/global-templates/templates are parsed and copied to sub-zones. Reproduce the case with a hidden directory such as .git, then verify that dot-prefixed directories are excluded from parsing and synchronization without affecting supported configuration files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.