Compare commits

..

16 Commits
1.5.0 ... 1.5.1

Author SHA1 Message Date
Daniel Nelson
0605af7c99 Pin crate docker image for testing
(cherry picked from commit 3cf0ba1ccf)
2018-01-10 14:11:36 -08:00
Daniel Nelson
4e89c17c0f Set 1.5.1 release date 2018-01-10 13:28:28 -08:00
Daniel Nelson
45b7db7de1 Add link to docs for configuring the openldap monitoring backend
(cherry picked from commit 37757b7782)
2018-01-04 15:35:45 -08:00
Daniel Nelson
cc478f035e Update changelog
(cherry picked from commit 315fd1e987)
2018-01-04 15:30:23 -08:00
Daniel Nelson
fe6239cf9f Escape environment variables during config toml parsing (#3637)
(cherry picked from commit b0c2bb870e)
2018-01-04 15:30:17 -08:00
Daniel Nelson
865917f523 Update changelog
(cherry picked from commit 07cb749e04)
2018-01-03 13:45:00 -08:00
kerams
4aa8d72644 Fix deliver_get field in rabbitmq input (#3633)
(cherry picked from commit acea7109d4)
2018-01-03 13:44:55 -08:00
Daniel Nelson
384ef6af6b Update changelog
(cherry picked from commit 81f42e8b17)
2018-01-02 16:36:18 -08:00
Daniel Nelson
07985e6524 Add information about how to set permissions for postfix input (#3594)
(cherry picked from commit a440ed8d8c)
2018-01-02 14:10:00 -08:00
Daniel Nelson
f8597f78f4 Update changelog
(cherry picked from commit 06c21fb9f7)
2017-12-28 16:24:26 -08:00
Daniel Nelson
83faea7a31 Set content-type charset in influxdb output and allow it be overridden (#3593)
(cherry picked from commit 4f7afb8cb5)
2017-12-28 16:24:21 -08:00
Daniel Nelson
223bbf0df7 Update changelog
(cherry picked from commit ef6e5c5a85)
2017-12-28 16:19:34 -08:00
Daniel Nelson
55f35f291d Fix DC/OS login expiration time (#3625)
(cherry picked from commit 005face7c0)
2017-12-28 16:19:25 -08:00
Daniel Nelson
6852231c1b Update changelog
(cherry picked from commit 1011cd0c94)
2017-12-28 16:16:30 -08:00
Daniel Nelson
ce4ca43a5d Fix name error in jolokia2_agent sample config (#3624)
(cherry picked from commit 6c075c4346)
2017-12-28 16:16:30 -08:00
timhallinflux
5d6622eb44 Update README.md
added `network` for a tiny bit more context
2017-12-14 14:58:37 -08:00
12 changed files with 61 additions and 15 deletions

View File

@@ -1,3 +1,14 @@
## v1.5.1 [2017-01-10]
### Bugfixes
- [#3624](https://github.com/influxdata/telegraf/pull/3624): Fix name error in jolokia2_agent sample config.
- [#3625](https://github.com/influxdata/telegraf/pull/3625): Fix DC/OS login expiration time.
- [#3593](https://github.com/influxdata/telegraf/pull/3593): Set Content-Type charset in influxdb output and allow it be overridden.
- [#3594](https://github.com/influxdata/telegraf/pull/3594): Document permissions setup for postfix input.
- [#3633](https://github.com/influxdata/telegraf/pull/3633): Fix deliver_get field in rabbitmq input.
- [#3607](https://github.com/influxdata/telegraf/issues/3607): Escape environment variables during config toml parsing.
## v1.5 [2017-12-14]
### New Plugins

View File

@@ -88,7 +88,7 @@ docker-run:
-d cobaugh/openldap-alpine
docker run --name cratedb \
-p "6543:5432" \
-d crate crate \
-d crate:2.2 \
-Cnetwork.host=0.0.0.0 \
-Ctransport.host=localhost \
-Clicense.enterprise=false
@@ -116,12 +116,6 @@ docker-run-circle:
-e SLAPD_CONFIG_ROOTPW="secret" \
-p "389:389" -p "636:636" \
-d cobaugh/openldap-alpine
docker run --name cratedb \
-p "6543:5432" \
-d crate crate \
-Cnetwork.host=0.0.0.0 \
-Ctransport.host=localhost \
-Clicense.enterprise=false
docker-kill:
-docker kill aerospike elasticsearch kafka memcached mqtt mysql nats nsq \

View File

@@ -1661,7 +1661,7 @@
# # insecure_skip_verify = false
#
# ## Add metrics to read
# [[inputs.jolokia2.metric]]
# [[inputs.jolokia2_agent.metric]]
# name = "java_runtime"
# mbean = "java.lang:type=Runtime"
# paths = ["Uptime"]

View File

@@ -40,6 +40,11 @@ var (
// envVarRe is a regex to find environment variables in the config file
envVarRe = regexp.MustCompile(`\$\w+`)
envVarEscaper = strings.NewReplacer(
`"`, `\"`,
`\`, `\\`,
)
)
// Config specifies the URL/user/password for the database that telegraf
@@ -689,6 +694,11 @@ func trimBOM(f []byte) []byte {
return bytes.TrimPrefix(f, []byte("\xef\xbb\xbf"))
}
// escapeEnv escapes a value for inserting into a TOML string.
func escapeEnv(value string) string {
return envVarEscaper.Replace(value)
}
// parseFile loads a TOML configuration from a provided path and
// returns the AST produced from the TOML parser. When loading the file, it
// will find environment variables and replace them.
@@ -702,8 +712,9 @@ func parseFile(fpath string) (*ast.Table, error) {
env_vars := envVarRe.FindAll(contents, -1)
for _, env_var := range env_vars {
env_val := os.Getenv(strings.TrimPrefix(string(env_var), "$"))
if env_val != "" {
env_val, ok := os.LookupEnv(strings.TrimPrefix(string(env_var), "$"))
if ok {
env_val = escapeEnv(env_val)
contents = bytes.Replace(contents, env_var, []byte(env_val), 1)
}
}

View File

@@ -1,6 +1,6 @@
# Bond Input Plugin
The Bond Input plugin collects bond interface status, bond's slaves interfaces
The Bond Input plugin collects network bond interface status, bond's slaves interfaces
status and failures count of bond's slaves interfaces.
The plugin collects these metrics from `/proc/net/bonding/*` files.

View File

@@ -325,7 +325,7 @@ func (c *ClusterClient) createLoginToken(sa *ServiceAccount) (string, error) {
UID: sa.AccountID,
StandardClaims: jwt.StandardClaims{
// How long we have to login with this token
ExpiresAt: int64(5 * time.Minute / time.Second),
ExpiresAt: time.Now().Add(5 * time.Minute).Unix(),
},
})
return token.SignedString(sa.PrivateKey)

View File

@@ -46,7 +46,7 @@ func (ja *JolokiaAgent) SampleConfig() string {
# insecure_skip_verify = false
## Add metrics to read
[[inputs.jolokia2.metric]]
[[inputs.jolokia2_agent.metric]]
name = "java_runtime"
mbean = "java.lang:type=Runtime"
paths = ["Uptime"]

View File

@@ -4,6 +4,8 @@ This plugin gathers metrics from OpenLDAP's cn=Monitor backend.
### Configuration:
To use this plugin you must enable the [monitoring](https://www.openldap.org/devel/admin/monitoringslapd.html) backend.
```toml
[[inputs.openldap]]
host = "localhost"

View File

@@ -13,6 +13,25 @@ For each of the active, hold, incoming, maildrop, and deferred queues (http://ww
# queue_directory = "/var/spool/postfix"
```
#### Permissions:
Telegraf will need read access to the files in the queue directory. You may
need to alter the permissions of these directories to provide access to the
telegraf user.
Unix permissions:
```sh
$ sudo chgrp -R telegraf /var/spool/postfix/{active,hold,incoming,deferred}
$ sudo chmod -R g+rXs /var/spool/postfix/{active,hold,incoming,deferred}
$ sudo usermod -a -G postdrop telegraf
$ sudo chmod g+r /var/spool/postfix/maildrop
```
Posix ACL:
```sh
$ sudo setfacl -Rdm u:telegraf:rX /var/spool/postfix/{active,hold,incoming,deferred,maildrop}
```
### Measurements & Fields:
- postfix_queue

View File

@@ -72,7 +72,7 @@ type MessageStats struct {
AckDetails Details `json:"ack_details"`
Deliver int64
DeliverDetails Details `json:"deliver_details"`
DeliverGet int64
DeliverGet int64 `json:"deliver_get"`
DeliverGetDetails Details `json:"deliver_get_details"`
Publish int64
PublishDetails Details `json:"publish_details"`

View File

@@ -19,6 +19,10 @@ func TestConnectAndWrite(t *testing.T) {
t.Skip("Skipping integration test in short mode")
}
if os.Getenv("CIRCLE_PROJECT_REPONAME") != "" {
t.Skip("Skipping test on CircleCI due to docker failures")
}
url := testURL()
table := "test"
@@ -95,6 +99,10 @@ func Test_escapeValue(t *testing.T) {
t.Skip("Skipping integration test in short mode")
}
if os.Getenv("CIRCLE_PROJECT_REPONAME") != "" {
t.Skip("Skipping test on CircleCI due to docker failures")
}
tests := []struct {
Val interface{}
Want string

View File

@@ -211,11 +211,12 @@ func (c *httpClient) makeRequest(uri string, body io.Reader) (*http.Request, err
return nil, err
}
req.Header.Set("Content-Type", "text/plain; charset=utf-8")
for header, value := range c.config.HTTPHeaders {
req.Header.Set(header, value)
}
req.Header.Set("Content-Type", "text/plain")
req.Header.Set("User-Agent", c.config.UserAgent)
if c.config.Username != "" && c.config.Password != "" {
req.SetBasicAuth(c.config.Username, c.config.Password)