parent
9e810ac463
commit
a251adb838
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
### Release Notes
|
### Release Notes
|
||||||
|
|
||||||
|
- Users of the windows `ping` plugin will need to drop or migrate their
|
||||||
|
measurements in order to continue using the plugin. The reason for this is that
|
||||||
|
the windows plugin was outputting a different type than the linux plugin. This
|
||||||
|
made it impossible to use the `ping` plugin for both windows and linux
|
||||||
|
machines.
|
||||||
|
|
||||||
- Ceph: the `ceph_pgmap_state` metric content has been modified to use a unique field `count`, with each state expressed as a `state` tag.
|
- Ceph: the `ceph_pgmap_state` metric content has been modified to use a unique field `count`, with each state expressed as a `state` tag.
|
||||||
|
|
||||||
Telegraf < 1.3:
|
Telegraf < 1.3:
|
||||||
|
@ -65,6 +71,7 @@ be deprecated eventually.
|
||||||
- [#2390](https://github.com/influxdata/telegraf/issues/2390): Empty tag value causes error on InfluxDB output.
|
- [#2390](https://github.com/influxdata/telegraf/issues/2390): Empty tag value causes error on InfluxDB output.
|
||||||
- [#2380](https://github.com/influxdata/telegraf/issues/2380): buffer_size field value is negative number from "internal" plugin.
|
- [#2380](https://github.com/influxdata/telegraf/issues/2380): buffer_size field value is negative number from "internal" plugin.
|
||||||
- [#2414](https://github.com/influxdata/telegraf/issues/2414): Missing error handling in the MySQL plugin leads to segmentation violation.
|
- [#2414](https://github.com/influxdata/telegraf/issues/2414): Missing error handling in the MySQL plugin leads to segmentation violation.
|
||||||
|
- [#2462](https://github.com/influxdata/telegraf/pull/2462): Fix type conflict in windows ping plugin.
|
||||||
- [#2178](https://github.com/influxdata/telegraf/issues/2178): logparser: regexp with lookahead.
|
- [#2178](https://github.com/influxdata/telegraf/issues/2178): logparser: regexp with lookahead.
|
||||||
- [#2466](https://github.com/influxdata/telegraf/issues/2466): Telegraf can crash in LoadDirectory on 0600 files.
|
- [#2466](https://github.com/influxdata/telegraf/issues/2466): Telegraf can crash in LoadDirectory on 0600 files.
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ func hostPinger(timeout float64, args ...string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// processPingOutput takes in a string output from the ping command
|
// processPingOutput takes in a string output from the ping command
|
||||||
// based on linux implementation but using regex ( multilanguage support ) ( shouldn't affect the performance of the program )
|
// based on linux implementation but using regex ( multilanguage support )
|
||||||
// It returns (<transmitted packets>, <received reply>, <received packet>, <average response>, <min response>, <max response>)
|
// It returns (<transmitted packets>, <received reply>, <received packet>, <average response>, <min response>, <max response>)
|
||||||
func processPingOutput(out string) (int, int, int, int, int, int, error) {
|
func processPingOutput(out string) (int, int, int, int, int, int, error) {
|
||||||
// So find a line contain 3 numbers except reply lines
|
// So find a line contain 3 numbers except reply lines
|
||||||
|
@ -189,13 +189,13 @@ func (p *Ping) Gather(acc telegraf.Accumulator) error {
|
||||||
"percent_reply_loss": lossReply,
|
"percent_reply_loss": lossReply,
|
||||||
}
|
}
|
||||||
if avg > 0 {
|
if avg > 0 {
|
||||||
fields["average_response_ms"] = avg
|
fields["average_response_ms"] = float64(avg)
|
||||||
}
|
}
|
||||||
if min > 0 {
|
if min > 0 {
|
||||||
fields["minimum_response_ms"] = min
|
fields["minimum_response_ms"] = float64(min)
|
||||||
}
|
}
|
||||||
if max > 0 {
|
if max > 0 {
|
||||||
fields["maximum_response_ms"] = max
|
fields["maximum_response_ms"] = float64(max)
|
||||||
}
|
}
|
||||||
acc.AddFields("ping", fields, tags)
|
acc.AddFields("ping", fields, tags)
|
||||||
}(url)
|
}(url)
|
||||||
|
|
|
@ -77,9 +77,9 @@ func TestPingGather(t *testing.T) {
|
||||||
"reply_received": 4,
|
"reply_received": 4,
|
||||||
"percent_packet_loss": 0.0,
|
"percent_packet_loss": 0.0,
|
||||||
"percent_reply_loss": 0.0,
|
"percent_reply_loss": 0.0,
|
||||||
"average_response_ms": 50,
|
"average_response_ms": 50.0,
|
||||||
"minimum_response_ms": 50,
|
"minimum_response_ms": 50.0,
|
||||||
"maximum_response_ms": 52,
|
"maximum_response_ms": 52.0,
|
||||||
}
|
}
|
||||||
acc.AssertContainsTaggedFields(t, "ping", fields, tags)
|
acc.AssertContainsTaggedFields(t, "ping", fields, tags)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue