diff --git a/plugins/aggregators/basicstats/basicstats_test.go b/plugins/aggregators/basicstats/basicstats_test.go index 5c55284de..040cb0b82 100644 --- a/plugins/aggregators/basicstats/basicstats_test.go +++ b/plugins/aggregators/basicstats/basicstats_test.go @@ -291,7 +291,7 @@ func TestBasicStatsWithOnlySum(t *testing.T) { } // Verify that sum doesn't suffer from floating point errors. Early -// implementations of sum were calulated from mean and count, which +// implementations of sum were calculated from mean and count, which // e.g. summed "1, 1, 5, 1" as "7.999999..." instead of 8. func TestBasicStatsWithOnlySumFloatingPointErrata(t *testing.T) { @@ -509,7 +509,7 @@ func TestBasicStatsWithUnknownStat(t *testing.T) { } // Test that if Stats isn't supplied, then we only do count, min, max, mean, -// stdev, and s2. We purposely exclude sum for backwards compatability, +// stdev, and s2. We purposely exclude sum for backwards compatibility, // otherwise user's working systems will suddenly (and surprisingly) start // capturing sum without their input. func TestBasicStatsWithDefaultStats(t *testing.T) { diff --git a/plugins/aggregators/valuecounter/valuecounter.go b/plugins/aggregators/valuecounter/valuecounter.go index c43b7723b..05f4945d2 100644 --- a/plugins/aggregators/valuecounter/valuecounter.go +++ b/plugins/aggregators/valuecounter/valuecounter.go @@ -20,7 +20,7 @@ type ValueCounter struct { Fields []string } -// NewValueCounter create a new aggregation plugin which counts the occurances +// NewValueCounter create a new aggregation plugin which counts the occurrences // of fields and emits the count. func NewValueCounter() telegraf.Aggregator { vc := &ValueCounter{} @@ -46,7 +46,7 @@ func (vc *ValueCounter) SampleConfig() string { // Description returns the description of the ValueCounter plugin func (vc *ValueCounter) Description() string { - return "Count the occurance of values in fields." + return "Count the occurrence of values in fields." } // Add is run on every metric which passes the plugin diff --git a/plugins/inputs/procstat/native_finder_notwindows.go b/plugins/inputs/procstat/native_finder_notwindows.go index 533b7333a..a1683aad3 100644 --- a/plugins/inputs/procstat/native_finder_notwindows.go +++ b/plugins/inputs/procstat/native_finder_notwindows.go @@ -33,7 +33,7 @@ func (pg *NativeFinder) Pattern(pattern string) ([]PID, error) { return pids, err } -//FullPattern matches on the command line when the proccess was executed +//FullPattern matches on the command line when the process was executed func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error) { var pids []PID regxPattern, err := regexp.Compile(pattern) diff --git a/plugins/outputs/cratedb/cratedb.go b/plugins/outputs/cratedb/cratedb.go index 01213011f..bac1c730a 100644 --- a/plugins/outputs/cratedb/cratedb.go +++ b/plugins/outputs/cratedb/cratedb.go @@ -183,7 +183,7 @@ func escapeObject(m map[string]interface{}) (string, error) { return `{` + strings.Join(pairs, ", ") + `}`, nil } -// escapeString wraps s in the given quote string and replaces all occurences +// escapeString wraps s in the given quote string and replaces all occurrences // of it inside of s with a double quote. func escapeString(s string, quote string) string { return quote + strings.Replace(s, quote, quote+quote, -1) + quote @@ -191,7 +191,7 @@ func escapeString(s string, quote string) string { // hashID returns a cryptographic hash int64 hash that includes the metric name // and tags. It's used instead of m.HashID() because it's not considered stable -// and because a cryptogtaphic hash makes more sense for the use case of +// and because a cryptographic hash makes more sense for the use case of // deduplication. // [1] https://github.com/influxdata/telegraf/pull/3210#discussion_r148411201 func hashID(m telegraf.Metric) int64 { diff --git a/plugins/outputs/graphite/graphite.go b/plugins/outputs/graphite/graphite.go index c26c1587f..09cdbe080 100644 --- a/plugins/outputs/graphite/graphite.go +++ b/plugins/outputs/graphite/graphite.go @@ -173,7 +173,7 @@ func (g *Graphite) send(batch []byte) error { if _, e := g.conns[n].Write(batch); e != nil { // Error log.Println("E! Graphite Error: " + e.Error()) - // Close explicitely + // Close explicitly g.conns[n].Close() // Let's try the next one } else { diff --git a/plugins/outputs/influxdb/http.go b/plugins/outputs/influxdb/http.go index 236d04321..5a589dc0e 100644 --- a/plugins/outputs/influxdb/http.go +++ b/plugins/outputs/influxdb/http.go @@ -220,7 +220,7 @@ func (c *httpClient) Database() string { return c.database } -// CreateDatabase attemps to create a new database in the InfluxDB server. +// CreateDatabase attempts to create a new database in the InfluxDB server. // Note that some names are not allowed by the server, notably those with // non-printable characters or slashes. func (c *httpClient) CreateDatabase(ctx context.Context) error { diff --git a/plugins/parsers/grok/parser_test.go b/plugins/parsers/grok/parser_test.go index cda88ed3d..e3426b0fc 100644 --- a/plugins/parsers/grok/parser_test.go +++ b/plugins/parsers/grok/parser_test.go @@ -957,7 +957,7 @@ func TestReplaceTimestampComma(t *testing.T) { require.Equal(t, 2018, m.Time().Year()) require.Equal(t, 13, m.Time().Hour()) require.Equal(t, 34, m.Time().Second()) - //Convert Nanosecond to milisecond for compare + // Convert nanosecond to millisecond for compare require.Equal(t, 555, m.Time().Nanosecond()/1000000) } diff --git a/plugins/processors/topk/topk.go b/plugins/processors/topk/topk.go index 8a52fa8d4..ba5a0c783 100644 --- a/plugins/processors/topk/topk.go +++ b/plugins/processors/topk/topk.go @@ -209,7 +209,7 @@ func (t *TopK) Apply(in ...telegraf.Metric) []telegraf.Metric { // Add the metrics received to our internal cache for _, m := range in { - // Check if the metric has any of the fields over wich we are aggregating + // Check if the metric has any of the fields over which we are aggregating hasField := false for _, f := range t.Fields { if m.HasField(f) { @@ -279,7 +279,7 @@ func (t *TopK) push() []telegraf.Metric { // Sort the aggregations sortMetrics(aggregations, field, t.Bottomk) - // Create a one dimentional list with the top K metrics of each key + // Create a one dimensional list with the top K metrics of each key for i, ag := range aggregations[0:min(t.K, len(aggregations))] { // Check whether of not we need to add fields of tags to the selected metrics diff --git a/plugins/serializers/splunkmetric/splunkmetric.go b/plugins/serializers/splunkmetric/splunkmetric.go index 77de49ee0..01643e334 100644 --- a/plugins/serializers/splunkmetric/splunkmetric.go +++ b/plugins/serializers/splunkmetric/splunkmetric.go @@ -52,7 +52,7 @@ func (s *serializer) createObject(metric telegraf.Metric) (metricGroup []byte, e ** metric_name: The name of the metric ** _value: The value for the metric ** time: The timestamp for the metric - ** All other index fields become deminsions. + ** All other index fields become dimensions. */ type HECTimeSeries struct { Time float64 `json:"time"`