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

Custom port for HTTP check #24

Closed
Southclaws opened this issue Jul 17, 2018 · 7 comments
Closed

Custom port for HTTP check #24

Southclaws opened this issue Jul 17, 2018 · 7 comments
Labels
bug Something isn't working

Comments

@Southclaws
Copy link

Hi, loving statup btw! I'm planning to use it to monitor a small set of microservices for an upcoming product and I've hit a few issues early on. I could submit some patches for these but I figured I'd open issues to discuss first.

So my services are deployed using docker compose: https://github.com/TradeWars/deployment - statup lives in the deployment and is connected to the same networks as the services. The problem is, my services are running on non-standard HTTP ports.

So I can use the domain name and hi warehouse but because it's running on port 7788 I get a "connection refused". A quick fix for this one would be to re-use the "TCP Port" field for the client.Get call if it's set - if not, just omit it.

@hunterlong
Copy link
Member

hey @Southclaws , thank you for committing the TCP methods. I recently made some major major changes to the structs and Golang code and I'm going to have to rewrite your TCP checker to match up with new structure. All types are in types package now which will brake a lot of your code.

I will add this TCP checker ASAP and let you know when it's tested and complete.

@hunterlong hunterlong added the bug Something isn't working label Jul 17, 2018
@Southclaws
Copy link
Author

Ah, I should have checked the dev branch before I worked on it! Oh well, it was only a quick 10 minute job. Looking forward to the update, don't worry too much about doing it ASAP as I'm far from deploying the application properly anyway. Thanks!

@hunterlong
Copy link
Member

I should put something about the dev branch in the wiki/readme. I'm almost done with the TCP checker, I used a lot of your code. edc2d9b

almost done, i'll update here when it's complete

@hunterlong
Copy link
Member

If you'd like to use a port, create a TCP service, it will allow you to ping a IP address along with any port. HTTP services are only for HTTP/HTTPS website.

@Southclaws
Copy link
Author

Southclaws commented Jul 21, 2018

Thanks, everything is working great now!

I still think custom port on HTTP is valid though, many services expose a /health endpoint which returns some JSON - the HTTP "expected payload" could be useful for this but it's not absolutely necessary.

@hunterlong
Copy link
Member

I tired using a port along with HTTP, golang throws a panic. HTTP is 80, HTTPS is 443. Unless you know of a way. You might be able to use TCP with hostname, port, and /health.

@Southclaws
Copy link
Author

I'm pretty sure you can just append :1234 to the address field. It was necessary for quite a few microservices on a project I worked on a while back. HTTP is usually 80 however that's not part of the HTTP spec itself, in reality it can run on any port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants