Hey Ilya, On Mon, Dec 12, 2005 at 09:18:10PM +0300, Molokanov Ilya wrote:
> FAILED query follows: > INSERT INTO acct (stamp_updated, stamp_inserted, ip_src, ip_dst, > src_port, dst_port, ip_proto, mac_src, mac_dst, packets, bytes) VALUES > (FROM_UNIXTIME(1134411301), FROM_UNIXTIME(4291806600), > '192.168.16.206', '192.168.16.255', 0, 0, 'ip', '0:0:0:0:0:0', > '0:0:0:0:0:0', 2, 92) > ERROR ( dummy/mysql ): Column 'stamp_inserted' cannot be null The above error is returned to pmacct straight from MySQL server. And it looks very strange because the field seems to be correctly "valued". As a first thing, take the above string and push it into the MySQL server via an interactive terminal; see whether it works. I've done so and it worked successfully with a MySQL server 4.0.14. While the query is well formatted, What looks wrong is the value of the 'stamp_inserted' field: 4291806600. After having inserted it into my server, the SELECT shows what follows: mysql> SELECT * FROM acct; +-------------+-------------+----------------+----------------+----------+----------+----------+---------+-------+---------------------+---------------------+ | mac_src | mac_dst | ip_src | ip_dst | src_port | dst_port | ip_proto | packets | bytes | stamp_inserted | stamp_updated | +-------------+-------------+----------------+----------------+----------+----------+----------+---------+-------+---------------------+---------------------+ | 0:0:0:0:0:0 | 0:0:0:0:0:0 | 192.168.16.163 | 192.168.16.255 | 0 | 0 | ip | 12 | 936 | 1969-11-25 11:01:44 | 2005-12-12 19:15:17 | +-------------+-------------+----------------+----------------+----------+----------+----------+---------+-------+---------------------+---------------------+ 1 row in set (0.00 sec) My question is: what happens if you insert the 'nfacctd_time_new: true' line in your nfacctd configuration ? Are you sure your network device (the one exporting the NetFlow datagrams) runs the correct date ? And in the end: is it a Juniper equipment ? Any chance that its times are in secs rather than in msecs (take a look to the 'nfacctd_time_secs' directive) ? Let me know. Cheers, Paolo