Tied metric columns to values, next step will be determining how to store them and retrieve them

This commit is contained in:
Renan DelValle 2016-09-22 19:54:06 -04:00
parent fa3a620fba
commit 1b57b6dec2

View file

@ -1,10 +1,10 @@
package main
import (
"bufio"
"fmt"
"log"
"os/exec"
"bufio"
"strings"
)
@ -34,11 +34,16 @@ func main() {
// Throw away first set of results
scanner.Scan()
seconds := 0
for scanner.Scan() {
fmt.Println("Second ", seconds , " val: ", strings.Split(scanner.Text(), ","))
fmt.Printf("Second: %d\n", seconds)
for i, val := range strings.Split(scanner.Text(), ",") {
fmt.Printf("host metric: %s val: %s\n", headers[i], val)
}
seconds++
fmt.Println("--------------------------------")
}
}()