Problem/Motivation

This is an amazing module, thank you for making it available. I do have a proposal for your documentation, though:

Assume, you have 20 active sensors in your Drupal site, and you want to setup Uptime Kuma with just 1 monitor that goes red if at least 1 sensor is not OK.

Proposed resolution

This can be done with the following settings:

The JSON Query Expression is $keys($sift($, function($v) { $v != 'OK' and $v != 'INFO' })) and that should be equal to count_failures. That gives you a green status. For anything else, it turns red.

What that JSON Query Expression does is to determine all keys in the received JSON array that have value not equal to OK. When all sensors are OK, this returns just count_failures which contains a number.

CommentFileSizeAuthor
2025-11-06_10-49.jpg25.1 KBjurgenhaas
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Issue summary: View changes

Updated the query expression top also allow INFO as something that shouldn't raise an alert.

guillaumeg made their first commit to this issue’s fork.

  • guillaumeg committed f469716f on 1.0.x
    #3556381 Update README.md to detail how to monitor all sensors at once...
guillaumeg’s picture

Hi @jurgenhaas and thanks for proposing this doc update!

I’ve updated the README file and the main module page description to include it.

guillaumeg’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

guillaumeg’s picture

Status: Fixed » Closed (fixed)