Rename tags 'host','inst' to 'server','name'

This commit is contained in:
张光权 2016-03-23 14:12:34 +08:00
parent 1459b5dcdf
commit 0c09b0d236
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ ipmitool -I lan -H 192.168.1.1 -U USERID -P PASSW0RD sdr
- ipmi_sensor:
* Tags: `host`,`inst`
* Tags: `server`,`host`
* Fields:
- status
- value

View File

@ -65,7 +65,7 @@ func (m *Ipmi) gatherServer(serv string, acc telegraf.Accumulator) error {
for i := 0; i < len(lines); i++ {
vals := strings.Split(lines[i], "|")
if len(vals) == 3 {
tags := map[string]string{"host": conn.Hostname, "inst": trim(vals[0])}
tags := map[string]string{"server": conn.Hostname, "name": trim(vals[0])}
fields := make(map[string]interface{})
if strings.EqualFold("ok", trim(vals[2])) {
fields["status"] = 1