Dear Juan !

        I am using NTOP and MySQL (using ODBC) to log some events, but running
under Linux. The problem I actually have is related to some TcpSessions
not beeing logged by NTOP, but all logs that are presented on the
console, are  saved to the DB.

        I developed a small code in Tcl (not Perl) to catch all SQL statements
sent by NTOP to the UDP port (4000) and then send those SQL statements
to an ODBC DB (actually is a MySQL Server). I am not using direct MySQL
conncetion.

        The log that you show is the one provided by NTOP in it is console when
it is about to call the DB routine. As I told you, you can use a direct
connection to MySQL or an ODBC connection to any DB.

        One thing that is not clear (to me) is that you say you are using MySQL
and see Access tables beeing populated !

        We can talk (via email) more about this. Let me know if I can help in
any way. Regards,



                        Ricardo Jorge

Em Sex, 2002-06-28 �s 07:46, Juan Ramon Duarte escreveu:
> 
> Hi,
> 
> I've managed to include mySQL support into a Windows compile of NTop.
> But I have two problems:
> 
> 1. It crashes even more frequently (sometimes within 5 seconds of 
>    starting) than without database support.
>    This is not very consistent but many times it crashes just after
>    this line in the console:
> 
> 
>   28/Jun/2002 11:22:33 INSERT INTO TCPsessions (Client, Server, 
>   ClientPort, ServerPort, DataSent, DataRcvd, FirstSeen, LastSeen) 
>   VALUES ('10.10.80.83', '10.10.1.181', '1248', '80', '0', 
>   '1078198272', '(null)', '(null)')
> 
> 
> I can see that the Access database is being populated. All tables 
> except 'TCPSessions' now contain data.  This seems consistent with
> NTop crashing every time it tries to insert into TCPSessions.
> 
> 
> I have only seen one error in the mySQLServer.pl  console:
> 
>   INSERT INTO TCPsessions (Client, Server, ClientPort, ServerPort, 
>   DataSent, DataRcvd, FirstSeen, LastSeen) VALUES ('10.10.80.83', 
>   '10.10.1.181', '1248', '80', '0', '1078198272', '(null)', '(null)') 
>   DBD::ODBC::db do failed: [Microsoft][ODBC Microsoft Access Driver] 
>   Data type mismatch in criteria expression. (SQL-22005)(DBD: 
>   st_execute/SQLExecute err=-1) at mysqlserver.pl line 61.
> 
> Again, consistent in being related to 'TCPSessions'.
> 
> 
> 2. I would like to compile NTop using MinGW but haven't been able
> for lack of the mysql libraries.  
> The closest I've come is by using the 'libmysqlclient MinGW port'
> found at http://www.johnydog.cz/projects.php
> 
> Any pointers?
> 
> 
> 
> My current configuration is:
> 
> - Win 2000
> 
> - NTop compiled with VC++ 6.0
> 
> - mySQL support added through compiling against include files 
>   and the DLL provided in the mysql++ API package (downloaded 
>   from www.mysql.com)
> 
> - mySQLSever.pl, modified to connect via ODBC
> 
> - ntop -> mySQLServer.pl -> ODBC -> ntop.mdb
> 
> 
> Regards,
> 
> JRD
> 
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://lists.ntop.org/mailman/listinfo/ntop-dev
> 
-- 


Tridata Tecnologia Ltda.

Rua Machado Bittencourt, 190 Cj. 508

Vila Clementino - Sao Paulo - SP - 04044-000

Voice (55)-11-5575-0125
FAX   (55)-11-5571-0893

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev

Reply via email to