Per CommanderStorm's feedback, refactor the check() method into:
- checkKeyword() - for legacy keyword matching
- checkJsonQuery() - for legacy JSONata query
- checkConditions() - for new conditions system
Also add test cases for MQTT conditions:
- Message condition with contains operator
- Topic condition with equals operator
- Condition mismatch rejection
- Multiple conditions with AND logic
This improves readability and maintainability.
Add rich conditions support to MQTT monitor similar to DNS monitor,
allowing users to define flexible conditions on:
- topic: The MQTT topic that received the message
- message: The raw message content
- json_value: JSONata-extracted value from JSON payloads
This provides a more intuitive and powerful way to validate MQTT
messages compared to the basic keyword/json-query checks.
Maintains backward compatibility with existing keyword and json-query
check types.
Closes#5992
Currently translated at 100.0% (1249 of 1249 strings)
Translated using Weblate (Slovak)
Currently translated at 100.0% (1243 of 1243 strings)
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/sk/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 98.8% (1234 of 1248 strings)
Translated using Weblate (German (Switzerland))
Currently translated at 97.0% (1211 of 1248 strings)
Translated using Weblate (German)
Currently translated at 98.5% (1208 of 1226 strings)
Translated using Weblate (German (Switzerland))
Currently translated at 98.5% (1208 of 1226 strings)
Co-authored-by: Marco <marco@nanoweb.ch>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de/
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de_CH/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 98.8% (1234 of 1248 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (1225 of 1225 strings)
Translated using Weblate (Russian)
Currently translated at 99.7% (1222 of 1225 strings)
Co-authored-by: Virenbar <rib.artem@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/ru/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1249 of 1249 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1248 of 1248 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1243 of 1243 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1236 of 1236 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1226 of 1226 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1225 of 1225 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1255 of 1255 strings)
Co-authored-by: Cyril59310 <archas.cyril@hotmail.fr>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fr/
Translation: Uptime Kuma/Uptime Kuma