Server Log Analytics - Does it suppport error logs?


#1

I recently setup log tracking for my server’s access log and it worked perfectly for it. However, I was wondering if it supports error log parsing. I tried it and it blew an error.

Here is a sample line from the access log which works:


XXX.XXX.XXX.XX - - [19/Nov/2013:21:22:40 +0000] "GET /uft/css/style.css HTTP/1.1" 404 215 118 0

Here is a sample line from the error log which doesn’t work:


[Wed Nov 20 16:55:35 2013] [error] [client XXX.XXX.XXX.XX] File does not exist: /opt/forecast/uft/css/style.css

Here is the error that I get:


Traceback (most recent call last):
  File "/opt/web/htdocs/piwik/misc/log-analytics/import_logs.py", line 1575, in <module>
    main()
  File "/opt/web/htdocs/piwik/misc/log-analytics/import_logs.py", line 1539, in main
    parser.parse(filename)
  File "/opt/web/htdocs/mpetkov/piwik/misc/log-analytics/import_logs.py", line 1390, in parse
    format = self.detect_format(file)
  File "/opt/web/htdocs/piwik/misc/log-analytics/import_logs.py", line 1349, in detect_format
    logging.debug('Format %s is the best match', format.name)


(Matthieu Aubry) #2

import_logs only imports access logs. Generally 404 errors are logged in the access logs and can be imported (with custom variables set to Http-code=404)

we may support error logs parsing later if more users request it. It would be very valuable for sure!


#3

Thank you for clearing it up.