This commit is contained in:
Martin Geno 2016-02-19 11:41:39 +01:00
parent b74a2480cd
commit 43a9b30fd2
3 changed files with 5 additions and 1 deletions

2
.gitignore vendored
View File

@ -22,3 +22,5 @@ _testmain.go
*.exe
*.test
*.prof
webroot/nodes.json

View File

@ -113,6 +113,8 @@ func (coll *Collector) parse(res *Response) {
elem := reflect.ValueOf(node).Elem()
field := elem.FieldByName(strings.Title(coll.collectType))
field.Set(reflect.ValueOf(result))
nodeserver.SendAll(node)
}
func (coll *Collector) receiver() {

View File

@ -16,7 +16,7 @@ var (
func main(){
var collectSeconds, saveSeconds int
flag.StringVar(&outputFile, "output", "nodes.json", "path output file")
flag.StringVar(&outputFile, "output", "webroot/nodes.json", "path output file")
flag.IntVar(&collectSeconds, "collectInterval", 15, "interval for data collections")
flag.IntVar(&saveSeconds, "saveInterval", 5, "interval for data saving")
flag.Parse()