adejoux / nmon2influxdb

Make NMON data dynamic with InfluxDB
GNU Affero General Public License v3.0
80 stars 29 forks source link

Error building from sources "cannot use timeStamp (type []interface {}) as type string" #59

Closed toni-moreno closed 6 years ago

toni-moreno commented 6 years ago

Error

developer@snmpcoldev01:~/src/gospace/src/github.com/adejoux/nmon2influxdb$ git pull origin master
From https://github.com/adejoux/nmon2influxdb
 * branch            master     -> FETCH_HEAD
Already up-to-date.
developer@snmpcoldev01:~/src/gospace/src/github.com/adejoux/nmon2influxdb$ go build
# github.com/adejoux/nmon2influxdb/nmon
nmon/import.go:96:41: cannot use timeStamp (type []interface {}) as type string in argument to nmon.ConvertTimeStamp
nmon/import.go:112:20: invalid operation: origChecksum == nmonFile.Checksum() (mismatched types []interface {} and string)

Go version

developer@snmpcoldev01:~/src/gospace/src/github.com/adejoux/nmon2influxdb$ go version
go version go1.9.2 linux/amd64

nmon2influxdb version

#git log
commit ee3b5acb7a7d93af55cbda2262e9a5aa61f7ed69
Author: Alain Dejoux <adejoux@krystalia.net>
Date:   Tue Nov 21 12:07:09 2017 +0100

    exclude dist directory
toni-moreno commented 6 years ago

Hi @adejoux just trying to compile last nmon2influxdb version , but it seems like I'm doing something wrong, isn't it?

adejoux commented 6 years ago

Hello,

I tried to reproduce the problem from a vanilla environment: new user, new go installation, new gopath but the compilation itself is working.

$ sudo su - gobuild
Last login: Thu Feb  1 17:30:29 CET 2018 on pts/3
➜  ~ go get github.com/adejoux/nmon2influxdb
➜  ~ cd /apps/go/src/github.com/adejoux/nmon2influxdb
➜  nmon2influxdb git:(master) go build
➜  nmon2influxdb git:(master) ✗ ls
docs  goreleaser.yml  hmc  LICENSE  main.go  nmon  nmon2influxdb  nmon2influxdblib  README.md  samples  templates
➜  nmon2influxdb git:(master) ✗ go version
go version go1.9.3 linux/amd64

Can you try to update the 2 client library?

go get -u github.com/adejoux/grafanaclient
go get -u github.com/adejoux/influxdbclient

Regards,

Alain

toni-moreno commented 6 years ago

Yes! after updated all is working ok