Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/cmd/lokitool/main.go

30 lines
595 B

package main
import (
"fmt"
"os"
"github.com/alecthomas/kingpin/v2"
"github.com/prometheus/common/version"
"github.com/grafana/loki/v3/pkg/tool/commands"
)
var (
ruleCommand commands.RuleCommand
auditCommand commands.AuditCommand
)
func main() {
app := kingpin.New("lokitool", "A command-line tool to manage Loki.")
ruleCommand.Register(app)
auditCommand.Register(app)
app.Command("version", "Get the version of the lokitool CLI").Action(func(_ *kingpin.ParseContext) error {
fmt.Println(version.Print("loki"))
return nil
})
kingpin.MustParse(app.Parse(os.Args[1:]))
}