mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-11-03 02:08:34 +00:00
# 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
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package clickhousekeepertooler
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
root "github.com/hanzoai/o11y-foundry/internal/tooler"
|
|
)
|
|
|
|
var _ root.Tooler = (*clickhouseKeeperTooler)(nil)
|
|
|
|
type clickhouseKeeperTooler struct{}
|
|
|
|
func New() *clickhouseKeeperTooler {
|
|
return &clickhouseKeeperTooler{}
|
|
}
|
|
|
|
func (tooler *clickhouseKeeperTooler) Name() string {
|
|
return "clickhouse-keeper"
|
|
}
|
|
|
|
func (tooler *clickhouseKeeperTooler) Gauge(ctx context.Context) error {
|
|
// Check if clickhouse-keeper command is available
|
|
if err := root.ExecChecker(ctx, "clickhouse-keeper"); err == nil {
|
|
return nil
|
|
}
|
|
|
|
// Fallback: check if the binary exists at the standard location
|
|
binaryPath := "/usr/bin/clickhouse-keeper"
|
|
if _, err := os.Stat(binaryPath); err == nil {
|
|
return nil
|
|
}
|
|
|
|
return errors.Newf(errors.TypeNotFound, "clickhouse-keeper not found: neither command nor binary at %s", binaryPath)
|
|
}
|
|
|
|
func (tooler *clickhouseKeeperTooler) Install(ctx context.Context) error {
|
|
// ClickHouse Keeper is typically installed via package manager
|
|
// Installation instructions would depend on the OS distribution
|
|
return nil
|
|
}
|