Skip to content
Snippets Groups Projects
Unverified Commit 12db3b91 authored by Cameron Sparr's avatar Cameron Sparr
Browse files

Check if metric is nil before calling SetAggregate

fixes #2146
parent b58926dd
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
- [#2049](https://github.com/influxdata/telegraf/pull/2049): Fix the Value data format not trimming null characters from input. - [#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. - [#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] ## v1.1.2 [2016-12-12]
......
...@@ -70,7 +70,9 @@ func (r *RunningAggregator) MakeMetric( ...@@ -70,7 +70,9 @@ func (r *RunningAggregator) MakeMetric(
t, t,
) )
m.SetAggregate(true) if m != nil {
m.SetAggregate(true)
}
return m return m
} }
......
...@@ -40,8 +40,11 @@ regex patterns. ...@@ -40,8 +40,11 @@ regex patterns.
## Grok Parser ## Grok Parser
The grok parser uses a slightly modified version of logstash "grok" patterns, 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 Telegraf has many of it's own
[built-in patterns](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/logparser/grok/patterns/influx-patterns), [built-in patterns](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/logparser/grok/patterns/influx-patterns),
...@@ -92,4 +95,3 @@ Timestamp modifiers can be used to convert captures to the timestamp of the ...@@ -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 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` "reference time", which is `Mon Jan 2 15:04:05 -0700 MST 2006`
See https://golang.org/pkg/time/#Parse for more details. See https://golang.org/pkg/time/#Parse for more details.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment