Files
zeekay 4e3a8ef9ca merge: upstream/main (preserve Hanzo brand, 50 commits)
# Conflicts:
#	api/v1alpha1/casting.go
#	api/v1alpha1/installation/signoz.go
#	docs/casting.md
#	docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml
#	docs/examples/systemd/binary/pours/deployment/signoz-ingester.service
#	docs/examples/systemd/binary/pours/deployment/signoz-signoz.service
#	docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service
#	docs/schemas/v1alpha1.yaml
#	internal/foundry/registry.go
#	internal/instrumentation/handler.go
#	internal/molding/signozmolding/signoz.go
2026-06-02 09:59:25 -07:00

42 lines
1.0 KiB
Go

package clickhousetooler
import (
"context"
"os"
root "github.com/hanzoai/o11y-foundry/internal/tooler"
)
var _ root.Tooler = (*clickhouseTooler)(nil)
type clickhouseTooler struct{}
func New() *clickhouseTooler {
return &clickhouseTooler{}
}
func (tooler *clickhouseTooler) Name() string {
return "clickhouse"
}
func (tooler *clickhouseTooler) Gauge(ctx context.Context) error {
// Check if clickhouse-server command is available
if err := root.ExecChecker(ctx, "clickhouse-server"); err == nil {
return nil
}
// Fallback: check if the binary exists at the standard location
binaryPath := "/usr/bin/clickhouse-server"
if _, err := os.Stat(binaryPath); err == nil {
return nil
}
return errors.Newf(errors.TypeNotFound, "clickhouse-server not found: neither command nor binary at %s", binaryPath)
}
func (tooler *clickhouseTooler) Install(ctx context.Context) error {
// ClickHouse is typically installed via package manager
// Installation instructions would depend on the OS distribution
return nil
}