Skip to content

Commit

Permalink
Check if metric is nil before calling SetAggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc authored and Nick White committed Jan 31, 2017
1 parent 4ce4aa0 commit aedac7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ plugins, not just statsd.

- [#2049](https://github.com/influxdata/telegraf/pull/2049): Fix the Value data format not trimming null characters from input.
- [#1949](https://github.com/influxdata/telegraf/issues/1949): Fix windows `net` plugin.
- [#1775](https://github.com/influxdata/telegraf/issues/1775): Cache & expire metrics for delivery to prometheus
- [#1775](https://github.com/influxdata/telegraf/issues/1775): Cache & expire metrics for delivery to prometheus.
- [#2146](https://github.com/influxdata/telegraf/issues/2146): Fix potential panic in aggregator plugin metric maker.

## v1.1.2 [2016-12-12]

Expand Down
4 changes: 3 additions & 1 deletion internal/models/running_aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ func (r *RunningAggregator) MakeMetric(
t,
)

m.SetAggregate(true)
if m != nil {
m.SetAggregate(true)
}

return m
}
Expand Down
6 changes: 4 additions & 2 deletions plugins/inputs/logparser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ regex patterns.
## Grok Parser

The grok parser uses a slightly modified version of logstash "grok" patterns,
with the format `%{<capture_syntax>[:<semantic_name>][:<modifier>]}`
with the format

```
%{<capture_syntax>[:<semantic_name>][:<modifier>]}
```

Telegraf has many of it's own
[built-in patterns](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/logparser/grok/patterns/influx-patterns),
Expand Down Expand Up @@ -92,4 +95,3 @@ Timestamp modifiers can be used to convert captures to the timestamp of the
CUSTOM time layouts must be within quotes and be the representation of the
"reference time", which is `Mon Jan 2 15:04:05 -0700 MST 2006`
See https://golang.org/pkg/time/#Parse for more details.

0 comments on commit aedac7a

Please sign in to comment.