toni-moreno / snmpcollector

A full featured Generic SNMP data collector with Web Administration Interface for InfluxDB
MIT License
286 stars 53 forks source link

[Bug] New installation with postgres db issue #495

Closed Naumis1 closed 3 years ago

Naumis1 commented 3 years ago

Hello, I have installed snmpcollector via package. Created user and database like so:

sudo -u postgres psql postgres=# create database snmpcollector; postgres=# create user snmpcoluser with encrypted password 'snmpcolpass'; postgres=# grant all privileges on database snmpcollector to snmpcoluser;

Changed config according to manual. After I try to do systemctl start snmpcollector I get error:

time="2021-08-09 12:46:11" level=info msg="Set Default directories : \n - Exec: \n - Config: /etc/snmpcollector\n -Logs: /var/log/snmpcollector\n -Home: \n" time="2021-08-09 12:46:11" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n" time="2021-08-09 12:46:11" level=info msg="Set Default directories : \n - Exec: \n - Config: /etc/snmpcollector\n -Logs: /var/log/snmpcollector\n -Home: \n" time="2021-08-09 12:46:11" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n" time="2021-08-09 12:46:11" level=info msg="Set Default directories : \n - Exec: \n - Config: /etc/snmpcollector\n -Logs: /var/log/snmpcollector\n -Home: \n" time="2021-08-09 12:46:11" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n" time="2021-08-09 12:46:12" level=info msg="Set Default directories : \n - Exec: \n - Config: /etc/snmpcollector\n -Logs: /var/log/snmpcollector\n -Home: \n" time="2021-08-09 12:46:12" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n" time="2021-08-09 12:46:12" level=info msg="Set Default directories : \n - Exec: \n - Config: /etc/snmpcollector\n -Logs: /var/log/snmpcollector\n -Home: \n" time="2021-08-09 12:46:12" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n"

snmpcollector version: 0.10.0 OS: CentOS Linux release 8.3.2011 Postgres version: 10 Did fresh install with postgres db backend Expected result: up and runing Instead I got an error; time="2021-08-09 12:46:12" level=fatal msg="Fail to sync database SnmpDeviceCfg: pq: column \"active\" is of type boolean but default expression is of type integer\n"

Thanks!

toni-moreno commented 3 years ago

Thank you @Naumis1 for the report we will review ASAP.

Naumis1 commented 3 years ago

Thanks!