- Timestamp:
- 12/01/08 18:39:54 (16 years ago)
- Files:
-
- trunk/flowmon-dbspooler.py (modified) (1 diff)
- trunk/mysql.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/flowmon-dbspooler.py
r1 r2 133 133 134 134 cursor.execute("""INSERT INTO Flows (FlowSrc, TimeStart, TimeStop, IPProto, IPSrc, IPDst, IntIn, 135 IntOut, PortSrc, PortDst, MaskSrc, MaskDst, Bytes, Pakets)135 IntOut, PortSrc, PortDst, MaskSrc, MaskDst, Direction, Bytes, Pakets) 136 136 VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);""", 137 137 (sourceid, unix_starttime + ( flow['FIRST_SWITCHED'] / 1000 ), 138 138 unix_starttime + ( flow['LAST_SWITCHED'] / 1000), flow['PROTOCOL'], IPy.IP(flow['IPV4_SRC_ADDR']).strDec(), 139 139 IPy.IP(flow['IPV4_DST_ADDR']).strDec(), flow['INPUT_SNMP'], flow['OUTPUT_SNMP'], 140 flow['L4_SRC_PORT'], flow['L4_DST_PORT'], flow['SRC_MASK'], flow['DST_MASK'], bytes, pkts)) 140 flow['L4_SRC_PORT'], flow['L4_DST_PORT'], flow['SRC_MASK'], flow['DST_MASK'], 141 flow['DIRECTION'], bytes, pkts)) 141 142 142 143 debug("Flow ready to insert: %s:%s -> %s:%s" % (flow['IPV4_SRC_ADDR'], flow['L4_SRC_PORT'], flow['IPV4_DST_ADDR'], flow['L4_DST_PORT'])) trunk/mysql.sql
r1 r2 29 29 `TimeStart` int(11) unsigned NOT NULL default '0', 30 30 `TimeStop` int(11) unsigned NOT NULL default '0', 31 `Direction` smallint(11) unsigned NULL default NULL, 31 32 `Bytes` int(11) unsigned NOT NULL default '0', 32 33 `Pakets` int(11) unsigned NOT NULL default '0',