Hi ,
I have many librenms installations in my corp. Latest installation gives DB schema errors.
When you face with new librenms installation there is a problem with db schema, I couldn’t fix.
after clean install
> 1. try to populate db by daily.sh, DB schema comes to 0 and lots of table errors occurs
/usr/local/www/librenms]$ ./daily.sh
Updating to latest codebase OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
/usr/local/www/librenms]$ ./validate.php
Component | Version |
---|---|
LibreNMS | f8aadf227b25ff4436859d19062d234ed9134767 |
**DB Schema | 0** |
PHP | 5.6.30 |
MySQL | 5.6.36-log |
RRDTool | 1.6.0 |
SNMP | NET-SNMP 5.7.3 |
==========================================================
[OK] Database connection successful
[FAIL] Database: incorrect column (applications/timestamp)
[FAIL] Database: missing table (bgpPeers)
[FAIL] Database: missing table (bgpPeers_cbgp)
[FAIL] Database: missing table (ciscoASA)
[FAIL] Database: missing table (dbSchema)
[FAIL] Database: missing table (devices)
[FAIL] Database: extra index (devices_attribs/device_id_2)
[FAIL] Database: extra index (devices_attribs/device_id_3)
[FAIL] Database: extra index (device_graphs/device_id_2)
[FAIL] Database: extra index (device_graphs/device_id_3)
[FAIL] Database: missing table (device_group_device)
[FAIL] Database: incorrect column (device_mibs/last_modified)
[FAIL] Database: incorrect column (device_oids/last_modified)
[FAIL] Database: extra index (device_perf/device_id_2)
[FAIL] Database: extra index (device_perf/device_id_3)
[FAIL] Database: missing table (entPhysical)
[FAIL] Database: missing table (entPhysical_state)
[FAIL] Database: extra index (eventlog/device_id_2)
[FAIL] Database: extra index (eventlog/device_id_3)
[FAIL] Database: missing table (hrDevice)
[FAIL] Database: extra index (ipv4_mac/port_id_2)
[FAIL] Database: extra index (ipv4_mac/mac_address_2)
[FAIL] Database: extra index (ipv4_mac/port_id_3)
[FAIL] Database: extra index (ipv4_mac/mac_address_3)
[FAIL] Database: missing table (juniAtmVp)
[FAIL] Database: extra index (links/local_device_id_2)
[FAIL] Database: extra index (links/local_device_id_3)
[FAIL] Database: extra index (loadbalancer_vservers/device_id_2)
[FAIL] Database: extra index (loadbalancer_vservers/device_id_3)
[FAIL] Database: missing table (mac_accounting)
[FAIL] Database: incorrect column (mibdefs/last_modified)
[FAIL] Database: missing table (processors)
[FAIL] Database: extra index (session/session_value_2)
[FAIL] Database: extra index (session/session_value_3)
[FAIL] Database: incorrect column (state_translations/state_lastupdated)
[FAIL] Database: missing table (storage)
[FAIL] Database: extra index (syslog/program_2)
[FAIL] Database: extra index (syslog/program_3)
[FAIL] Database: extra index (ucd_diskio/device_id_3)
[FAIL] Database: extra index (ucd_diskio/device_id_4)
[FAIL] Database: incorrect column (users/updated_at)
[FAIL] Database: extra column (users/remeber_token)
[FAIL] Database: missing table (wireless_sensors)
[FAIL] Database: extra table (bgppeers)
[FAIL] Database: extra table (bgppeers_cbgp)
[FAIL] Database: extra table (bill_port_counters_tmp)
[FAIL] Database: extra table (ciscoasa)
[FAIL] Database: extra table (entphysical_state)
[FAIL] Database: extra table (hrdevice)
[FAIL] Database: extra table (juniatmvp)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
ALTER TABLE applications
CHANGE timestamp
timestamp
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
CREATE TABLE bgpPeers
(astext
varchar(64) NOT NULL, bgpLocalAddr
text NOT NULL, bgpPeerAdminStatus
text NOT NULL, bgpPeerFsmEstablishedTime
int(11) NOT NULL, bgpPeerIdentifier
text NOT NULL, bgpPeerInTotalMessages
int(11) NOT NULL, bgpPeerInUpdateElapsedTime
int(11) NOT NULL, bgpPeerInUpdates
int(11) NOT NULL, bgpPeerOutTotalMessages
int(11) NOT NULL, bgpPeerOutUpdates
int(11) NOT NULL, bgpPeerRemoteAddr
text NOT NULL, bgpPeerRemoteAs
bigint(20) NOT NULL, bgpPeerState
text NOT NULL, bgpPeer_id
int(11) NOT NULL auto_increment, context_name
varchar(128) NULL, device_id
int(11) NOT NULL, PRIMARY KEY (bgpPeer_id
), INDEX device_id
(device_id
));
CREATE TABLE bgpPeers_cbgp
(AcceptedPrefixes
int(11) NOT NULL, AcceptedPrefixes_delta
int(11) NOT NULL, AcceptedPrefixes_prev
int(11) NOT NULL, AdvertisedPrefixes
int(11) NOT NULL, AdvertisedPrefixes_delta
int(11) NOT NULL, AdvertisedPrefixes_prev
int(11) NOT NULL, afi
varchar(16) NOT NULL, bgpPeerIdentifier
varchar(64) NOT NULL, context_name
varchar(128) NULL, DeniedPrefixes
int(11) NOT NULL, DeniedPrefixes_delta
int(11) NOT NULL, DeniedPrefixes_prev
int(11) NOT NULL, device_id
int(11) NOT NULL, PrefixAdminLimit
int(11) NOT NULL, PrefixClearThreshold
int(11) NOT NULL, PrefixThreshold
int(11) NOT NULL, safi
varchar(16) NOT NULL, SuppressedPrefixes
int(11) NOT NULL, SuppressedPrefixes_delta
int(11) NOT NULL, SuppressedPrefixes_prev
int(11) NOT NULL, WithdrawnPrefixes
int(11) NOT NULL, WithdrawnPrefixes_delta
int(11) NOT NULL, WithdrawnPrefixes_prev
int(11) NOT NULL, UNIQUE unique_index
(device_id
,bgpPeerIdentifier
,afi
,safi
), INDEX device_id
(device_id
,bgpPeerIdentifier
));
CREATE TABLE ciscoASA
(ciscoASA_id
int(11) NOT NULL auto_increment, data
bigint(20) NOT NULL, device_id
int(11) NOT NULL, disabled
tinyint(4) NOT NULL DEFAULT ‘0’, high_alert
bigint(20) NOT NULL, low_alert
bigint(20) NOT NULL, oid
varchar(255) NOT NULL, PRIMARY KEY (ciscoASA_id
), INDEX device_id
(device_id
));
CREATE TABLE dbSchema
(version
int(11) NOT NULL DEFAULT ‘0’, PRIMARY KEY (version
));
CREATE TABLE devices
(agent_uptime
int(11) NOT NULL DEFAULT ‘0’, authalgo
enum(‘MD5’,‘SHA’) NULL, authlevel
enum(‘noAuthNoPriv’,‘authNoPriv’,‘authPriv’) NULL, authname
varchar(64) NULL, authpass
varchar(64) NULL, bgpLocalAs
varchar(16) NULL, community
varchar(255) NULL, cryptoalgo
enum(‘AES’,‘DES’,’’) NULL, cryptopass
varchar(64) NULL, device_id
int(11) unsigned NOT NULL auto_increment, disabled
tinyint(1) NOT NULL DEFAULT ‘0’, features
text NULL, hardware
text NULL, hostname
varchar(128) NOT NULL, icon
varchar(255) NULL, ignore
tinyint(4) NOT NULL DEFAULT ‘0’, ip
varbinary(16) NULL, last_discovered
timestamp NULL, last_discovered_timetaken
double(5,2) NULL, last_ping
timestamp NULL, last_ping_timetaken
double(5,2) NULL, last_polled
timestamp NULL, last_polled_timetaken
double(5,2) NULL, last_poll_attempted
timestamp NULL, location
text NULL, notes
text NULL, os
varchar(32) NULL, override_sysLocation
tinyint(1) NULL DEFAULT ‘0’, poller_group
int(11) NOT NULL DEFAULT ‘0’, port
smallint(5) unsigned NOT NULL DEFAULT ‘161’, port_association_mode
int(11) NOT NULL DEFAULT ‘1’, purpose
text NULL, retries
int(11) NULL, serial
text NULL, snmpver
varchar(4) NOT NULL DEFAULT ‘v2c’, status
tinyint(4) NOT NULL DEFAULT ‘0’, status_reason
varchar(50) NOT NULL, sysContact
text NULL, sysDescr
text NULL, sysName
varchar(128) NULL, sysObjectID
varchar(64) NULL, timeout
int(11) NULL, transport
varchar(16) NOT NULL DEFAULT ‘udp’, type
varchar(20) NOT NULL, uptime
bigint(20) NULL, version
text NULL, PRIMARY KEY (device_id
), INDEX status
(status
), INDEX hostname
(hostname
), INDEX sysName
(sysName
), INDEX os
(os
), INDEX last_polled
(last_polled
), INDEX last_poll_attempted
(last_poll_attempted
));
ALTER TABLE devices_attribs
DROP INDEX device_id_2
;
ALTER TABLE devices_attribs
DROP INDEX device_id_3
;
ALTER TABLE device_graphs
DROP INDEX device_id_2
;
ALTER TABLE device_graphs
DROP INDEX device_id_3
;
CREATE TABLE device_group_device
(device_group_id
int(10) unsigned NOT NULL, device_id
int(10) unsigned NOT NULL, PRIMARY KEY (device_group_id
,device_id
), INDEX device_group_device_device_group_id_index
(device_group_id
), INDEX device_group_device_device_id_index
(device_id
));
ALTER TABLE device_mibs
CHANGE last_modified
last_modified
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
ALTER TABLE device_oids
CHANGE last_modified
last_modified
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
ALTER TABLE device_perf
DROP INDEX device_id_2
;
ALTER TABLE device_perf
DROP INDEX device_id_3
;
CREATE TABLE entPhysical
(device_id
int(11) NOT NULL, entPhysicalAlias
varchar(32) NULL, entPhysicalAssetID
varchar(32) NULL, entPhysicalClass
text NOT NULL, entPhysicalContainedIn
int(11) NOT NULL, entPhysicalDescr
text NOT NULL, entPhysicalFirmwareRev
varchar(64) NULL, entPhysicalHardwareRev
varchar(64) NULL, entPhysicalIndex
int(11) NOT NULL, entPhysicalIsFRU
varchar(8) NULL, entPhysicalMfgName
text NOT NULL, entPhysicalModelName
text NOT NULL, entPhysicalName
text NOT NULL, entPhysicalParentRelPos
int(11) NOT NULL, entPhysicalSerialNum
text NOT NULL, entPhysicalSoftwareRev
varchar(64) NULL, entPhysicalVendorType
text NULL, entPhysical_id
int(11) NOT NULL auto_increment, ifIndex
int(11) NULL, PRIMARY KEY (entPhysical_id
), INDEX device_id
(device_id
));
CREATE TABLE entPhysical_state
(device_id
int(11) NOT NULL, entPhysicalIndex
varchar(64) NOT NULL, group
varchar(64) NOT NULL, key
varchar(64) NOT NULL, subindex
varchar(64) NULL, value
varchar(255) NOT NULL, INDEX device_id_index
(device_id
,entPhysicalIndex
));
ALTER TABLE eventlog
DROP INDEX device_id_2
;
ALTER TABLE eventlog
DROP INDEX device_id_3
;
CREATE TABLE hrDevice
(device_id
int(11) NOT NULL, hrDeviceDescr
text NOT NULL, hrDeviceErrors
int(11) NOT NULL DEFAULT ‘0’, hrDeviceIndex
int(11) NOT NULL, hrDeviceStatus
text NOT NULL, hrDeviceType
text NOT NULL, hrDevice_id
int(11) NOT NULL auto_increment, hrProcessorLoad
tinyint(4) NULL, PRIMARY KEY (hrDevice_id
), INDEX device_id
(device_id
));
ALTER TABLE ipv4_mac
DROP INDEX port_id_2
;
ALTER TABLE ipv4_mac
DROP INDEX mac_address_2
;
ALTER TABLE ipv4_mac
DROP INDEX port_id_3
;
ALTER TABLE ipv4_mac
DROP INDEX mac_address_3
;
CREATE TABLE juniAtmVp
(juniAtmVp_id
int(11) NOT NULL, port_id
int(11) NOT NULL, vp_descr
varchar(32) NOT NULL, vp_id
int(11) NOT NULL, INDEX port_id
(port_id
));
ALTER TABLE links
DROP INDEX local_device_id_2
;
ALTER TABLE links
DROP INDEX local_device_id_3
;
ALTER TABLE loadbalancer_vservers
DROP INDEX device_id_2
;
ALTER TABLE loadbalancer_vservers
DROP INDEX device_id_3
;
CREATE TABLE mac_accounting
(bps_in
int(11) NOT NULL, bps_out
int(11) NOT NULL, cipMacHCSwitchedBytes_input
bigint(20) NULL, cipMacHCSwitchedBytes_input_delta
bigint(20) NULL, cipMacHCSwitchedBytes_input_prev
bigint(20) NULL, cipMacHCSwitchedBytes_input_rate
int(11) NULL, cipMacHCSwitchedBytes_output
bigint(20) NULL, cipMacHCSwitchedBytes_output_delta
bigint(20) NULL, cipMacHCSwitchedBytes_output_prev
bigint(20) NULL, cipMacHCSwitchedBytes_output_rate
int(11) NULL, cipMacHCSwitchedPkts_input
bigint(20) NULL, cipMacHCSwitchedPkts_input_delta
bigint(20) NULL, cipMacHCSwitchedPkts_input_prev
bigint(20) NULL, cipMacHCSwitchedPkts_input_rate
int(11) NULL, cipMacHCSwitchedPkts_output
bigint(20) NULL, cipMacHCSwitchedPkts_output_delta
bigint(20) NULL, cipMacHCSwitchedPkts_output_prev
bigint(20) NULL, cipMacHCSwitchedPkts_output_rate
int(11) NULL, in_oid
varchar(128) NOT NULL, mac
varchar(32) NOT NULL, ma_id
int(11) NOT NULL auto_increment, out_oid
varchar(128) NOT NULL, poll_period
int(11) NULL, poll_prev
int(11) NULL, poll_time
int(11) NULL, port_id
int(11) NOT NULL, PRIMARY KEY (ma_id
), INDEX interface_id
(port_id
), INDEX interface_id_2
(port_id
));
and 20 more…
> 2. method with new clean install by using build-base.php DB version give correct version but still giving schema errors.
[librenms@tatana /usr/local/www/librenms]$ ./build-base.php
– Updating database schema
000 -> 001 … done (0 errors).
001 -> 002 … done (0 errors).
002 -> 003 … done (0 errors).
003 -> 004 … done (0 errors).
004 -> 005 … done (0 errors).
005 -> 006 … done (0 errors).
006 -> 007 … done (0 errors).
007 -> 008 … done (0 errors).
008 -> 009 … done (0 errors).
009 -> 010 … done (0 errors).
010 -> 011 … done (0 errors).
011 -> 012 … done (0 errors).
012 -> 013 … done (0 errors).
013 -> 014 … done (0 errors).
014 -> 015 … done (0 errors).
015 -> 016 … done (0 errors).
016 -> 017 … done (0 errors).
017 -> 018 … done (0 errors).
018 -> 019 … done (0 errors).
019 -> 020 … done (0 errors).
020 -> 021 … done (0 errors).
021 -> 022 … done (0 errors).
022 -> 023 … done (0 errors).
023 -> 024 … done (0 errors).
024 -> 025 … done (0 errors).
025 -> 026 … done (0 errors).
026 -> 027 … done (0 errors).
027 -> 028 … done (0 errors).
028 -> 029 … done (0 errors).
029 -> 030 … done (0 errors).
030 -> 031 … done (0 errors).
031 -> 032 … done (0 errors).
032 -> 033 … done (0 errors).
033 -> 034 … done (0 errors).
034 -> 035 … done (0 errors).
035 -> 036 … done (0 errors).
036 -> 037 … done (0 errors).
037 -> 038 … done (0 errors).
038 -> 039 … done (0 errors).
039 -> 040 … done (0 errors).
040 -> 041 … done (0 errors).
041 -> 042 … done (0 errors).
042 -> 043 … done (0 errors).
043 -> 044 … done (0 errors).
044 -> 045 … done (0 errors).
045 -> 046 … done (0 errors).
046 -> 047 … done (0 errors).
047 -> 048 … done (0 errors).
048 -> 049 … done (0 errors).
049 -> 050 … done (0 errors).
050 -> 051 … done (0 errors).
051 -> 052 … done (0 errors).
052 -> 053 … done (0 errors).
053 -> 054 … done (0 errors).
054 -> 055 … done (0 errors).
055 -> 056 … done (0 errors).
056 -> 057 … done (0 errors).
057 -> 058 … done (0 errors).
058 -> 059 … done (0 errors).
059 -> 060 … done (0 errors).
060 -> 061 … done (0 errors).
061 -> 062 … done (0 errors).
062 -> 063 … done (0 errors).
063 -> 064 … done (0 errors).
064 -> 065 … done (0 errors).
065 -> 066 … done (0 errors).
066 -> 067 … done (0 errors).
067 -> 068 … done (0 errors).
068 -> 069 … done (0 errors).
069 -> 070 … done (0 errors).
070 -> 071 … done (0 errors).
071 -> 072 … done (0 errors).
072 -> 073 … done (0 errors).
073 -> 074 … done (0 errors).
074 -> 075 … done (0 errors).
075 -> 076 … done (0 errors).
076 -> 077 … done (0 errors).
077 -> 078 … done (0 errors).
078 -> 079 … done (0 errors).
079 -> 080 … done (0 errors).
080 -> 081 … done (0 errors).
081 -> 082 … done (0 errors).
082 -> 083 … done (0 errors).
083 -> 084 … done (0 errors).
084 -> 085 … done (0 errors).
085 -> 086 … done (0 errors).
086 -> 087 … done (0 errors).
087 -> 088 … done (0 errors).
088 -> 089 … done (0 errors).
089 -> 090 … done (0 errors).
090 -> 091 … done (0 errors).
091 -> 092 … done (0 errors).
092 -> 093 … done (0 errors).
093 -> 094 … done (0 errors).
094 -> 095 … done (0 errors).
095 -> 096 … done (0 errors).
096 -> 097 … done (0 errors).
097 -> 098 … done (0 errors).
098 -> 099 … done (0 errors).
099 -> 100 … done (0 errors).
100 -> 101 … done (0 errors).
101 -> 102 … done (0 errors).
102 -> 103 … done (0 errors).
103 -> 104 … done (0 errors).
104 -> 105 … done (0 errors).
105 -> 106 … done (0 errors).
106 -> 107 … done (0 errors).
107 -> 108 … done (0 errors).
108 -> 109 … done (0 errors).
109 -> 110 … done (0 errors).
110 -> 111 … done (0 errors).
111 -> 112 … done (0 errors).
112 -> 113 … done (0 errors).
113 -> 114 … done (0 errors).
114 -> 115 … done (0 errors).
115 -> 116 … done (0 errors).
116 -> 117 … done (0 errors).
117 -> 118 … done (0 errors).
118 -> 119 … done (0 errors).
119 -> 120 … done (0 errors).
120 -> 121 … done (0 errors).
121 -> 122 … done (0 errors).
122 -> 123 … done (0 errors).
123 -> 124 … done (0 errors).
124 -> 125 … done (0 errors).
125 -> 126 … done (0 errors).
126 -> 127 … done (0 errors).
127 -> 128 … done (0 errors).
128 -> 129 … done (0 errors).
129 -> 130 … done (0 errors).
130 -> 131 … done (0 errors).
131 -> 132 … done (0 errors).
132 -> 133 … done (0 errors).
133 -> 134 … done (0 errors).
134 -> 135 … done (0 errors).
135 -> 136 … done (0 errors).
136 -> 137 … done (0 errors).
137 -> 138 … done (0 errors).
138 -> 139 … done (0 errors).
139 -> 140 … done (0 errors).
140 -> 141 … done (0 errors).
141 -> 142 … done (0 errors).
142 -> 143 … done (0 errors).
143 -> 144 … done (0 errors).
144 -> 145 … done (0 errors).
145 -> 146 … done (0 errors).
146 -> 147 … done (0 errors).
147 -> 148 … done (0 errors).
148 -> 149 … done (0 errors).
149 -> 150 … done (0 errors).
150 -> 151 … done (0 errors).
151 -> 152 … done (0 errors).
152 -> 153 … done (0 errors).
153 -> 154 … done (0 errors).
154 -> 155 … done (0 errors).
155 -> 156 … done (0 errors).
156 -> 157 … done (0 errors).
157 -> 158 … done (0 errors).
158 -> 159 … done (0 errors).
159 -> 160 … done (0 errors).
160 -> 161 … done (0 errors).
161 -> 162 … done (0 errors).
162 -> 163 … done (0 errors).
163 -> 164 … done (0 errors).
164 -> 165 … done (0 errors).
165 -> 166 … done (0 errors).
166 -> 167 … done (0 errors).
167 -> 168 … done (0 errors).
168 -> 169 … done (0 errors).
169 -> 170 … done (0 errors).
170 -> 171 … done (0 errors).
171 -> 172 … done (0 errors).
172 -> 173 … done (0 errors).
173 -> 174 … done (0 errors).
174 -> 175 … done (0 errors).
175 -> 176 … done (0 errors).
176 -> 177 … done (0 errors).
177 -> 178 … done (0 errors).
178 -> 179 … done (0 errors).
179 -> 180 … done (0 errors).
180 -> 181 … done (0 errors).
181 -> 182 … done (0 errors).
182 -> 183 … done (0 errors).
183 -> 184 … done (0 errors).
184 -> 185 … done (0 errors).
185 -> 186 … done (0 errors).
186 -> 187 … done (0 errors).
187 -> 188 … done (0 errors).
188 -> 189 … done (0 errors).
189 -> 190 … done (0 errors).
190 -> 191 … done (0 errors).
191 -> 192 … done (0 errors).
– Done
/usr/local/www/librenms]$ ./validate.php
Component | Version |
---|---|
LibreNMS | f8aadf227b25ff4436859d19062d234ed9134767 |
**DB Schema | 192** |
PHP | 5.6.30 |
MySQL | 5.6.36-log |
RRDTool | 1.6.0 |
SNMP | NET-SNMP 5.7.3 |
==========================================================
[OK] Database connection successful
[FAIL] Database: incorrect column (applications/timestamp)
[FAIL] Database: missing table (bgpPeers)
[FAIL] Database: missing table (bgpPeers_cbgp)
[FAIL] Database: missing table (ciscoASA)
[FAIL] Database: missing table (dbSchema)
[FAIL] Database: incorrect column (device_mibs/last_modified)
[FAIL] Database: incorrect column (device_oids/last_modified)
[FAIL] Database: missing table (entPhysical)
[FAIL] Database: missing table (entPhysical_state)
[FAIL] Database: missing table (hrDevice)
[FAIL] Database: missing table (juniAtmVp)
[FAIL] Database: incorrect column (mibdefs/last_modified)
[FAIL] Database: incorrect column (state_translations/state_lastupdated)
[FAIL] Database: incorrect column (users/updated_at)
[FAIL] Database: extra table (bgppeers)
[FAIL] Database: extra table (bgppeers_cbgp)
[FAIL] Database: extra table (ciscoasa)
[FAIL] Database: extra table (dbschema)
[FAIL] Database: extra table (entphysical)
[FAIL] Database: extra table (entphysical_state)
[FAIL] Database: extra table (hrdevice)
[FAIL] Database: extra table (juniatmvp)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
ALTER TABLE applications
CHANGE timestamp
timestamp
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
CREATE TABLE bgpPeers
(astext
varchar(64) NOT NULL, bgpLocalAddr
text NOT NULL, bgpPeerAdminStatus
text NOT NULL, bgpPeerFsmEstablishedTime
int(11) NOT NULL, bgpPeerIdentifier
text NOT NULL, bgpPeerInTotalMessages
int(11) NOT NULL, bgpPeerInUpdateElapsedTime
int(11) NOT NULL, bgpPeerInUpdates
int(11) NOT NULL, bgpPeerOutTotalMessages
int(11) NOT NULL, bgpPeerOutUpdates
int(11) NOT NULL, bgpPeerRemoteAddr
text NOT NULL, bgpPeerRemoteAs
bigint(20) NOT NULL, bgpPeerState
text NOT NULL, bgpPeer_id
int(11) NOT NULL auto_increment, context_name
varchar(128) NULL, device_id
int(11) NOT NULL, PRIMARY KEY (bgpPeer_id
), INDEX device_id
(device_id
));
CREATE TABLE bgpPeers_cbgp
(AcceptedPrefixes
int(11) NOT NULL, AcceptedPrefixes_delta
int(11) NOT NULL, AcceptedPrefixes_prev
int(11) NOT NULL, AdvertisedPrefixes
int(11) NOT NULL, AdvertisedPrefixes_delta
int(11) NOT NULL, AdvertisedPrefixes_prev
int(11) NOT NULL, afi
varchar(16) NOT NULL, bgpPeerIdentifier
varchar(64) NOT NULL, context_name
varchar(128) NULL, DeniedPrefixes
int(11) NOT NULL, DeniedPrefixes_delta
int(11) NOT NULL, DeniedPrefixes_prev
int(11) NOT NULL, device_id
int(11) NOT NULL, PrefixAdminLimit
int(11) NOT NULL, PrefixClearThreshold
int(11) NOT NULL, PrefixThreshold
int(11) NOT NULL, safi
varchar(16) NOT NULL, SuppressedPrefixes
int(11) NOT NULL, SuppressedPrefixes_delta
int(11) NOT NULL, SuppressedPrefixes_prev
int(11) NOT NULL, WithdrawnPrefixes
int(11) NOT NULL, WithdrawnPrefixes_delta
int(11) NOT NULL, WithdrawnPrefixes_prev
int(11) NOT NULL, UNIQUE unique_index
(device_id
,bgpPeerIdentifier
,afi
,safi
), INDEX device_id
(device_id
,bgpPeerIdentifier
));
CREATE TABLE ciscoASA
(ciscoASA_id
int(11) NOT NULL auto_increment, data
bigint(20) NOT NULL, device_id
int(11) NOT NULL, disabled
tinyint(4) NOT NULL DEFAULT ‘0’, high_alert
bigint(20) NOT NULL, low_alert
bigint(20) NOT NULL, oid
varchar(255) NOT NULL, PRIMARY KEY (ciscoASA_id
), INDEX device_id
(device_id
));
CREATE TABLE dbSchema
(version
int(11) NOT NULL DEFAULT ‘0’, PRIMARY KEY (version
));
ALTER TABLE device_mibs
CHANGE last_modified
last_modified
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
ALTER TABLE device_oids
CHANGE last_modified
last_modified
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
CREATE TABLE entPhysical
(device_id
int(11) NOT NULL, entPhysicalAlias
varchar(32) NULL, entPhysicalAssetID
varchar(32) NULL, entPhysicalClass
text NOT NULL, entPhysicalContainedIn
int(11) NOT NULL, entPhysicalDescr
text NOT NULL, entPhysicalFirmwareRev
varchar(64) NULL, entPhysicalHardwareRev
varchar(64) NULL, entPhysicalIndex
int(11) NOT NULL, entPhysicalIsFRU
varchar(8) NULL, entPhysicalMfgName
text NOT NULL, entPhysicalModelName
text NOT NULL, entPhysicalName
text NOT NULL, entPhysicalParentRelPos
int(11) NOT NULL, entPhysicalSerialNum
text NOT NULL, entPhysicalSoftwareRev
varchar(64) NULL, entPhysicalVendorType
text NULL, entPhysical_id
int(11) NOT NULL auto_increment, ifIndex
int(11) NULL, PRIMARY KEY (entPhysical_id
), INDEX device_id
(device_id
));
CREATE TABLE entPhysical_state
(device_id
int(11) NOT NULL, entPhysicalIndex
varchar(64) NOT NULL, group
varchar(64) NOT NULL, key
varchar(64) NOT NULL, subindex
varchar(64) NULL, value
varchar(255) NOT NULL, INDEX device_id_index
(device_id
,entPhysicalIndex
));
CREATE TABLE hrDevice
(device_id
int(11) NOT NULL, hrDeviceDescr
text NOT NULL, hrDeviceErrors
int(11) NOT NULL DEFAULT ‘0’, hrDeviceIndex
int(11) NOT NULL, hrDeviceStatus
text NOT NULL, hrDeviceType
text NOT NULL, hrDevice_id
int(11) NOT NULL auto_increment, hrProcessorLoad
tinyint(4) NULL, PRIMARY KEY (hrDevice_id
), INDEX device_id
(device_id
));
CREATE TABLE juniAtmVp
(juniAtmVp_id
int(11) NOT NULL, port_id
int(11) NOT NULL, vp_descr
varchar(32) NOT NULL, vp_id
int(11) NOT NULL, INDEX port_id
(port_id
));
ALTER TABLE mibdefs
CHANGE last_modified
last_modified
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
ALTER TABLE state_translations
CHANGE state_lastupdated
state_lastupdated
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
ALTER TABLE users
CHANGE updated_at
updated_at
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;
DROP TABLE bgppeers
;
DROP TABLE bgppeers_cbgp
;
DROP TABLE ciscoasa
;
DROP TABLE dbschema
;
DROP TABLE entphysical
;
DROP TABLE entphysical_state
;
DROP TABLE hrdevice
;
DROP TABLE juniatmvp
;
[
[FAIL] The poller has never run, check the cron job
[WARN] You have not added any devices yet.