Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1668bbf9a | ||
|
|
fe91c779e9 | ||
|
|
425b6f7d63 | ||
|
|
c322ddb4b0 | ||
|
|
648d3bde33 | ||
|
|
d8da77cb42 | ||
|
|
fdb04702eb | ||
|
|
ecf43f4986 | ||
|
|
e307e92e86 | ||
|
|
8d4a09c3ea |
@@ -1,4 +1,4 @@
|
||||
## v1.5 [unreleased]
|
||||
## v1.5 [2017-12-14]
|
||||
|
||||
### New Plugins
|
||||
- [basicstats](./plugins/aggregators/basicstats/README.md) - Thanks to @toni-moreno
|
||||
@@ -78,6 +78,7 @@
|
||||
- [#3140](https://github.com/influxdata/telegraf/pull/3140): Add support for glob patterns in net input plugin.
|
||||
- [#3405](https://github.com/influxdata/telegraf/pull/3405): Add input plugin for OpenBSD/FreeBSD pf.
|
||||
- [#3528](https://github.com/influxdata/telegraf/pull/3528): Add option to amqp output to publish persistent messages.
|
||||
- [#3530](https://github.com/influxdata/telegraf/pull/3530): Support I (idle) process state on procfs+Linux.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
@@ -93,6 +94,8 @@
|
||||
- [#3447](https://github.com/influxdata/telegraf/issues/3447): Add shadow-utils dependency to rpm package.
|
||||
- [#3448](https://github.com/influxdata/telegraf/issues/3448): Use deb-systemd-invoke to restart service.
|
||||
- [#3553](https://github.com/influxdata/telegraf/issues/3553): Fix kafka_consumer outside range of offsets error.
|
||||
- [#3568](https://github.com/influxdata/telegraf/issues/3568): Fix separation of multiple prometheus_client outputs.
|
||||
- [#3577](https://github.com/influxdata/telegraf/issues/3577): Don't add system input uptime_format as a counter.
|
||||
|
||||
## v1.4.5 [2017-12-01]
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Using the environment variable `HOST_PROC` the plugin will retrieve process info
|
||||
- zombie
|
||||
- dead
|
||||
- wait (freebsd only)
|
||||
- idle (bsd only)
|
||||
- idle (bsd and Linux 4+ only)
|
||||
- paging (linux only)
|
||||
- total_threads (linux only)
|
||||
|
||||
@@ -47,7 +47,7 @@ Linux FreeBSD Darwin meaning
|
||||
Z Z Z zombie
|
||||
X none none dead
|
||||
T T T stopped
|
||||
none I I idle (sleeping for longer than about 20 seconds)
|
||||
I I I idle (sleeping for longer than about 20 seconds)
|
||||
D D,L U blocked (waiting in uninterruptible sleep, or locked)
|
||||
W W none paging (linux kernel < 2.6 only), wait (freebsd)
|
||||
```
|
||||
|
||||
@@ -34,5 +34,6 @@ $ telegraf --config ~/ws/telegraf.conf --input-filter system --test
|
||||
* Plugin: system, Collection 1
|
||||
* Plugin: inputs.system, Collection 1
|
||||
> system,host=tyrion load1=3.72,load5=2.4,load15=2.1,n_users=3i,n_cpus=4i 1483964144000000000
|
||||
> system,host=tyrion uptime=1249632i,uptime_format="14 days, 11:07" 1483964144000000000
|
||||
> system,host=tyrion uptime=1249632i 1483964144000000000
|
||||
> system,host=tyrion uptime_format="14 days, 11:07" 1483964144000000000
|
||||
```
|
||||
|
||||
@@ -85,6 +85,7 @@ func getEmptyFields() map[string]interface{} {
|
||||
fields["dead"] = int64(0)
|
||||
fields["paging"] = int64(0)
|
||||
fields["total_threads"] = int64(0)
|
||||
fields["idle"] = int64(0)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
@@ -174,6 +175,8 @@ func (p *Processes) gatherFromProc(fields map[string]interface{}) error {
|
||||
fields["stopped"] = fields["stopped"].(int64) + int64(1)
|
||||
case 'W':
|
||||
fields["paging"] = fields["paging"].(int64) + int64(1)
|
||||
case 'I':
|
||||
fields["idle"] = fields["idle"].(int64) + int64(1)
|
||||
default:
|
||||
log.Printf("I! processes: Unknown state [ %s ] in file %s",
|
||||
string(stats[0][0]), filename)
|
||||
|
||||
@@ -44,7 +44,8 @@ func TestFromPS(t *testing.T) {
|
||||
fields["zombies"] = int64(1)
|
||||
fields["running"] = int64(4)
|
||||
fields["sleeping"] = int64(34)
|
||||
fields["total"] = int64(43)
|
||||
fields["idle"] = int64(2)
|
||||
fields["total"] = int64(45)
|
||||
|
||||
acc.AssertContainsTaggedFields(t, "processes", fields, map[string]string{})
|
||||
}
|
||||
@@ -172,6 +173,8 @@ U
|
||||
Z
|
||||
D
|
||||
S+
|
||||
I
|
||||
I
|
||||
`
|
||||
|
||||
const testProcStat = `10 (rcuob/0) %s 2 0 0 0 -1 2129984 0 0 0 0 0 0 0 0 20 0 %s 0 11 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
|
||||
@@ -46,7 +46,9 @@ func (_ *SystemStats) Gather(acc telegraf.Accumulator) error {
|
||||
"n_cpus": runtime.NumCPU(),
|
||||
}, nil)
|
||||
acc.AddCounter("system", map[string]interface{}{
|
||||
"uptime": hostinfo.Uptime,
|
||||
"uptime": hostinfo.Uptime,
|
||||
}, nil)
|
||||
acc.AddFields("system", map[string]interface{}{
|
||||
"uptime_format": format_uptime(hostinfo.Uptime),
|
||||
}, nil)
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid.
|
||||
```
|
||||
|
||||
|
||||
### .NET Montioring
|
||||
### .NET Monitoring
|
||||
```
|
||||
[[inputs.win_perf_counters.object]]
|
||||
# .NET CLR Exceptions, in this case for IIS only
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/cloudwatch"
|
||||
"github.com/aws/aws-sdk-go/service/sts"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
internalaws "github.com/influxdata/telegraf/internal/config/aws"
|
||||
@@ -71,20 +70,7 @@ func (c *CloudWatch) Connect() error {
|
||||
Token: c.Token,
|
||||
}
|
||||
configProvider := credentialConfig.Credentials()
|
||||
|
||||
stsService := sts.New(configProvider)
|
||||
|
||||
params := &sts.GetSessionTokenInput{}
|
||||
|
||||
_, err := stsService.GetSessionToken(params)
|
||||
|
||||
if err != nil {
|
||||
log.Printf("E! cloudwatch: Cannot use credentials to connect to AWS : %+v \n", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
c.svc = cloudwatch.New(configProvider)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -79,19 +79,28 @@ var sampleConfig = `
|
||||
`
|
||||
|
||||
func (p *PrometheusClient) Start() error {
|
||||
prometheus.Register(p)
|
||||
|
||||
defaultCollectors := map[string]bool{
|
||||
"gocollector": true,
|
||||
"process": true,
|
||||
}
|
||||
for _, collector := range p.CollectorsExclude {
|
||||
delete(defaultCollectors, collector)
|
||||
}
|
||||
|
||||
registry := prometheus.NewRegistry()
|
||||
for collector, _ := range defaultCollectors {
|
||||
switch collector {
|
||||
case "gocollector":
|
||||
prometheus.Unregister(prometheus.NewGoCollector())
|
||||
registry.Register(prometheus.NewGoCollector())
|
||||
case "process":
|
||||
prometheus.Unregister(prometheus.NewProcessCollector(os.Getpid(), ""))
|
||||
registry.Register(prometheus.NewProcessCollector(os.Getpid(), ""))
|
||||
default:
|
||||
return fmt.Errorf("unrecognized collector %s", collector)
|
||||
}
|
||||
}
|
||||
|
||||
registry.Register(p)
|
||||
|
||||
if p.Listen == "" {
|
||||
p.Listen = "localhost:9273"
|
||||
}
|
||||
@@ -102,8 +111,7 @@ func (p *PrometheusClient) Start() error {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(p.Path, promhttp.HandlerFor(
|
||||
prometheus.DefaultGatherer,
|
||||
promhttp.HandlerOpts{ErrorHandling: promhttp.ContinueOnError}))
|
||||
registry, promhttp.HandlerOpts{ErrorHandling: promhttp.ContinueOnError}))
|
||||
|
||||
p.server = &http.Server{
|
||||
Addr: p.Listen,
|
||||
|
||||
Reference in New Issue
Block a user