Observium installation on Debian 9 – adding devices fails

Installing fresh Observium (18.9.9420) (community version) on Debian 9 does not end up with a working installation.  (See Observium documentation)

Only one device is added, that cannot be viewed afterwards.

Possible solution: modify the database structure after installation and before adding your devices.

Start checking if the devices_id field has an auto-increment value set and is the primary key.

One can do so by issuing following commands:

mysql>show columns from devices from observium;

or alternatively:

mysql>show create table devices;

If the auto-increment value is missing, please add it:

mysql> use observium;

mysql> alter table devices change column device_id device_id int(11) not null auto_increment;

Easy fix, but takes some time to find out.

Some background information from the logs:

##### Software versions #####

o OS Linux 4.9.0-8-amd64 [amd64] (Debian 9.6)
o Apache 2.4.25
o PHP 7.0.33-0+deb9u1 (OPcache: DISABLED)
o Python 2.7.13
o MySQL 10.1.37-MariaDB-0+deb9u1 (extension: mysqli 5.0.12-dev)
o SNMP NET-SNMP 5.7.3
o RRDtool 1.6.0
o Fping 3.15 (IPv4 and IPv6)

##### Memory Limit #####

o PHP Unlimited

##### MySQL mode #####

o MySQL NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

##### Charset info #####

o PHP UTF-8
o MySQL utf8

##### Timezones info #####

o Date Wednesday, 15-May-19 13:35:30 CAT
o PHP +02:00
o MySQL +02:00

After making the change, please check the auto_increment value is there.

show columns from devices from observium;

Leave a Reply