Closed toni-moreno closed 8 years ago
fixed in last commits
I think promblem still persist:
$ go get github.com/toni-moreno/snmpcollector
Сan't load package: package github.com/toni-moreno/snmpcollector: no buildable Go source files in /opt/go/work/src/github.com/toni-moreno/snmpcollector
Have you the $GOPATH environment variable set ?
@toni-moreno yes, shure.
If so just type:
cd $GOPATH/src/gitthub.com/ mkdir toni-moreno cd toni-moreno git clone https://github.com/toni-moreno/snmpcollector And you can continue with the building process
Can you test download package with "go get -d" instead ?
I could compile after cloning but now have new error:
$ ./snmpcollector -config config.sql
ERRO[2016-10-11 20:24:14] Fatal error config file: Unsupported Config Type "sql"
I see that you changed old toml config to new sql but it doesn't work. May be I need some more detailed guide about software execution.
Sorry we are just doing a big migration and working hard last weeks to make a full functional snmp collector with web ui.
To run the collector :
First you need a minimal config in toml format ( config.toml in conf dir )
[general]
logdir = "./log"
logLevel = "debug"
[database]
type = "sqlite3"
name = "snmpcollector"
sqllogfile = "sql.log"
debug = "false"
[selfmon]
enabled = true
freq = 30
prefix = "gvm"
extratags = [ "instance=snmp1" ]
[http]
port = 8090
adminuser = "admu"
adminpassword = "admp"
You can run just by executing snmpcollector without any data in the db. It will generate a snmpcollector.db file in sqllite format.
Stop collector and import data with
Now you can run again and connect http://localhost:8090
A comment : web ui is not ready to work yet, we have plans to get ready on 2 weeks
hi @vkosilko I've just pushed a commit with a sample.config.toml , I hope you can begin to work with the collector
Execution of snmpcollector doesn't create db file. It gives error:
# ./snmpcollector
INFO[2016-10-12 13:49:16] set Default directories :
- Exec: /usr/local/go/src/github.com/toni-moreno/bin
- Config: /usr/local/go/src/github.com/toni-moreno/bin/conf
-Logs: /usr/local/go/src/github.com/toni-moreno/bin/log
FATA[2016-10-12 13:49:16] Fail to sync database InfluxCfg: unable to open database file
If I try to import data file creates but I have such messages:
# cat config.sql | sqlite3 ./snmpcollector.db
Error: near line 2: no such table: snmp_metric_cfg
Error: near line 3: no such table: influx_measurement_cfg
Error: near line 4: no such table: measurement_field_cfg
Error: near line 5: no such table: m_groups_cfg
Error: near line 6: no such table: m_groups_measurements
Error: near line 7: no such table: influx_cfg
Error: near line 8: no such table: snmp_device_cfg
Error: near line 9: no such table: snmp_dev_m_groups
Error: near line 10: no such table: meas_filter_cfg
Error: near line 11: no such table: snmp_dev_filters
Error: near line 38: no such table: snmp_metric_cfg
Error: near line 46: no such table: snmp_metric_cfg
Error: near line 56: no such table: snmp_metric_cfg
Error: near line 67: no such table: snmp_metric_cfg
Error: near line 77: no such table: snmp_metric_cfg
Error: near line 87: no such table: snmp_metric_cfg
Error: near line 96: no such table: snmp_metric_cfg
Error: near line 106: no such table: snmp_metric_cfg
Error: near line 117: no such table: snmp_metric_cfg
Error: near line 143: no such table: influx_measurement_cfg
Error: near line 144: no such table: measurement_field_cfg
Error: near line 145: no such table: measurement_field_cfg
Error: near line 146: no such table: measurement_field_cfg
Error: near line 160: no such table: influx_measurement_cfg
Error: near line 161: no such table: measurement_field_cfg
Error: near line 162: no such table: measurement_field_cfg
Error: near line 163: no such table: measurement_field_cfg
Error: near line 164: no such table: measurement_field_cfg
Error: near line 167: no such table: influx_measurement_cfg
Error: near line 168: no such table: measurement_field_cfg
Error: near line 169: no such table: measurement_field_cfg
Error: near line 170: no such table: measurement_field_cfg
Error: near line 171: no such table: measurement_field_cfg
Error: near line 185: no such table: influx_measurement_cfg
Error: near line 186: no such table: measurement_field_cfg
Error: near line 187: no such table: measurement_field_cfg
Error: near line 202: no such table: m_groups_cfg
Error: near line 203: no such table: m_groups_measurements
Error: near line 204: no such table: m_groups_measurements
Error: near line 206: no such table: m_groups_cfg
Error: near line 207: no such table: m_groups_measurements
Error: near line 208: no such table: m_groups_measurements
Error: near line 225: no such table: meas_filter_cfg
Error: near line 226: no such table: meas_filter_cfg
Error: near line 227: no such table: meas_filter_cfg
Error: near line 228: no such table: meas_filter_cfg
Error: near line 245: no such table: influx_cfg
Error: near line 312: no such table: snmp_device_cfg
Error: near line 313: no such table: snmp_dev_m_groups
Error: near line 346: no such table: snmp_device_cfg
Error: near line 347: no such table: snmp_dev_m_groups
Error: near line 348: no such table: snmp_dev_filters
Error: near line 374: unrecognized token: "]"
Error: near line 375: no such table: snmp_dev_m_groups
Error: near line 377: no such table: snmp_dev_filters
Can you show-me your config.toml ?
Have you tested with the last sample version?.
https://github.com/toni-moreno/snmpcollector/blob/master/conf/sample.config.toml
@toni-moreno I uploaded my compiled collector and configs to url, please check: https://drive.google.com/open?id=0B0rkzfzNglIwOEF0RUpMbjVyRWs
One more question about new release: will it be possible to update db with new snmp devices without restarting snmpcollertor or I need to create feautre request for this feature?
@vkosilko we have plans to a lot of new thinks by example online reconfiguration, but I suggest open a new feature for each suggestion. So it will help us prioritize thing.
I've reviewed your config file and it seems to be ok. I suggest to change logLevel = "warn" to logLevel = "debug".
conf file should be in snmpcollector/conf/ and you should execute from snmpcollector base dir
cp config.toml ...xxx/yyy/zzz/snmpcollector/conf
cd ...xxx/yyy/xxxx/snmpcollector
./bin/snmpconllector
Send us the standard out output please.
I will close as you have been able to build successfully. :)
This is becaouse of we forgot to add xorm as dependency. :) we will fix soon