JSON query: Empty or undefined response #4751

Closed
opened 2026-02-28 04:13:59 -05:00 by deekerman · 3 comments
Owner

Originally created by @Errorts on GitHub (Feb 24, 2026).

⚠️ Please verify that your question has not already been reported

🛡️ Security Policy

📝 Describe your problem

When attempting to setup a monitor for a component in xen-orchestra I've found that uptime-kuma is unable to read the json. This seems odd as it's worked with all the other json endpoints I've pointed it at so I must be doing something wrong but I can't figure out what.

Here is the curl command to the endpoint and the full response back. Checking with jq and pasting it into the jsonata playground both show it as valid json. The only thing I've hidden in the response is the ip in the location section.

I know the authentication is working because if I change the monitor to HTTP(s) - keyword then it's able to find the keywords like true and PBD. But trying to read it as json just doesn't work. Note that I didn't try to make the response look pretty. That's exactly how it looks when you hit the http endpoint or curl it on the terminal. Maybe that's what's causing the issue

curl -X 'GET' \ 
            'https://<host>.<domain>/rest/v0/pbds/<id> \
            -H 'Cookie: authenticationToken=<token>'
{
  "type": "PBD",
  "attached": true,
  "host": "22b7c9a9-139c-4a14-9ef6-b3c86930009c",
  "SR": "a62edb51-2b5d-c3af-0090-9e06ca70a300",
  "device_config": {
    "location": "0.0.0.0:/iso"
  },
  "otherConfig": {
    "storage_driver_domain": "OpaqueRef:5bd8a3de-c266-faa5-8713-57f07e35ce53"
  },
  "id": "928eab57-f16c-058b-e05c-d6d8eadb25e3",
  "uuid": "928eab57-f16c-058b-e05c-d6d8eadb25e3",
  "$pool": "fc43ec2b-0c5b-91b9-0dca-5ef5357d6ad1",
  "$poolId": "fc43ec2b-0c5b-91b9-0dca-5ef5357d6ad1",
  "_xapiRef": "OpaqueRef:b6d54034-359f-77cb-05cb-232389ae0b0c"
}

Here is the query:

Image

📝 Error Message(s) or Log

Monitor #51 'share online': Failing: Error evaluating JSON query: Empty or undefined response. Check query syntax and response structure. Response from server was: undefined | Interval: 20 seconds | Type: json-query | Down Count: 0 | Resend Interval: 0

🐻 Uptime-Kuma Version

2.1.3

💻 Operating System and Arch

Ubuntu 24.04.4 LTS x86_64 GNU/Linux

🌐 Browser

Brave 1.87.190 (Official Build) (64-bit) Chromium: 145.0.7632.109

🖥️ Deployment Environment

  • Runtime Environment:
    • Docker: Version 29.2.1, build a5c7197
    • Docker Compose version v5.0.2
    • Dockhand (CE): Version 1.0.18
  • Database:
    • SQLite: Embedded
  • Database Storage:
    • Filesystem:
      • Linux: Btrfs
    • Storage Medium: HDD
  • Uptime Kuma Setup:
    • Number of monitors: 52
Originally created by @Errorts on GitHub (Feb 24, 2026). ### ⚠️ Please verify that your question has not already been reported - [x] I have searched the [existing issues](https://github.com/louislam/uptime-kuma/issues?q=is%3Aissue%20sort%3Acreated-desc%20) and found no similar reports. ### 🛡️ Security Policy - [x] I have read and agree to Uptime Kuma's [Security Policy](https://github.com/louislam/uptime-kuma/security/policy). ### 📝 Describe your problem When attempting to setup a monitor for a component in xen-orchestra I've found that uptime-kuma is unable to read the json. This seems odd as it's worked with all the other json endpoints I've pointed it at so I must be doing something wrong but I can't figure out what. Here is the curl command to the endpoint and the full response back. Checking with jq and pasting it into the jsonata playground both show it as valid json. The only thing I've hidden in the response is the ip in the location section. I know the authentication is working because if I change the monitor to HTTP(s) - keyword then it's able to find the keywords like true and PBD. But trying to read it as json just doesn't work. Note that I didn't try to make the response look pretty. That's exactly how it looks when you hit the http endpoint or curl it on the terminal. Maybe that's what's causing the issue ``` curl -X 'GET' \ 'https://<host>.<domain>/rest/v0/pbds/<id> \ -H 'Cookie: authenticationToken=<token>' ``` ``` { "type": "PBD", "attached": true, "host": "22b7c9a9-139c-4a14-9ef6-b3c86930009c", "SR": "a62edb51-2b5d-c3af-0090-9e06ca70a300", "device_config": { "location": "0.0.0.0:/iso" }, "otherConfig": { "storage_driver_domain": "OpaqueRef:5bd8a3de-c266-faa5-8713-57f07e35ce53" }, "id": "928eab57-f16c-058b-e05c-d6d8eadb25e3", "uuid": "928eab57-f16c-058b-e05c-d6d8eadb25e3", "$pool": "fc43ec2b-0c5b-91b9-0dca-5ef5357d6ad1", "$poolId": "fc43ec2b-0c5b-91b9-0dca-5ef5357d6ad1", "_xapiRef": "OpaqueRef:b6d54034-359f-77cb-05cb-232389ae0b0c" } ``` Here is the query: <img width="1252" height="906" alt="Image" src="https://github.com/user-attachments/assets/ad2bc8c2-2c88-49b5-86e4-7bd04f9debd5" /> ### 📝 Error Message(s) or Log ```bash session Monitor #51 'share online': Failing: Error evaluating JSON query: Empty or undefined response. Check query syntax and response structure. Response from server was: undefined | Interval: 20 seconds | Type: json-query | Down Count: 0 | Resend Interval: 0 ``` ### 🐻 Uptime-Kuma Version 2.1.3 ### 💻 Operating System and Arch Ubuntu 24.04.4 LTS x86_64 GNU/Linux ### 🌐 Browser Brave 1.87.190 (Official Build) (64-bit) Chromium: 145.0.7632.109 ### 🖥️ Deployment Environment - **Runtime Environment**: - Docker: Version 29.2.1, build a5c7197 - Docker Compose version v5.0.2 - Dockhand (CE): Version `1.0.18` - **Database**: - SQLite: Embedded - **Database Storage**: - **Filesystem**: - Linux: Btrfs - **Storage Medium**: HDD - **Uptime Kuma Setup**: - Number of monitors: `52`
deekerman 2026-02-28 04:13:59 -05:00
  • closed this issue
  • added the
    help
    label
Author
Owner

@CommanderStorm commented on GitHub (Feb 24, 2026):

can you use the safe response on XXX feature below on the site and send the full response that the server send you?

@CommanderStorm commented on GitHub (Feb 24, 2026): can you use the safe response on XXX feature below on the site and send the full response that the server send you?
Author
Owner

@Errorts commented on GitHub (Feb 24, 2026):

I had the wrong url in the actual monitor. The heartbeatJSON.response I got made no sense for the endpoint I though I was pointing at. I didn't know it was possible to get raw information response. Thank you for taking to time to respond even though this was just a dumb issue on my end.

@Errorts commented on GitHub (Feb 24, 2026): I had the wrong url in the actual monitor. The heartbeatJSON.response I got made no sense for the endpoint I though I was pointing at. I didn't know it was possible to get raw information response. Thank you for taking to time to respond even though this was just a dumb issue on my end.
Author
Owner

@CommanderStorm commented on GitHub (Feb 24, 2026):

We should make getting at the response simpler, but there are already I think a few issues open for that 👍🏻

@CommanderStorm commented on GitHub (Feb 24, 2026): We should make getting at the response simpler, but there are already I think a few issues open for that 👍🏻
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#4751
No description provided.