Commit Graph

146 Commits

Author SHA1 Message Date
mkdev11 8b145d2522 refactor: split MQTT check() into smaller functions
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.
2026-01-06 03:48:31 +02:00
mkdev11 e22784aaea fix: guard against undefined conditions in MQTT monitor
Add check for monitor.conditions before calling fromMonitor() to
prevent JSON.parse(undefined) error when monitors don't have
conditions defined.
2026-01-06 03:19:22 +02:00
mkdev11 cf1391db6b feat: add conditions support for MQTT monitor type
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
2026-01-06 03:08:10 +02:00
Eddie Fiorentine afa81fdef8 Update server/monitor-types/sip-options.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-04 22:22:25 -05:00
Eddie Fiorentine 7827033456 Update server/monitor-types/sip-options.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-04 22:22:17 -05:00
Eddie Fiorentine 032eb891ae Update server/monitor-types/sip-options.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-04 22:21:51 -05:00
Frank Elsinga 5baac436d3 Merge branch 'master' into master 2026-01-03 17:12:44 +01:00
Markus Reisenhofer d096e2902c feat(gamedig): Update gamedig implementation to v5 (#4949)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-03 05:56:38 +00:00
iotux b3f84f0bf8 Merge branch 'louislam:master' into feature/local-service-monitor 2026-01-02 13:56:19 +07:00
Frank Elsinga 951b375a60 Merge branch 'master' into feature/5934 2026-01-02 07:27:51 +01:00
iotux e99cd18268 Update server/monitor-types/system-service.js
Thanks for your help wit this

Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-02 07:07:47 +01:00
iotux 1faed64e13 Merge remote-tracking branch 'upstream/master' into feature/local-service-monitor 2026-01-01 12:11:27 +01:00
iotux 2c47174a04 Merge branch 'feature/local-service-monitor' of https://github.com/iotux/uptime-kuma into feature/local-service-monitor 2026-01-01 09:55:14 +01:00
iotux 97d836d7f4 Modified according to review 2026-01-01 09:41:24 +01:00
iotux 6bc382ef4d Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:41:09 +01:00
iotux f3c554d0ec Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:37:42 +01:00
iotux 6c93930d3e Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:35:59 +01:00
iotux 2dbd8aecf2 Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:34:47 +01:00
Frank Elsinga bcdf6b8959 Merge branch 'master' into websocket_test 2026-01-01 08:25:14 +01:00
iotux c09882b00a Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:19:55 +01:00
iotux 134877317c Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:18:05 +01:00
iotux 132a03874d Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2026-01-01 08:03:57 +01:00
PoleTransformer 8594bc81b3 Enforce backend WS timeout + subprotocol logic + formatting 2025-12-31 09:51:53 -08:00
PoleTransformer 20e2cf69e4 Add timeout selection + refine error logic + update tests 2025-12-30 20:29:55 -08:00
PoleTransformer a2c81ebf44 minor patch 2025-12-30 17:57:29 -08:00
PoleTransformer 0bee90ea31 WS test status code support + improved error handing + subprotocol input 2025-12-30 17:49:09 -08:00
iotux 1d118b4852 Merge branch 'louislam:master' into feature/local-service-monitor 2025-12-30 19:53:40 +07:00
Pedro Magno e62008cfb0 Merge branch 'master' into feature/mssql-monitor 2025-12-30 11:16:42 +00:00
Pedro Magno 534ba5d547 chore: Extract the sqlserver monitor to its own monitor-type. Enable support conditions for a single result value. 2025-12-30 11:06:04 +00:00
xNewz 7ef7abe6be fix: remove accidental websocket changes 2025-12-30 14:15:21 +07:00
xNewz 7e74579312 Handle websocket errors with missing messages 2025-12-30 07:52:49 +07:00
iotux fcdc22a661 Merge branch 'louislam:master' into feature/local-service-monitor 2025-12-24 12:20:14 +07:00
Anthony b6e8d548b0 fix: update dns monitor to evaluate full response list on CAA resolver_type (#6520) 2025-12-24 03:36:28 +01:00
iotux 97ba9e46e3 Removed dropdown in UI, and some template/i18n cleanups 2025-12-23 12:18:33 +01:00
iotux 73a19df90c Merge branch 'master' into feature/local-service-monitor 2025-12-20 22:17:46 +07:00
iotux 8189623389 Added timeout to system commands to prevent zombie processes 2025-12-20 16:02:38 +01:00
iotux 15de932623 Cleanup comments and switch to integration tests 2025-12-20 15:19:06 +01:00
Shaan f3c76dbc6f feat: Add XMPP dialog in STARTTLS routine (#6508) 2025-12-20 12:35:53 +00:00
iotux b7573cf917 Replaced regex filtering in checkWindows 2025-12-20 05:14:17 +01:00
iotux 4639dc54bd Added space to filter regex 2025-12-19 16:12:58 +01:00
iotux 3e2f489d8b Moved input filter to checkLinux and checkWindows functions 2025-12-19 14:33:10 +01:00
iotux 0f951ef123 Added Windows Service Monitor & changed local to systen 2025-12-15 16:27:20 +01:00
iotux fe50adb061 Cleaned up some comments 2025-12-15 15:26:09 +01:00
iotux 96e8268986 Minor local-service cleanup 2025-12-15 13:58:02 +01:00
iotux d76ce4e28d Simplified and secured Local Service monitor 2025-12-14 16:39:00 +01:00
iotux 3b9c5530cc Replaced some tabs 2025-12-14 16:39:00 +01:00
iotux 7461bd296f feat: Add 'local service' monitor type
This adds a new monitor type to check local services by executing a shell command. It also includes fixes for Prometheus errors when adding new tags and for the UI not updating when tags are changed.
2025-12-14 16:39:00 +01:00
Dalton Pearson 91edeaeb9c Extracted the postgresql monitor to its own monitor-type (#6443)
Co-authored-by: Dalton Pearson <dalton.pearson@praemo.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2025-12-04 14:16:06 +00:00
Frank Elsinga b230ab0a06 migrated grpc keyword to the newer monitoringtype (#4821)
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2025-11-29 23:21:45 +08:00
Louis Lam 6e49601eed Enforce UP status for non-custom status monitors (#6433)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-28 20:25:06 +08:00