Fix typos in comments (#3415)

This commit is contained in:
Maximilien Richer
2017-11-01 01:00:06 +01:00
committed by Daniel Nelson
parent 8bd21bb537
commit c569863119
26 changed files with 33 additions and 33 deletions

View File

@@ -92,7 +92,7 @@ func (c *CloudWatch) SampleConfig() string {
## Collection Delay (required - must account for metrics availability via CloudWatch API)
delay = "5m"
## Recomended: use metric 'interval' that is a multiple of 'period' to avoid
## Recommended: use metric 'interval' that is a multiple of 'period' to avoid
## gaps or overlap in pulled data
interval = "5m"

View File

@@ -21,7 +21,7 @@ var sampleConfig = `
## http://admin:secret@couchbase-0.example.com:8091/
##
## If no servers are specified, then localhost is used as the host.
## If no protocol is specifed, HTTP is used.
## If no protocol is specified, HTTP is used.
## If no port is specified, 8091 is used.
servers = ["http://localhost:8091"]
`

View File

@@ -17,7 +17,7 @@ type DnsQuery struct {
// Domains or subdomains to query
Domains []string
// Network protocl name
// Network protocol name
Network string
// Server to query

View File

@@ -35,7 +35,7 @@ var sampleConfig = `
##
# servers = ["USERID:PASSW0RD@lan(192.168.1.1)"]
## Recomended: use metric 'interval' that is a multiple of 'timeout' to avoid
## Recommended: use metric 'interval' that is a multiple of 'timeout' to avoid
## gaps or overlap in pulled data
interval = "30s"

View File

@@ -81,7 +81,7 @@ func TestIptables_Gather(t *testing.T) {
K 4520 RETURN tcp -- * * 0.0.0.0/0 0.0.0.0/0
`},
},
{ // 8 - Multiple rows, multipe chains => no error
{ // 8 - Multiple rows, multiple chains => no error
table: "filter",
chains: []string{"INPUT", "FORWARD"},
values: []string{

View File

@@ -367,7 +367,7 @@ func getMetrics(role Role, group string) []string {
ret, ok := m[group]
if !ok {
log.Printf("I! [mesos] Unkown %s metrics group: %s\n", role, group)
log.Printf("I! [mesos] Unknown %s metrics group: %s\n", role, group)
return []string{}
}

View File

@@ -197,7 +197,7 @@ func (c *Client) Send(typ int32, command string) (response *Packet, err error) {
}
// NewClient creates a new Client type, creating the connection
// to the server specified by the host and port arguements. If
// to the server specified by the host and port arguments. If
// the connection fails, an error is returned.
func NewClient(host string, port int) (client *Client, err error) {
client = new(Client)

View File

@@ -47,7 +47,7 @@ func (s *Minecraft) SampleConfig() string {
return sampleConfig
}
// Gather uses the RCON protocal to collect player and
// Gather uses the RCON protocol to collect player and
// scoreboard stats from a minecraft server.
//var hasClient bool = false
func (s *Minecraft) Gather(acc telegraf.Accumulator) error {

View File

@@ -76,7 +76,7 @@ func newClient(server, port string) (*rcon.Client, error) {
return client, nil
}
// Gather recieves all player scoreboard information and returns it per player.
// Gather receives all player scoreboard information and returns it per player.
func (r *RCON) Gather(producer RCONClientProducer) ([]string, error) {
if r.client == nil {
var err error

View File

@@ -59,7 +59,7 @@ func (client *conn) Request(
rec := &record{}
var err1 error
// recive untill EOF or FCGI_END_REQUEST
// recive until EOF or FCGI_END_REQUEST
READ_LOOP:
for {
err1 = rec.read(client.rwc)

View File

@@ -62,7 +62,7 @@ func TestPhpFpmGeneratesMetrics_From_Fcgi(t *testing.T) {
// Let OS find an available port
tcp, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatal("Cannot initalize test server")
t.Fatal("Cannot initialize test server")
}
defer tcp.Close()
@@ -106,7 +106,7 @@ func TestPhpFpmGeneratesMetrics_From_Socket(t *testing.T) {
binary.Read(rand.Reader, binary.LittleEndian, &randomNumber)
tcp, err := net.Listen("unix", fmt.Sprintf("/tmp/test-fpm%d.sock", randomNumber))
if err != nil {
t.Fatal("Cannot initalize server on port ")
t.Fatal("Cannot initialize server on port ")
}
defer tcp.Close()
@@ -150,7 +150,7 @@ func TestPhpFpmGeneratesMetrics_From_Socket_Custom_Status_Path(t *testing.T) {
binary.Read(rand.Reader, binary.LittleEndian, &randomNumber)
tcp, err := net.Listen("unix", fmt.Sprintf("/tmp/test-fpm%d.sock", randomNumber))
if err != nil {
t.Fatal("Cannot initalize server on port ")
t.Fatal("Cannot initialize server on port ")
}
defer tcp.Close()

View File

@@ -175,7 +175,7 @@ func (p *Ping) Gather(acc telegraf.Accumulator) error {
totalTimeout := p.timeout() * float64(p.Count)
out, err := p.pingHost(totalTimeout, args...)
// ping host return exitcode != 0 also when there was no response from host
// but command was execute succesfully
// but command was execute successfully
if err != nil {
// Combine go err + stderr output
pendingError = errors.New(strings.TrimSpace(out) + ", " + err.Error())

View File

@@ -76,7 +76,7 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
binary.Read(rand.Reader, binary.LittleEndian, &randomNumber)
socket, err := net.Listen("unix", fmt.Sprintf("/tmp/pdns%d.controlsocket", randomNumber))
if err != nil {
t.Fatal("Cannot initalize server on port ")
t.Fatal("Cannot initialize server on port ")
}
defer socket.Close()

View File

@@ -66,7 +66,7 @@ type Statsd struct {
// MetricSeparator is the separator between parts of the metric name.
MetricSeparator string
// This flag enables parsing of tags in the dogstatsd extention to the
// This flag enables parsing of tags in the dogstatsd extension to the
// statsd protocol (http://docs.datadoghq.com/guides/dogstatsd/)
ParseDataDogTags bool

View File

@@ -100,7 +100,7 @@ var sampleConfig = `
#
#
## Options for the sadf command. The values on the left represent the sadf
## options and the values on the right their description (wich are used for
## options and the values on the right their description (which are used for
## grouping and prefixing metrics).
##
## Run 'sar -h' or 'man sar' to find out the supported options for your

View File

@@ -54,7 +54,7 @@ func TestCPUStats(t *testing.T) {
err := cs.Gather(&acc)
require.NoError(t, err)
// Computed values are checked with delta > 0 becasue of floating point arithmatic
// Computed values are checked with delta > 0 because of floating point arithmatic
// imprecision
assertContainsTaggedFloat(t, &acc, "cpu", "time_user", 8.8, 0, cputags)
assertContainsTaggedFloat(t, &acc, "cpu", "time_system", 8.2, 0, cputags)
@@ -105,7 +105,7 @@ func TestCPUStats(t *testing.T) {
// specific tags within a certain distance of a given expected value. Asserts a failure
// if the measurement is of the wrong type, or if no matching measurements are found
//
// Paramaters:
// Parameters:
// t *testing.T : Testing object to use
// acc testutil.Accumulator: Accumulator to examine
// measurement string : Name of the measurement to examine
@@ -224,7 +224,7 @@ func TestCPUTimesDecrease(t *testing.T) {
err := cs.Gather(&acc)
require.NoError(t, err)
// Computed values are checked with delta > 0 becasue of floating point arithmatic
// Computed values are checked with delta > 0 because of floating point arithmatic
// imprecision
assertContainsTaggedFloat(t, &acc, "cpu", "time_user", 18, 0, cputags)
assertContainsTaggedFloat(t, &acc, "cpu", "time_idle", 80, 0, cputags)

View File

@@ -347,7 +347,7 @@ func PdhGetFormattedCounterValueDouble(hCounter PDH_HCOUNTER, lpdwType *uint32,
//
// okPath := "\\Process(*)\\% Processor Time" // notice the wildcard * character
//
// // ommitted all necessary stuff ...
// // omitted all necessary stuff ...
//
// var bufSize uint32
// var bufCount uint32

View File

@@ -110,7 +110,7 @@ func (m *Win_PerfCounters) AddItem(query string, objectName string, counter stri
ret = PdhAddEnglishCounter(handle, query, 0, &counterHandle)
}
// Call PdhCollectQueryData one time to check existance of the counter
// Call PdhCollectQueryData one time to check existence of the counter
ret = PdhCollectQueryData(handle)
if ret != ERROR_SUCCESS {
PdhCloseQuery(handle)

View File

@@ -16,7 +16,7 @@ import (
)
type Graphite struct {
// URL is only for backwards compatability
// URL is only for backwards compatibility
Servers []string
Prefix string
Template string

View File

@@ -22,7 +22,7 @@ var (
// InfluxDB struct is the primary data structure for the plugin
type InfluxDB struct {
// URL is only for backwards compatability
// URL is only for backwards compatibility
URL string
URLs []string `toml:"urls"`
Username string
@@ -100,7 +100,7 @@ func (i *InfluxDB) Connect() error {
var urls []string
urls = append(urls, i.URLs...)
// Backward-compatability with single Influx URL config files
// Backward-compatibility with single Influx URL config files
// This could eventually be removed in favor of specifying the urls as a list
if i.URL != "" {
urls = append(urls, i.URL)

View File

@@ -183,7 +183,7 @@ func BenchmarkHttpSend(b *testing.B) {
// err = o.Write(testutil.MockMetrics())
// require.NoError(t, err)
// // Verify postive and negative test cases of writing data
// // Verify positive and negative test cases of writing data
// metrics := testutil.MockMetrics()
// metrics = append(metrics, testutil.TestMetric(float64(1.0),
// "justametric.float"))

View File

@@ -84,7 +84,7 @@ func (r *Riemann) Write(metrics []telegraf.Metric) error {
var senderr = r.client.SendMulti(events)
if senderr != nil {
r.Close() // always retuns nil
r.Close() // always returns nil
return fmt.Errorf("FAILED to send riemann message (will try to reconnect). Error: %s\n",
senderr)
}