Skip to content

Commit

Permalink
Gather IPMI metrics concurrently from list of servers
Browse files Browse the repository at this point in the history
Resolves #4175
  • Loading branch information
glinton committed Jun 28, 2018
1 parent 23523ff commit 0453516
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
steps:
- checkout
- restore_cache:
key: vendor-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
key: vendor-{{ checksum "Gopkg.lock" }}
- run: 'make deps'
- save_cache:
name: 'vendored deps'
key: vendor-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
key: vendor-{{ checksum "Gopkg.lock" }}
paths:
- './vendor'
- persist_to_workspace:
Expand Down
11 changes: 6 additions & 5 deletions plugins/inputs/ipmi_sensor/ipmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ func (m *Ipmi) Gather(acc telegraf.Accumulator) error {

if len(m.Servers) > 0 {
for _, server := range m.Servers {
err := m.parse(acc, server)
if err != nil {
acc.AddError(err)
continue
}
go func(a telegraf.Accumulator, s string) {
err := m.parse(a, s)
if err != nil {
a.AddError(err)
}
}(acc, server)
}
} else {
err := m.parse(acc, "")
Expand Down

0 comments on commit 0453516

Please sign in to comment.