OpsLog is a pluggable log and ops-telemetry platform.
It collects logs, host configuration, resource metrics, and connectivity probes, ships them over selectable transports, and writes them to destinations such as the filesystem, MySQL, and ClickHouse. A built-in Web Console is embedded in the server.
./deploy.sh build
./deploy.sh up
./deploy.sh url
# open http://127.0.0.1:8600/Useful commands (styled after cloudsystem/auth all_in_one.sh):
./deploy.sh help
./deploy.sh logs -f
./deploy.sh status
./deploy.sh restart
./deploy.sh down
COMPOSE_PROFILES=full ./deploy.sh up # also start mysql + clickhousego run ./cmd/opslog-server
# or with an explicit config
go run ./cmd/opslog-server -config configs/opslog.yml
# or
./deploy.sh runConsole: http://127.0.0.1:8600/
go get github.com/go-the-way/opslog@latestpackage main
import (
"context"
"time"
"github.com/go-the-way/opslog/sdk"
"github.com/go-the-way/opslog/sdk/agent"
"github.com/go-the-way/opslog/sdk/collectors"
"github.com/go-the-way/opslog/sdk/transport"
)
func main() {
httpTransport, _ := transport.NewHTTPTransport("http", "http://127.0.0.1:8600/ingest")
a, err := agent.NewAgent(
agent.WithService("order-api"),
agent.WithTransport(httpTransport),
agent.WithCollector(collectors.NewRuntime()),
agent.WithCollector(collectors.NewHost()),
agent.WithCollectInterval(15*time.Second),
)
if err != nil { panic(err) }
defer a.Close()
_ = a.Start(context.Background())
a.Logger().Info("hello opslog", sdk.String("k", "v"))
_ = a.Sync()
}See examples/go-app for a runnable sample. Prefer HTTP ingest — diagnostic payloads (env/sys/stack) often exceed OS UDP limits and are dropped silently.
| Port | Protocol | Purpose |
|---|---|---|
| 8600 | TCP | Web Console + Query API + HTTP/WS ingest |
| 8141 | TCP | TCP length-prefixed ingest |
| 8900 | TCP | gRPC ingest |
Dockerfile— multi-stage build ofopslog-server(embedded console)docker-compose.yml—opslogservice; optional profilesmysql/clickhouse/full- Config mount:
configs/opslog.yml - Data volume:
opslog-data→/app/data(filesystem output)
docker compose config # validate
./deploy.sh config # same via wrapperPoint the SDK at HTTP ingest: http://127.0.0.1:8600/ingest.
Open http://127.0.0.1:8600/ after server start (browser will prompt for HTTP Basic Auth):
- Log search (time / level / service / keyword)
- Live Tail (WebSocket)
- Metrics / probes / config snapshots
- Filesystem archive list + restore
Default credentials (change in configs/opslog.yml): opslog / opslog
web:
basic_auth:
enabled: true # false disables auth
username: opslog
password: opslog # empty password also disables authProtected: static UI (/) only. Query APIs (/api/*) and ingest (/ingest, /stream, TCP/gRPC) stay open for SDKs/tools by default.
Optional ingest Bearer (HTTP/WS only): set http.token in configs/opslog.yml; clients send Authorization: Bearer <token>. This is separate from web.basic_auth.
| Doc | Description |
|---|---|
| Architecture | System architecture |
| Interfaces | Module and interface contracts |
| SDK | SDK embedding |
| Outputs | filesystem / MySQL / ClickHouse |
opslog/
├── cmd/opslog-server/ # server entry
├── sdk/ # embeddable Go SDK
├── server/ # server public Run() + contracts/internal
├── pkg/ # signal / transport / query / codec
├── opslog.yml # default server config
├── configs/example.yaml # optional example copy
├── deploy.sh # Docker/local ops entry
├── Dockerfile
└── docker-compose.yml
| Area | Status |
|---|---|
| SDK (Agent/Logger/Collectors/Transports) | Implemented |
| Server inputs (http/ws/tcp/grpc; udp optional) | Implemented |
| Outputs filesystem / mysql / clickhouse | Implemented |
| Web Console + Query API | Implemented |
| Docker + deploy.sh | Implemented |
| kafka / elasticsearch outputs | Reserved (fail-fast) |
go build ./...Apache License 2.0 — see LICENSE.