-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Consider no new MQTT messages as a failiure and mark the monitor as down #2037
Comments
I'm surprised there aren't more requests for this. I am struggling to find a use for the MQTT monitor, given this behavior. Has anyone found a workaround? I have shelly modules that send an MQTT message every minute, but Uptime Kuma always sets the test as successful because of old messages. |
I agree. The reason, I think, is that usually monitoring is active: you request something and if the reply is there then it is ok. Otherwise it is a failure. In the case of MQTT it is either the other way round (no messages = problem), or the content of the message (the payload) matters (temperature is 35°C, it is > 30 so raise an alert). As far as I can tell, the current MQTT monitor does neither of them, so it is hardly usable. I use MQTT a lot for home automation (Home Assistant) and as a general-purpose bus for my home code. Having the ability to check for a heartbeat (and ideally, a content analysis as I mentioned in #2405 (comment)) would be awesome. |
I agree that for this feature to be minimally useful, that there should be a way to consider the age of the most recent message to determine the current status of the monitor. |
Agreed, especially when the status messages have a retain flag set, unless the device specifically set itself to unavailable, the monitor would always come back with a success result, so you would never catch anything that's not a planned maintenance. |
Has anyone found a work around for this? |
🏷️ Feature Request Type
Other
🔖 Feature description
Currently a message from long ago can match the monitor message and be marked as up. If an MQTT client has failed to send a message into the MQTT server the monitor will still pass as up. Uptime Kuma should consider no messages as a failure and mark the monitor as down.
✔️ Solution
Perform the MQTT monitor and check if the matched message was sent since the last check, or if no new messages have been send. No new messages should fail as down.
❓ Alternatives
No response
📝 Additional Context
No response
The text was updated successfully, but these errors were encountered: