mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
25ea90369c
Last login is disabled by default as it's broken on ubuntu 12.04 Interrupts is disabled by default as it's very granular and we'll have total interrupts from /proc/stat Allow ignoring devices from diskstats, ignore ram and loop devices by default. Use glog for logging.
19 lines
367 B
Go
19 lines
367 B
Go
package collector
|
|
|
|
import (
|
|
"fmt"
|
|
"strconv"
|
|
"strings"
|
|
)
|
|
|
|
func splitToInts(str string, sep string) (ints []int, err error) {
|
|
for _, part := range strings.Split(str, sep) {
|
|
i, err := strconv.Atoi(part)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("Could not split '%s' because %s is no int: %s", str, part, err)
|
|
}
|
|
ints = append(ints, i)
|
|
}
|
|
return ints, nil
|
|
}
|