Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: go/src/infra/monitoring/dispatcher/dispatcher.go

Issue 1153883002: go: infra/libs/* now live in luci-go. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: move the rest too Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « go/src/infra/monitoring/client/client.go ('k') | go/src/infra/monitoring/messages/alerts.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Dispatcher usage: 5 // Dispatcher usage:
6 // go run infra/monitoring/dispatcher 6 // go run infra/monitoring/dispatcher
7 // Expects gatekeeper.json to be in the current directory. 7 // Expects gatekeeper.json to be in the current directory.
8 // Runs a single check, prints out diagnosis and exits. 8 // Runs a single check, prints out diagnosis and exits.
9 // TODO(seanmccullough): Run continuously. Also, consider renaming to 'patrol' 9 // TODO(seanmccullough): Run continuously. Also, consider renaming to 'patrol'
10 // or 'scanner' because that's really what this thing does. 10 // or 'scanner' because that's really what this thing does.
11 11
12 package main 12 package main
13 13
14 import ( 14 import (
15 "encoding/json" 15 "encoding/json"
16 "flag" 16 "flag"
17 "fmt" 17 "fmt"
18 "io/ioutil" 18 "io/ioutil"
19 "os" 19 "os"
20 "strings" 20 "strings"
21 "time" 21 "time"
22 22
23 » "infra/libs/logging/gologger" 23 » "github.com/luci/luci-go/common/logging/gologger"
24 24
25 "infra/monitoring/analyzer" 25 "infra/monitoring/analyzer"
26 "infra/monitoring/client" 26 "infra/monitoring/client"
27 "infra/monitoring/messages" 27 "infra/monitoring/messages"
28 ) 28 )
29 29
30 var ( 30 var (
31 dataURL = flag.String("data_url", "", "Url where alerts are stored") 31 dataURL = flag.String("data_url", "", "Url where alerts are stored")
32 masterFilter = flag.String("master-filter", "", "Filter out maste rs that contain this string") 32 masterFilter = flag.String("master-filter", "", "Filter out maste rs that contain this string")
33 masterOnly = flag.String("master", "", "Only check this master" ) 33 masterOnly = flag.String("master", "", "Only check this master" )
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } 169 }
170 170
171 log.Infof("Filtered failures: %v", filteredFailures) 171 log.Infof("Filtered failures: %v", filteredFailures)
172 a.Client.DumpStats() 172 a.Client.DumpStats()
173 log.Infof("Elapsed time: %v", time.Since(start)) 173 log.Infof("Elapsed time: %v", time.Since(start))
174 if len(errs) > 0 { 174 if len(errs) > 0 {
175 os.Exit(1) 175 os.Exit(1)
176 } 176 }
177 } 177 }
OLDNEW
« no previous file with comments | « go/src/infra/monitoring/client/client.go ('k') | go/src/infra/monitoring/messages/alerts.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698