X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/92656b214ed120c631bc6adab3b35992939e2ced..4659594d40987a2bab1ff75d015de5d46113692d:/services/health/main.go?ds=sidebyside diff --git a/services/health/main.go b/services/health/main.go index 4b553659ed..21fcf4d674 100644 --- a/services/health/main.go +++ b/services/health/main.go @@ -1,15 +1,18 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( "flag" "fmt" "net/http" - "os" "git.curoverse.com/arvados.git/sdk/go/arvados" "git.curoverse.com/arvados.git/sdk/go/health" "git.curoverse.com/arvados.git/sdk/go/httpserver" - log "github.com/Sirupsen/logrus" + log "github.com/sirupsen/logrus" ) var version = "dev" @@ -21,14 +24,14 @@ func main() { // Print version information if requested if *getVersion { - fmt.Printf("Version: %s\n", version) - os.Exit(0) + fmt.Printf("arvados-health %s\n", version) + return } log.SetFormatter(&log.JSONFormatter{ TimestampFormat: "2006-01-02T15:04:05.000000000Z07:00", }) - log.Printf("arvados health %q started", version) + log.Printf("arvados-health %s started", version) cfg, err := arvados.GetConfig(*configFile) if err != nil { @@ -38,7 +41,7 @@ func main() { if err != nil { log.Fatal(err) } - nodeCfg, err := clusterCfg.GetThisSystemNode() + nodeCfg, err := clusterCfg.GetNodeProfile("") if err != nil { log.Fatal(err) }