Index: /trunk/flowmon-dbspooler.py =================================================================== --- /trunk/flowmon-dbspooler.py (revision 1) +++ /trunk/flowmon-dbspooler.py (revision 2) @@ -133,10 +133,11 @@ cursor.execute("""INSERT INTO Flows (FlowSrc, TimeStart, TimeStop, IPProto, IPSrc, IPDst, IntIn, - IntOut, PortSrc, PortDst, MaskSrc, MaskDst, Bytes, Pakets) + IntOut, PortSrc, PortDst, MaskSrc, MaskDst, Direction, Bytes, Pakets) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);""", (sourceid, unix_starttime + ( flow['FIRST_SWITCHED'] / 1000 ), unix_starttime + ( flow['LAST_SWITCHED'] / 1000), flow['PROTOCOL'], IPy.IP(flow['IPV4_SRC_ADDR']).strDec(), IPy.IP(flow['IPV4_DST_ADDR']).strDec(), flow['INPUT_SNMP'], flow['OUTPUT_SNMP'], - flow['L4_SRC_PORT'], flow['L4_DST_PORT'], flow['SRC_MASK'], flow['DST_MASK'], bytes, pkts)) + flow['L4_SRC_PORT'], flow['L4_DST_PORT'], flow['SRC_MASK'], flow['DST_MASK'], + flow['DIRECTION'], bytes, pkts)) 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'])) Index: /trunk/mysql.sql =================================================================== --- /trunk/mysql.sql (revision 1) +++ /trunk/mysql.sql (revision 2) @@ -29,4 +29,5 @@ `TimeStart` int(11) unsigned NOT NULL default '0', `TimeStop` int(11) unsigned NOT NULL default '0', + `Direction` smallint(11) unsigned NULL default NULL, `Bytes` int(11) unsigned NOT NULL default '0', `Pakets` int(11) unsigned NOT NULL default '0',