logging - Setup Nginx logs to directly imports in Piwik -
i have piwik installed , working fine, want configure nginx directly import logs created, preventing parse logs files.
i know can done in apache using following:
# log piwik customlog "|/path/to/import_logs.py --option1 --option2 ... -" mylogformat but couldn't find on nginx.
has knows how this?
this isn't possible in nginx, see this post in mailing list.
no, nginx not support logging pipe since simlpy waste of cpu. may try tail -f /path/to/log | app same waste of cpu piped log.
if want know why it's slow:
logging pipe cpu waste because causes lot of context switches , memory copies every log operation: 1) nginx writes pipe, 2) context switch script, 2) script reads pipe, 3) script processes line, 4) script writes database, 5) context switch nginx. instead of single memory copy operation log file. you'll have create script that's running , tailing log files, piping data piwik.
Comments
Post a Comment