Coder Social home page Coder Social logo

Comments (18)

toni-moreno avatar toni-moreno commented on June 6, 2024

fixed in last commits

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

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

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

Have you the $GOPATH environment variable set ?

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

@toni-moreno yes, shure.

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

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

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

Can you test download package with "go get -d" instead ?

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

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.

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

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

#cat example_config.sql | sqlite3 ./snmpcollector.db

Now you can run again and connect http://localhost:8090

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

A comment : web ui is not ready to work yet, we have plans to get ready on 2 weeks

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

hi @vkosilko I've just pushed a commit with a sample.config.toml , I hope you can begin to work with the collector

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

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

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

Can you show-me your config.toml ?

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

Have you tested with the last sample version?.

https://github.com/toni-moreno/snmpcollector/blob/master/conf/sample.config.toml

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

@toni-moreno I uploaded my compiled collector and configs to url, please check: https://drive.google.com/open?id=0B0rkzfzNglIwOEF0RUpMbjVyRWs

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

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?

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

@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.

from snmpcollector.

vkosilko avatar vkosilko commented on June 6, 2024

New issue #9 opened.

from snmpcollector.

toni-moreno avatar toni-moreno commented on June 6, 2024

I will close as you have been able to build successfully.
:)

from snmpcollector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.