From 2221ee6a1e21dc300dde309a38e533b06e4ae6ff Mon Sep 17 00:00:00 2001 From: Roman Statsevich Date: Mon, 9 Nov 2015 15:37:00 +0300 Subject: [PATCH] removed "panic" from zfs plugin added zfs plugin to README.md --- README.md | 1 + plugins/zfs/zfs.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae89e57d2..f85a4b1e4 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ Telegraf currently has support for collecting metrics from: * rabbitmq * redis * rethinkdb +* zfs * zookeeper * system * cpu diff --git a/plugins/zfs/zfs.go b/plugins/zfs/zfs.go index baafdaaef..559c80b95 100644 --- a/plugins/zfs/zfs.go +++ b/plugins/zfs/zfs.go @@ -62,7 +62,7 @@ func (z *Zfs) Gather(acc plugins.Accumulator) error { for _, metric := range kstatMetrics { lines, err := common.ReadLines(kstatPath + "/" + metric) if err != nil { - panic(err) + return err } for i, line := range lines { if i == 0 || i == 1 {