]> git.sesse.net Git - nms/blob - clients/snmp.sql
Merge.
[nms] / clients / snmp.sql
1 create table switchtypes (
2         switchtype varchar not null primary key,
3         ports varchar not null
4 );
5
6 create table switches (
7         switch serial not null primary key,
8         ip inet not null,
9         sysname varchar not null,
10         switchtype varchar not null references switchtypes,
11         last_updated timestamp,
12         locked boolean not null default 'f'
13 );
14
15 create table poll (
16         time timestamp not null,
17         switch integer not null references switches,
18         port integer not null,
19         bytes_in bigint not null,
20         bytes_out bigint not null,
21
22         primary key ( time, switch, port )
23 );
24 create index poll_switch_port on poll ( switch, port );