@@ -21,7 +21,7 @@ The plugin also exposes Prometheus-compatible metrics for monitoring repository
2121| ` repo ` | String | Yes | - | Git repository URL (HTTPS, SSH, or file://) |
2222| ` ref ` | String | No | ` main ` | Git reference: branch name, tag, or commit SHA |
2323| ` path ` | String | Yes | - | Path to configuration file within the repository |
24- | ` clone_path ` | String | No | ` /tmp/fluentbit-git-repo ` | Local directory for git clone and state storage |
24+ | ` config_dir ` | String | No | ` /tmp/fluentbit-git-repo ` | Local directory for git clone and state storage |
2525| ` poll_interval ` | Integer | No | ` 60 ` | Polling interval in seconds to check for updates |
2626
2727The Git repository URL. Supports multiple protocols:
@@ -55,7 +55,7 @@ Examples:
5555- ` config/production.yaml `
5656- ` environments/prod/fluent-bit.conf `
5757
58- #### ` clone_path `
58+ #### ` config_dir `
5959
6060Local directory where:
6161
@@ -94,7 +94,7 @@ customs:
9494 repo : https://github.com/myorg/fluent-bit-configs.git
9595 ref : main
9696 path : fluent-bit.yaml
97- clone_path : /tmp/fluentbit-git
97+ config_dir : /tmp/fluentbit-git
9898 poll_interval : 60
9999` ` `
100100
@@ -118,7 +118,7 @@ customs:
118118 repo: https://github.com/myorg/configs.git
119119 ref: a3f5c89d124b3e567890abcdef123456789abcde
120120 path: config/development.yaml
121- clone_path : /var/lib/fluent-bit/git-clone
121+ config_dir : /var/lib/fluent-bit/git-clone
122122 poll_interval: 10
123123` ` `
124124
@@ -142,7 +142,7 @@ customs:
142142 repo: https://github.com/myorg/configs.git
143143 ref: production
144144 path: fluent-bit.yaml
145- clone_path : /var/lib/fluent-bit/git-config
145+ config_dir : /var/lib/fluent-bit/git-config
146146 poll_interval: 300 # Check every 5 minutes
147147
148148pipeline:
@@ -160,7 +160,7 @@ pipeline:
160160The plugin stores the last processed commit SHA in a state file :
161161
162162` ` ` shell
163- {clone_path }/.last_sha
163+ {config_dir }/.last_sha
164164` ` `
165165
166166This state file :
@@ -175,7 +175,7 @@ When a configuration change is detected:
175175
1761761. **Sync** : Clone or pull the latest changes from the repository
1771772. **Extract** : Read the specified configuration file from the repository
178- 3. **Write** : Write the configuration to `{clone_path }/{sha}.yaml`
178+ 3. **Write** : Write the configuration to `{config_dir }/{sha}.yaml`
1791794. **Save State** : Update `.last_sha` with the new commit SHA
1801805. **Reload** : Send `SIGHUP` signal (Unix) or `CTRL_BREAK` event (Windows) to trigger Fluent Bit reload
1811816. **Pause** : Collector is paused during reload to prevent conflicts
@@ -353,6 +353,13 @@ Large repositories with extensive history may slow initial cloning. Consider:
353353
354354# # Troubleshooting
355355
356+ Always enable debug logging as a first step :
357+
358+ ` ` ` yaml
359+ service:
360+ log_level: debug
361+ ` ` `
362+
356363# ## Authentication Failures
357364
358365For SSH :
@@ -375,19 +382,12 @@ git ls-remote https://token@github.com/user/repo.git
375382
376383# ## Changes Not Detected
377384
378- Enable debug logging to see polling activity :
379-
380- ` ` ` yaml
381- service:
382- log_level: debug
383- ` ` `
384-
385385Check :
386386
387387- Remote repository actually has new commits
388388- ` ref` points to the branch/tag you expect
389389- Polling interval hasn't elapsed yet
390- - State file permissions : ` ls -la {clone_path }/.last_sha`
390+ - State file permissions : ` ls -la {config_dir }/.last_sha`
391391- Metrics : ` curl http://localhost:2020/api/v1/metrics/prometheus | grep git_config`
392392
393393# ## Reload Failures
@@ -412,7 +412,7 @@ Common causes:
412412- Network connectivity issues
413413- Authentication failures
414414- Repository access problems
415- - Disk space issues in clone_path
415+ - Disk space issues in `config_dir`
416416
417417# # Security Considerations
418418
@@ -423,7 +423,7 @@ Common causes:
423423
4244242. **State File** :
425425 - Contains only the commit SHA (no sensitive data)
426- - Ensure `clone_path ` permissions prevent unauthorized access
426+ - Ensure `config_dir ` permissions prevent unauthorized access
427427
4284283. **Configuration Files** :
429429 - Validate configuration before pushing to Git
0 commit comments