[Date Prev] [Date Next] | [Thread Prev] [Thread Next] | [Date Index] [Thread Index] |
SQL Based NOCOL/SNIPS
|
Here's some examples of what I'm talking about. More comments at the end... create table events ( event_id number(38) primary key, host varchar2(128), ip_address char(8), variable varchar2(32), value number(38), description varchar2(255), last_updated date, ); create bitmap index id_events_01 on events(variable); create index id_events_02 on events(value); optional: create index id_events_03 on events(host); create index id_events_04 on events(ip_address); event_id: unique event id host: device hostname ip_address: hexadecimal representation of ip address variable: variable name (ICMP, BGPpeer, etc) value: current value description: event description last_updated: last date/time this event_id was updated create sequence event_id start with 1 increment by 1 minvalue 1 order; create table BGPpeer ( event_id number(38) references events(event_id) on delete cascade, peer_ip_address char(8), peer_description varchar2(255), status varchar2(16), last_updated date, constraint pk_BGPpeer_01 primary key(event_id, peer_ip_address) ); create bitmap index id_BGPpeer_01 on BGPpeer(status); event_id: foreign key pointing to parent event_id (which contains router info) peer_ip_address: hexadecimal representation of ip address of peer peer_description: text description of peer - could be a peering ID # status: Established, Active, etc. last_updated: last time peer was updated in table An example BGP query. SELECT P.peer_ip_address, P.peer_description, P.last_updated, E.host, E.ip_address from BGPpeer P, events E WHERE E.event_id = P.event_id AND E.value>0 AND P.status != 'Established' Of course some of this will have to change for a 'mysql' version rather than an oracle based version. You would insert the information into the database the same way the nocol_init presently does it... and then use UPDATE to update the information. The query above would be what one of many 'display parameters' could include. Finally, you may be wondering, how does it all work? the parent daemon calls each plugin (similar to NetSaint) with unix command lines... only rather than the plugin returning a static value, it returns a set of INSERT or UPDATE commands....so the bgpmon plugin could have its own table 'BGPpeer' for example that updates and inserts into that table to keep track of peers within each router. Let me know what you think... I think this could turn NOCOL/SNIPS into one of the most scalable products available both commercially and non-commercially. Thank you, Jonathan A. Zdziarski Sr. Systems Administrator Netrail, inc. 888.NET.RAIL x240 http://www.netrail.net |