A Go-based tool for analyzing Renovate logs and reporting issues to Kite API. Part of the MintMaker ecosystem.
This tool runs as the final step of Tekton pipelines created by the MintMaker controller. It analyzes Renovate JSON logs, extracts and categorizes issues, and reports them to Kite API for display in the Konflux UI Issues dashboard.
- Dual Processing: Level-based (ERROR/FATAL) and message-based pattern matching
- Smart Error Extraction: Condenses verbose stack traces to essential information
- Categorization: Automatically categorizes issues as Errors, Warnings, or Infos
- Kite Integration: Sends webhook notifications to Kite API with analyzed results
- Log Processing: Reads Renovate JSON logs and extracts ERROR (level 50) and FATAL (level 60) entries
- Error Aggregation: Aggregates level-based errors by message with duplicate tracking
- Selector Checks: Pattern matches log messages against predefined selectors to extract meaningful issues
- Health Check: Verifies Kite API availability before sending webhooks
- Webhook Notification: Sends
pipeline-success,pipeline-failure, ormintmaker-customwebhooks based on findings
# Set required environment variables
export NAMESPACE=your-namespace
export KITE_API_URL=https://kite-api.example.com
export GIT_HOST=github.com
export REPOSITORY=owner/repo
export BRANCH=main
export LOG_FILE="./pkg/doctor/testdata/test_logs.json"
# Run the analyzer
go run ./cmd/log-analyzer/main.go --devFor detailed documentation, see docs/README.md, which includes:
- Architecture and implementation details
- Complete selector list with examples
extractUsefulErrorfunction documentation- Local testing guide
- Kite client documentation
NAMESPACE: Kubernetes namespaceKITE_API_URL: URL to the Kite API endpoint
GIT_HOST: Git host (default: "unknown")REPOSITORY: Repository name (default: "unknown")BRANCH: Branch name (default: "unknown")LOG_FILE: Path to log file (default:/workspace/shared-data/renovate-logs.json)PIPELINE_RUN: Pipeline run identifier (default: "unknown")
--dev: Enable development mode with debug logging and source locations
renovate-log-analyzer/
├── cmd/
│ └── log-analyzer/
│ └── main.go # Entry point
├── pkg/
│ ├── doctor/ # Log analysis package
│ │ ├── checks.go # Selector definitions
│ │ ├── models.go # Data models
│ │ ├── report.go # Report generation
│ │ └── log_reader.go # Log processing
│ └── kite/ # Kite API client
│ └── client.go
└── docs/
└── README.md # Detailed documentation
Licensed under the Apache License, Version 2.0. See licenses/LICENSE for details.