Exporting Ipmi.Path to be set by config. (#2498)

* Exporting Ipmi.Path to be set by config.

Currently "path" is not exported, giving this error when users try to
override the variable via telegraf.conf as per the sample config:

`field corresponding to `path' is not defined in `*ipmi_sensor.Ipmi'`

Exporting the variable solves the problem.

* Updating changelog.
This commit is contained in:
Robpol86
2017-03-08 08:38:36 -08:00
committed by Cameron Sparr
parent 4a9650ecf5
commit 68b10d73fc
3 changed files with 7 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ import (
func TestGather(t *testing.T) {
i := &Ipmi{
Servers: []string{"USERID:PASSW0RD@lan(192.168.1.1)"},
path: "ipmitool",
Path: "ipmitool",
}
// overwriting exec commands with mock commands
execCommand = fakeExecCommand
@@ -118,7 +118,7 @@ func TestGather(t *testing.T) {
}
i = &Ipmi{
path: "ipmitool",
Path: "ipmitool",
}
err = i.Gather(&acc)