opencast / opencast-influxdb-adapter

Educational Community License v2.0
1 stars 4 forks source link

Wrong Organization/Event-ID parsing for nginx access log #17

Open Hufschmidt opened 3 years ago

Hufschmidt commented 3 years ago

With access-logs generated by our nginx frontend we get the following access-log entries:

<remote> - - [<time>] "GET /static/<org>/api/<event>/<video>.mp4?policy=<...>&keyId=<org>&signature=<...> ..."

while the current parser seems to require

<remote> - - [<time>] "GET /<org>/api/<event>/<video>.mp4?policy=<...>&keyId=<org>&signature=<...> ..."

(without /static prefix)

This leads to invalid detection of \<org> and \<event> fields and those causes the opencast-influxdb-db adapter to exit when requesting information for org=static, event=api since those do not exists.

Possible solution: Configurable url-prefix (default: /)

hsssystems commented 3 years ago

Hi,

we already made a patch for this that allows you to configure the regular expression and parse the logs. We are working on a Pull Request.