Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to integrate log files and OWA? #191

Closed
coofercat opened this issue Aug 22, 2016 · 1 comment
Closed

Question: Is it possible to integrate log files and OWA? #191

coofercat opened this issue Aug 22, 2016 · 1 comment

Comments

@coofercat
Copy link

coofercat commented Aug 22, 2016

[This is a question, rather than an issue - links to forums and whatnot seem to lead here, so I'm sorry if this isn't the right place for this sort of thing]

I'm wondering if I could integrate log files with OWA. I'm wondering if I could write a 'log file tailer' process that would effectively do a 'tail -f' of my nginx access.log file. Every suitable line would then cause the tailer to send an event into OWA.

What I couldn't figure out is if there's a way to craft an event to post into OWA that contains all the details of the original page view. I guess what I'd like to do is to post data something like this:

{
  'timestamp': 12345678,
  'ip': '192.168.1.201',
  'url': '/some_page.html',
  'domain': 'www.example.com',
  'source': 'web01.example.com',
  'referrer': 'http://www.example.com/other_page.html',
  'response_code': 200,
}

Note that I of course need to tell OWA what IP address (and timestamp, etc) the event relates to, rather than letting OWA figure it out from the connection to to it. Is something like this possible?

@padams
Copy link
Collaborator

padams commented Aug 22, 2016

OWA has this built in. You can set up events to be queued to a log file for processing at set intervals using the CLI.

https://github.com/padams/Open-Web-Analytics/wiki/event-queueing

One could hack things so that GET requests to log.php simply write to nginx/apache logs, but you’d then be missing out on the environmental vars that PHP adds at the server level for each request.

On Aug 22, 2016, at 4:05 AM, coofercat notifications@github.com wrote:

[This is a question, rather than an issue - links to forums and whatnot seem to lead here, so I'm sorry if this isn't the right place for this sort of thing]

I'm wondering if I could integrate log files with OWA. I'm wondering if I could write a 'log file tailer' process that would effectively do a 'tail -f' of my nginx access.log file. Every suitable line would then cause the tailer to send an event into OWA.

What I couldn't figure out is if there's a way to craft an event to post into OWA that contains all the details of the original page view. I guess what I'd like to do is to post data something like this:

{
'timestamp': 12345678,
'ip': '192.168.1.201',
'url': '/some_page.html',
'domain': 'www.example.com',
'source': 'web01.example.com',
'referrer': 'http://www.example.com/other_page.html',
'response_code': 200,
}
Note that I of course need to tell OWA what IP address (and timestamp, etc) the event relates to, rather than letting OWA figure it out from connection to to it. Is something like this possible?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #191, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPPnMG3jzd1VWOq1LyLD2wySDiqby4nks5qiYJzgaJpZM4JpwCT.

@padams padams closed this as completed Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants