/devops-skills:fluentbit-validatorfrom devops-skills
Validates, lints, and tests Fluent Bit configurations with syntax checks, security auditing, best practices, and dry-run testing.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill provides a comprehensive validation workflow for Fluent Bit configurations, combining syntax validation, semantic checks, security auditing, best practice enforcement, and dry-run testing. Validate Fluent Bit configs with confidence before deploying to production.
Fluent Bit uses an INI-like configuration format with sections ([SERVICE], [INPUT], [FILTER], [OUTPUT], [PARSER]) and key-value pairs. This validator ensures configurations are syntactically correct, semantically valid, secure, and optimized for production use.
Invoke this skill when:
Follow this sequential validation workflow. Each stage catches different types of issues.
Recommended: For comprehensive validation, use
--check allwhich runs all validation stages in sequence:python3 scripts/validate_config.py --file <config-file> --check allIndividual check modes are available for targeted validation when debugging specific issues.
Verify the basic file structure and format:
python3 scripts/validate_config.py --file <config-file> --check structure
Expected format:
[SECTION] headers#Common issues caught:
Validate all configuration sections (SERVICE, INPUT, FILTER, OUTPUT, PARSER):
python3 scripts/validate_config.py --file <config-file> --check sections
This single command validates all section types. The checks performed for each section type are detailed below.
Checks:
Common issues:
Best practices:
Checks:
Common issues:
Best practices:
Checks:
Common issues:
Best practices:
Checks:
Common issues:
Best practices:
Checks:
Common issues:
Best practices:
Validate that tags flow correctly through the pipeline:
python3 scripts/validate_config.py --file <config-file> --check tags
Checks:
Common issues:
Example validation:
[INPUT]
Tag kube.* # Produces: kube.var.log.containers.pod.log
[FILTER]
Match kube.* # Matches: ✅
[OUTPUT]
Match app.* # Matches: ❌ No logs will reach this output
Scan configuration for security issues:
python3 scripts/validate_config.py --file <config-file> --check security
Checks performed:
Hardcoded credentials:
TLS configuration:
File permissions:
Network exposure:
Security best practices:
HTTP_User ${ES_USER}tls Ontls.verify OnAuto-fix suggestions:
# Before (insecure)
[OUTPUT]
HTTP_User admin
HTTP_Passwd password123
# After (secure)
[OUTPUT]
HTTP_User ${ES_USER}
HTTP_Passwd ${ES_PASSWORD}
Analyze configuration for performance issues:
python3 scripts/validate_config.py --file <config-file> --check performance
Checks:
Buffer limits:
Flush intervals:
Resource usage:
Kubernetes-specific:
Performance recommendations:
# Good configuration
[SERVICE]
Flush 1 # 1 second: good balance
[INPUT]
Mem_Buf_Limit 50MB # Prevents OOM
Skip_Long_Lines On # Prevents hang
Refresh_Interval 10 # File discovery every 10s
[OUTPUT]
storage.total_limit_size 5G # Disk buffer limit
Retry_Limit 3 # Don't retry forever
Compress gzip # Reduce bandwidth
Check against Fluent Bit best practices:
python3 scripts/validate_config.py --file <config-file> --check best-practices
Checks:
Required configurations:
Kubernetes configurations:
Reliability:
Observability:
Best practice checklist:
Test configuration with Fluent Bit dry-run (if binary available):
fluent-bit -c <config-file> --dry-run
This catches:
Common errors:
[error] [config] parser file 'parsers.conf' not found
Fix: Create parser file or update Parsers_File path
[error] [plugins] invalid plugin 'unknownplugin'
Fix: Check plugin name spelling or install plugin
[error] [input:tail] invalid property 'InvalidParam'
Fix: Remove invalid parameter or check documentation
[error] cannot open /var/log/containers/*.log
Fix: Check file permissions or run with appropriate user
If fluent-bit binary is not available:
If configuration uses unfamiliar plugins or parameters:
Try context7 MCP first:
Use mcp__context7__resolve-library-id with "fluent-bit"
Then use mcp__context7__get-library-docs with:
- context7CompatibleLibraryID: /fluent/fluent-bit-docs
- topic: "<plugin-type> <plugin-name> configuration"
- page: 1
Fallback to WebSearch:
Search query: "fluent-bit <plugin-type> <plugin-name> configuration parameters site:docs.fluentbit.io"
Examples:
- "fluent-bit output elasticsearch configuration parameters site:docs.fluentbit.io"
- "fluent-bit filter kubernetes configuration parameters site:docs.fluentbit.io"
Extract information:
After validation, present comprehensive findings:
1. Summarize all issues:
Validation Report for fluent-bit.conf
=====================================
Errors (3):
- [Line 15] OUTPUT elasticsearch missing required parameter 'Host'
- [Line 25] FILTER Match pattern 'app.*' doesn't match any INPUT tags
- [Line 8] INPUT tail missing Mem_Buf_Limit (OOM risk)
Warnings (2):
- [Line 30] OUTPUT elasticsearch has hardcoded password (security risk)
- [Line 12] INPUT tail missing DB file (no crash recovery)
Info (1):
- [Line 3] SERVICE Flush interval is 10s (consider reducing for lower latency)
Best Practices (2):
- Consider enabling HTTP_Server for health checks
- Consider enabling compression on OUTPUT elasticsearch
2. Categorize by severity:
3. Propose specific fixes:
# Fix 1: Add missing Host parameter
[OUTPUT]
Name es
Match *
Host elasticsearch.logging.svc # Added
Port 9200
# Fix 2: Add Mem_Buf_Limit to prevent OOM
[INPUT]
Name tail
Tag kube.*
Path /var/log/containers/*.log
Mem_Buf_Limit 50MB # Added
# Fix 3: Use environment variable for password
[OUTPUT]
Name es
HTTP_User admin
HTTP_Passwd ${ES_PASSWORD} # Changed from hardcoded
4. Get user approval via AskUserQuestion
5. Apply approved fixes using Edit tool
6. Re-run validation to confirm
7. Provide completion summary:
✅ Validation Complete - 5 issues fixed
Fixed Issues:
- fluent-bit.conf:15 - Added missing Host parameter to OUTPUT elasticsearch
- fluent-bit.conf:8 - Added Mem_Buf_Limit 50MB to INPUT tail
- fluent-bit.conf:30 - Changed hardcoded password to environment variable
- fluent-bit.conf:12 - Added DB file for crash recovery
- fluent-bit.conf:25 - Fixed FILTER Match pattern to match INPUT tags
Validation Status: All checks passed ✅
- Structure: Valid
- Syntax: Valid
- Tags: Consistent
- Security: No issues
- Performance: Optimized
- Best Practices: Compliant
- Dry-run: Passed (if applicable)
8. Report-only summary (when user declines fixes):
If user chooses not to apply fixes, provide a report-only summary:
📋 Validation Report Complete - No fixes applied
Summary:
- Errors: 2 (must fix before deployment)
- Warnings: 16 (should fix)
- Info: 15 (optimization suggestions)
Critical Issues Requiring Attention:
- [Line 5] Invalid Log_Level 'invalid_level'
- [Line 52] [OUTPUT opentelemetry] missing required parameter 'Host'
Recommendations:
- Review the errors above before deploying this configuration
- Consider addressing warnings to improve reliability and security
- Run validation again after manual fixes: python3 scripts/validate_config.py --file <config> --check all
Issue: Parser file not found
[error] [config] parser file 'parsers.conf' not found
Solution:
Issue: Missing required parameter
[error] [output:es] property 'Host' not set
Solution:
Issue: Invalid plugin name
[error] [plugins] invalid plugin 'unknownplugin'
Solution:
Issue: No logs reaching output
# Logs are generated but don't appear in output
Debug:
Log_Level debugSolution:
[INPUT]
Tag kube.*
[FILTER]
Match kube.* # Must match INPUT Tag
[OUTPUT]
Match kube.* # Must match INPUT or FILTER tag
Issue: Fluent Bit OOM killed
# Container or process killed due to memory
Solution:
Issue: Hardcoded credentials in config
[OUTPUT]
HTTP_Passwd secretpassword
Solution:
[OUTPUT]
HTTP_Passwd ${ES_PASSWORD}
Issue: TLS disabled or not verified
[OUTPUT]
tls On
tls.verify Off
Solution:
[OUTPUT]
tls On
tls.verify On
tls.ca_file /path/to/ca.crt
This validator is automatically invoked by the fluentbit-generator skill after generating configurations. It can also be used standalone to validate existing configurations.
Generator workflow:
validate_config.py
python3 scripts/validate_config.py --file <config> --check <type>all, structure, syntax, sections, tags, security, performance, best-practices, dry-run--jsonvalidate.sh
bash scripts/validate.sh <config-file>Test Configuration Files:
valid-basic.conf - Valid basic Kubernetes logging setupvalid-multioutput.conf - Valid configuration with multiple outputsvalid-opentelemetry.conf - Valid OpenTelemetry output configuration (Fluent Bit 2.x+)invalid-missing-required.conf - Missing required parametersinvalid-security-issues.conf - Security vulnerabilities (hardcoded credentials, disabled TLS)invalid-opentelemetry.conf - OpenTelemetry configuration errorsinvalid-tag-mismatch.conf - Tag routing issuesRunning Tests:
# Test on valid config
python3 scripts/validate_config.py --file tests/valid-basic.conf
# Test on invalid config (should report errors)
python3 scripts/validate_config.py --file tests/invalid-security-issues.conf
# Test all configs
for config in tests/*.conf; do
echo "Testing $config"
python3 scripts/validate_config.py --file "$config"
done
Based on comprehensive research from:
scripts/validate.sh (opens in a new tab)scripts/validate_config.py (opens in a new tab)tests/invalid-missing-required.conf (opens in a new tab)tests/invalid-opentelemetry.conf (opens in a new tab)tests/invalid-security-issues.conf (opens in a new tab)tests/invalid-tag-mismatch.conf (opens in a new tab)tests/valid-basic.conf (opens in a new tab)tests/valid-multioutput.conf (opens in a new tab)tests/valid-opentelemetry.conf (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
fluent-bit, config-validation, linting, security-audit, dry-run
Generated from the plugin's indexed repository (gitjfmd/ansible-skills) — no native marketplace selected
npx claudepluginhub p/gitjfmd-devops-skills-devops-skills-plugin31 skills in this plugin
/ansible-generatorComprehensive toolkit for generating best practice Ansible playbooks, roles, tasks, and inventory files./ansible-validatorComprehensive toolkit for validating, linting, testing, and automating Ansible playbooks, roles, and collections. Use this skill when working with Ansible files (.yml, .yaml playbooks, roles, inventories), validating automation code, debugging playbook execution, performing dry-run testing with check mode, or working with custom modules and collections./azure-pipelines-generatorComprehensive toolkit for generating best practice Azure DevOps Pipelines following current standards and conventions. Use this skill when creating new Azure Pipelines, implementing CI/CD workflows, or building deployment pipelines.Other plugins' skills for the same job