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

import_logs.py look for https host if http host fails #8051

Closed
rhurling opened this issue Jun 6, 2015 · 2 comments
Closed

import_logs.py look for https host if http host fails #8051

rhurling opened this issue Jun 6, 2015 · 2 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@rhurling
Copy link

rhurling commented Jun 6, 2015

Hi,

I currently have the problem that I want to auto-import my log files which didn't work, because the import_logs.py DynamicResolver class only looks for 'http://' + host in Piwik, but all my Sites are https only and created in piwik accordingly.

The following change to the _get_site_id_from_hit_host function would allow the script to look for a https host if no http host is found.

    def _get_site_id_from_hit_host(self, hit):
        main_url = 'http://' + hit.host
        res = piwik.call_api(
            'SitesManager.getSitesIdFromSiteUrl',
            url=main_url,
        )
        if res:
            return res

        main_url = 'https://' + hit.host
        return piwik.call_api(
            'SitesManager.getSitesIdFromSiteUrl',
            url=main_url,
        )
@mattab
Copy link
Member

mattab commented Jun 8, 2015

Hi @rhurling thanks for feedback. The issue tracker for Log Analytics is at: https://github.com/piwik/piwik-log-analytics

do you mind creating your issue there, and close this one? thanks

@rhurling
Copy link
Author

rhurling commented Jun 8, 2015

Ah, I didn't know it had a separate repo.
I will reopen the Issue there.
Thank you.

@rhurling rhurling closed this as completed Jun 8, 2015
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants