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

Get Current Status? #11

Open
dsmitty166 opened this issue Feb 7, 2023 · 7 comments
Open

Get Current Status? #11

dsmitty166 opened this issue Feb 7, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@dsmitty166
Copy link

I could very well be just over looking this, but where can I pull current monitor status from? ie is a monitor "up or down"?

@MedAziz11
Copy link
Owner

there is no end point that returns this specific info but u can know that from /ping or /uptime , in the mean time ill try to add it, thnx for the contribution.

@MedAziz11 MedAziz11 added the enhancement New feature or request label Feb 11, 2023
@raufis27
Copy link

raufis27 commented Mar 6, 2023

Could you please share how do I get up/down status for specific monitor?

@hteibler
Copy link

actually this was my main point to look at this !
great work so far,
but my use-case would be to get the overall status in my nodered dashboard an use it in flows!

@MedAziz11
Copy link
Owner

@raufis27 @hteibler /monitors/{monitor_id}/beats => it has a status field, if the status is true then its Up , else its DOWN

@PatyYe
Copy link

PatyYe commented Apr 21, 2023

Would be nice if we use the /monitors it'll include beats in a serpeate json object for each monitor.
Will gain a lot of stress on the query, but much better then querying each monitor individually.

@nstankov-bg
Copy link
Contributor

This would make the object too big on large-scale deployments.
the global /monitors gives you the generic information and IDs.

From there you query every monitor individually for granular control.

In my example I have over 600 monitors. The JSON produced will be absolutely ineffective to process.

@BouncySteak
Copy link

@raufis27 @hteibler /monitors/{monitor_id}/beats => it has a status field, if the status is true then its Up , else its DOWN

I notice that the response is in relation to Uptime-Kuma itself and not the status of the actual monitor. And in my case returns 200, not "true"

Currently I am processing the last beat in /monitors/{monitor_id}/beats

How to get last beat in JS

As if jsonResponse is the raw json from the API
jsonResponse[Object.keys(jsonResponse)[Object.keys(jsonResponse).length - 1]].status

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

No branches or pull requests

7 participants