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

Stable page for ELB health check #7810

Closed
petergillardmoss opened this issue May 1, 2015 · 6 comments
Closed

Stable page for ELB health check #7810

petergillardmoss opened this issue May 1, 2015 · 6 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@petergillardmoss
Copy link

Hello,

We have our Piwik instances on an autoscaling group behind an ELB load balancer.

Today our AWS system went into freefall launching and terminating instances in an infinite loop.

On debugging we realised that we'd been using index.php to do a health check. Because the version had been upgraded Piwik was now returning a 302 for index.php to prompt to run the upgrade process. AWS ELB only recognises 200 as healthy.

We've changed the ELB to point to plugins/Diagnostics/DiagnosticReport.php instead, which gave a stable 200 response in both scenarios. However I'm sure this is far from robust.

Is it possible to provide a reliable URL on which load balancers (and other monitoring systems) can health check Piwik from?

Thanks
Peter

@tsteur
Copy link
Member

tsteur commented May 5, 2015

You could probably use http://example.org/config/global.ini.php or http://example.org/config/config.ini.php since it is unlikely that we will remove those files anytime soon. We do have some monitoring running as well but I do not know what we use for our health checks. We do not really have this problem that they could go into freefall launching and terminating.

What exactly did you want to test here? Just whether the webserver is running in general?

@petergillardmoss
Copy link
Author

Thanks for the response.

I'll try those pages.

Yes we just want to know if the server is up and running.

The problem is manifest when using health checks with autoscaling. If the health check fails then autoscaling kills the instance and creates a new one. But the health check will always fail if the page doesn't return a 200 (for whatever reason).

@tsteur
Copy link
Member

tsteur commented May 12, 2015

@petergillardmoss I will reopen this issue for now since we probably actually need a file / api for that to prevent issues like this and #7850 in the future. At least we'll have to think about it and see what we can/want to do.

ping @mattab

@tsteur tsteur reopened this May 12, 2015
@mattab
Copy link
Member

mattab commented May 14, 2015

I forgot about this issue and created another issue in #7904

@petergillardmoss feel free to add your thoughts over there

@mattab mattab closed this as completed May 14, 2015
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label May 14, 2015
@ORESoftware
Copy link

ORESoftware commented Sep 24, 2019

what URL should we use for a health check if we put matomo behind a load balancer? This thread was unfortunately not useful so far.

GET matomo.ours.co/xyz  

?

and expect http code 200?

@tsteur
Copy link
Member

tsteur commented Sep 25, 2019

You could for example create a site for ELB and use the tracking API for this like http://yourdomain.com/matomo.php?rec=1&idsite=1&action_name=foo&send_image=1 this will also test DB connection basically.

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

4 participants