Rename tags 'host','inst' to 'server','name'
This commit is contained in:
parent
1459b5dcdf
commit
0c09b0d236
|
@ -12,7 +12,7 @@ ipmitool -I lan -H 192.168.1.1 -U USERID -P PASSW0RD sdr
|
||||||
|
|
||||||
- ipmi_sensor:
|
- ipmi_sensor:
|
||||||
|
|
||||||
* Tags: `host`,`inst`
|
* Tags: `server`,`host`
|
||||||
* Fields:
|
* Fields:
|
||||||
- status
|
- status
|
||||||
- value
|
- value
|
||||||
|
|
|
@ -65,7 +65,7 @@ func (m *Ipmi) gatherServer(serv string, acc telegraf.Accumulator) error {
|
||||||
for i := 0; i < len(lines); i++ {
|
for i := 0; i < len(lines); i++ {
|
||||||
vals := strings.Split(lines[i], "|")
|
vals := strings.Split(lines[i], "|")
|
||||||
if len(vals) == 3 {
|
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{})
|
fields := make(map[string]interface{})
|
||||||
if strings.EqualFold("ok", trim(vals[2])) {
|
if strings.EqualFold("ok", trim(vals[2])) {
|
||||||
fields["status"] = 1
|
fields["status"] = 1
|
||||||
|
|
Loading…
Reference in New Issue