From c637ca1a6e48cd57c6aee6d8ebf9b24ba484e4cd Mon Sep 17 00:00:00 2001 From: Karsten Weiss Date: Tue, 12 Mar 2019 10:29:26 +0100 Subject: [PATCH] Fix typos in comments and metric HELPs (#1790) No functional change. Signed-off-by: Karsten Weiss --- CHANGELOG.md | 2 +- cli/silence_query.go | 2 +- cli/test_routing.go | 2 +- cluster/delegate.go | 8 ++++---- notify/impl.go | 4 ++-- test/with_api_v1/acceptance.go | 2 +- test/with_api_v1/acceptance/send_test.go | 2 +- test/with_api_v1/mock.go | 2 +- test/with_api_v2/acceptance.go | 2 +- test/with_api_v2/acceptance/send_test.go | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a56945..6ac82655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -349,7 +349,7 @@ This release uses a new storage backend based on BoltDB. You have to backup and wipe your former storage path to run it. * [CHANGE] Use BoltDB as data store. -* [CHANGE] Move SMTP authentification to configuration file +* [CHANGE] Move SMTP authentication to configuration file * [FEATURE] add /-/reload HTTP endpoint * [FEATURE] Filter silenced alerts in web UI * [ENHANCEMENT] reduce inhibition computation complexity diff --git a/cli/silence_query.go b/cli/silence_query.go index db6039ad..3d870083 100644 --- a/cli/silence_query.go +++ b/cli/silence_query.go @@ -75,7 +75,7 @@ preceding duration. amtool silence query --within 2h --expired -returns all silences that expired within the preceeding 2 hours. +returns all silences that expired within the preceding 2 hours. ` func configureSilenceQueryCmd(cc *kingpin.CmdClause) { diff --git a/cli/test_routing.go b/cli/test_routing.go index 0a35d4e9..91127693 100644 --- a/cli/test_routing.go +++ b/cli/test_routing.go @@ -78,7 +78,7 @@ func (c *routingShow) routingTestAction(ctx context.Context, _ *kingpin.ParseCon mainRoute := dispatch.NewRoute(cfg.Route, nil) - // Parse lables to LabelSet. + // Parse labels to LabelSet. ls, err := parseLabels(c.labels) if err != nil { kingpin.Fatalf("Failed to parse labels: %v\n", err) diff --git a/cluster/delegate.go b/cluster/delegate.go index 2c43dbc1..81cc3d53 100644 --- a/cluster/delegate.go +++ b/cluster/delegate.go @@ -53,7 +53,7 @@ func newDelegate(l log.Logger, reg prometheus.Registerer, p *Peer, retransmit in } messagesReceived := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_received_total", - Help: "Total number of cluster messsages received.", + Help: "Total number of cluster messages received.", }, []string{"msg_type"}) messagesReceivedSize := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_received_size_total", @@ -61,7 +61,7 @@ func newDelegate(l log.Logger, reg prometheus.Registerer, p *Peer, retransmit in }, []string{"msg_type"}) messagesSent := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_sent_total", - Help: "Total number of cluster messsages sent.", + Help: "Total number of cluster messages sent.", }, []string{"msg_type"}) messagesSentSize := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_sent_size_total", @@ -69,7 +69,7 @@ func newDelegate(l log.Logger, reg prometheus.Registerer, p *Peer, retransmit in }, []string{"msg_type"}) messagesPruned := prometheus.NewCounter(prometheus.CounterOpts{ Name: "alertmanager_cluster_messages_pruned_total", - Help: "Total number of cluster messsages pruned.", + Help: "Total number of cluster messages pruned.", }) gossipClusterMembers := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_members", @@ -91,7 +91,7 @@ func newDelegate(l log.Logger, reg prometheus.Registerer, p *Peer, retransmit in }) messagesQueued := prometheus.NewGaugeFunc(prometheus.GaugeOpts{ Name: "alertmanager_cluster_messages_queued", - Help: "Number of cluster messsages which are queued.", + Help: "Number of cluster messages which are queued.", }, func() float64 { return float64(bcast.NumQueued()) }) diff --git a/notify/impl.go b/notify/impl.go index 09c9a5b3..e3f9fcb8 100644 --- a/notify/impl.go +++ b/notify/impl.go @@ -958,8 +958,8 @@ func (n *Hipchat) Notify(ctx context.Context, as ...*types.Alert) (bool, error) } func (n *Hipchat) retry(statusCode int) (bool, error) { - // Response codes 429 (rate limiting) and 5xx can potentially recover. 2xx - // responce codes indicate successful requests. + // Response codes 429 (rate limiting) and 5xx can potentially recover. + // 2xx response codes indicate successful requests. // https://developer.atlassian.com/hipchat/guide/hipchat-rest-api/api-response-codes if statusCode/100 != 2 { return (statusCode == 429 || statusCode/100 == 5), fmt.Errorf("unexpected status code %v", statusCode) diff --git a/test/with_api_v1/acceptance.go b/test/with_api_v1/acceptance.go index ea181d5c..79796079 100644 --- a/test/with_api_v1/acceptance.go +++ b/test/with_api_v1/acceptance.go @@ -48,7 +48,7 @@ type AcceptanceTest struct { actions map[float64][]func() } -// AcceptanceOpts defines configuration paramters for an acceptance test. +// AcceptanceOpts defines configuration parameters for an acceptance test. type AcceptanceOpts struct { RoutePrefix string Tolerance time.Duration diff --git a/test/with_api_v1/acceptance/send_test.go b/test/with_api_v1/acceptance/send_test.go index a6ee0b55..34285239 100644 --- a/test/with_api_v1/acceptance/send_test.go +++ b/test/with_api_v1/acceptance/send_test.go @@ -121,7 +121,7 @@ receivers: // Create a new acceptance test that instantiates new Alertmanagers // with the given configuration and verifies times with the given - // tollerance. + // tolerance. at := NewAcceptanceTest(t, &AcceptanceOpts{ Tolerance: 150 * time.Millisecond, }) diff --git a/test/with_api_v1/mock.go b/test/with_api_v1/mock.go index 352b4436..a0530388 100644 --- a/test/with_api_v1/mock.go +++ b/test/with_api_v1/mock.go @@ -160,7 +160,7 @@ func Alert(keyval ...interface{}) *TestAlert { } // nativeAlert converts the declared test alert into a full alert based -// on the given paramters. +// on the given parameters. func (a *TestAlert) nativeAlert(opts *AcceptanceOpts) *model.Alert { na := &model.Alert{ Labels: a.labels, diff --git a/test/with_api_v2/acceptance.go b/test/with_api_v2/acceptance.go index 5895c113..50e40290 100644 --- a/test/with_api_v2/acceptance.go +++ b/test/with_api_v2/acceptance.go @@ -51,7 +51,7 @@ type AcceptanceTest struct { actions map[float64][]func() } -// AcceptanceOpts defines configuration paramters for an acceptance test. +// AcceptanceOpts defines configuration parameters for an acceptance test. type AcceptanceOpts struct { RoutePrefix string Tolerance time.Duration diff --git a/test/with_api_v2/acceptance/send_test.go b/test/with_api_v2/acceptance/send_test.go index 03e91cb9..988e2ef6 100644 --- a/test/with_api_v2/acceptance/send_test.go +++ b/test/with_api_v2/acceptance/send_test.go @@ -126,7 +126,7 @@ receivers: // Create a new acceptance test that instantiates new Alertmanagers // with the given configuration and verifies times with the given - // tollerance. + // tolerance. at := NewAcceptanceTest(t, &AcceptanceOpts{ Tolerance: 150 * time.Millisecond, })