command
module
Version:
v0.0.0-...-107166e
Opens a new window with list of versions in this module.
Published: Oct 18, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 20
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Caddy Log Monitor
This Go application monitors Caddy server logs, tracks IPFS CID requests, and exposes Prometheus metrics.
Features
- Real-time log file monitoring
- Tracks unique CIDs and their request counts
- Exposes Prometheus metrics
- Provides a health check endpoint
Usage
-
Build the application:
go build -o caddy-log-monitor
-
Run the application:
./caddy-log-monitor -log /path/to/caddy/access.log -port 8080 -bind 127.0.0.1 -db /path/to/leveldb
Flags
- -log: Path to the Caddy access log file (required)
- -port: Port to listen on (default: 8080)
- -bind: Address to bind to (default: 127.0.0.1)
- -db: Path to LevelDB database (default: in-memory)
- -h, -help: Show help
Endpoints
- /metrics: Prometheus metrics
- /health: Health check
Dependencies
- github.com/fsnotify/fsnotify
- github.com/prometheus/client_golang
- github.com/syndtr/goleveldb
License
This project is licensed under the Apache License 2.0.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.