Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0605af7c99 | ||
|
|
4e89c17c0f | ||
|
|
45b7db7de1 | ||
|
|
cc478f035e | ||
|
|
fe6239cf9f | ||
|
|
865917f523 | ||
|
|
4aa8d72644 | ||
|
|
384ef6af6b | ||
|
|
07985e6524 | ||
|
|
f8597f78f4 | ||
|
|
83faea7a31 | ||
|
|
223bbf0df7 | ||
|
|
55f35f291d | ||
|
|
6852231c1b | ||
|
|
ce4ca43a5d | ||
|
|
5d6622eb44 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -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
|
||||
|
||||
8
Makefile
8
Makefile
@@ -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 \
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user