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

Pushing status of non HTTP services #5

Open
JoyceBabu opened this issue Aug 31, 2024 · 12 comments
Open

Pushing status of non HTTP services #5

JoyceBabu opened this issue Aug 31, 2024 · 12 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JoyceBabu
Copy link

Is it possible to push the status to the worker, for non HTTP services?

For example, I have MariaDB replication configured on a slave server, and would like to monitor it by pushing the status every few minutes.

@yunsii
Copy link
Owner

yunsii commented Sep 1, 2024

It means you want to push the status to database directly? Maybe it can be works with MariaDB client JS SDK to push data though I'm not familier with MariaDB.

@JoyceBabu
Copy link
Author

I want to write a bash script to check the replication status, and make a HTTP request to the status page with the service status. In other words I want to push the service status to the status page, instead of the monitors retrieving it.

@JoyceBabu
Copy link
Author

I am interested in support for non HTTP services, which will be updated directly. Currently the monitors fetch the URL for checking the service health, and log the request time. For non-http services behind a firewall, it is not possible for the status page cron job to poll the service to check its health. So, an agent on the server, running the service, should be able to update the status by calling a status page api end point.

The metric to be measured might be different for non-HTTP service. For example, for the replication service I would like to monitor the replication delay.

@yunsii
Copy link
Owner

yunsii commented Sep 2, 2024

It means you want to push a status record directly by API request. I think the best solution is creating a HTTP service to detect your DB service status?

@JoyceBabu
Copy link
Author

JoyceBabu commented Sep 2, 2024

It means you want to push a status record directly by API request.

That is right.

I think the best solution is creating a HTTP service to detect your DB service status?

The server is behind firewall. I cannot open a port to receive incoming connections.

@yunsii
Copy link
Owner

yunsii commented Sep 4, 2024

It occurred to me that kv namespace can be controled by RESTful API, you can directly write data with it 👌

@JoyceBabu
Copy link
Author

That solves the issue partially.

The service monitor can only update the status when it is up, if the server is down it may not be able to do that. So if no status is received in a pre-configured period, then the service should be considered as down.

@yunsii
Copy link
Owner

yunsii commented Sep 4, 2024

If so, the related changes seems not easy. I will gradually make it happen, Also PR is welcome.

@vinnymac
Copy link

If so, the related changes seems not easy. I will gradually make it happen, Also PR is welcome.

Couldn’t we use a short (60s?) TTL to solve for this use case? If the kv store returns no value for a given key, the site can be considered down. If a value is found for the key it’s up.

Would that technique hit any usage limits on the free tier?

@yunsii
Copy link
Owner

yunsii commented Nov 30, 2024

These are two scenarios, the repo only support check status by sending a http request to service from cron worker for now. I will try to implement a new approach recently: receive a http request with specific TTL to determine servcie status 😀

@yunsii
Copy link
Owner

yunsii commented Nov 30, 2024

Would that technique hit any usage limits on the free tier?

It seems that no limit for receive http request refer to Limits

@JoyceBabu
Copy link
Author

I ended up writing my own status page script. Not feature complete as this project. But works for my case.

https://github.com/Ennexa/status-page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants