Clarify platform support for temp input (#4756)
This commit is contained in:
@@ -2,6 +2,7 @@ package temp
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
@@ -25,6 +26,9 @@ func (t *Temperature) SampleConfig() string {
|
||||
func (t *Temperature) Gather(acc telegraf.Accumulator) error {
|
||||
temps, err := t.ps.Temperature()
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "not implemented yet") {
|
||||
return fmt.Errorf("plugin is not supported on this platform: %v", err)
|
||||
}
|
||||
return fmt.Errorf("error getting temperatures info: %s", err)
|
||||
}
|
||||
for _, temp := range temps {
|
||||
|
||||
Reference in New Issue
Block a user