I post in this particular section of the forum because the issue that I am facing with phpLogCon is not with its functionality, but implementation.
The frontend is nice, and the software seems rather organized, however the time it takes to perform a database search is way too long.
Here is a concrete example: I would like to see the list of log entries in the last 24 hours whose message contains "authentication failure" to see if there are bots trying to force a login to my ssh server.
I wrote a system utility in perl called logparse that generated this mysql query and executed it, returning the results in a simple table:
SELECT ReceivedAt, FromHost, SysLogTag, Message from SystemEvents where (ReceivedAt > DATE_SUB(NOW(), INTERVAL 1 DAY)) AND (Message REGEXP 'authentication failure') GROUP BY Message ORDER BY ReceivedAt
The time it took to execute was very short (considering most of the execution time was probably the mysql select)
real 0m2.419s
user 0m0.029s
sys 0m0.005s
Now, we will try the same query on phplogcon, using the advanced search feature to specify the time period in the last 24 hours and the message field containing 'authentication failure'. The page eventually refreshed with the results, with this performance metric in the bottom banner:
Page rendered in: 24.9766 seconds | DB queries: 3
Now here's the thing I don't understand: why do we use three database queries to do something that only takes one, and take 12 times the time required? Granted, the app is generating a somewhat complex webpage, and not a simple text-based table, but perhaps also we do not trust the inherent features that MySQL is capable of. The thing that I really like about this software package is that it has it's own search syntax. Is it not possible to convert the string "datelastx:3 messagetype:1,3,5 authentication failure" into the SQL query above?
In short, I think PhpLogCon is a great app, and I know for a fact it can go faster. Much faster.
-Amin Astaneh
USF Research Computing
http://rc.usf.edu


