Skip to content
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

Extra Monitored Service when using API #5001

Closed
1 task done
effree opened this issue Aug 8, 2024 · 5 comments
Closed
1 task done

Extra Monitored Service when using API #5001

effree opened this issue Aug 8, 2024 · 5 comments
Labels
area:api concearning the api or automation bug Something isn't working

Comments

@effree
Copy link

effree commented Aug 8, 2024

📑 I have found these related issues/pull requests

Looked up "deleted monitor", "api", "deleted monitor api", "deleted still available" and had found such errors anywhere else.

🛡️ Security Policy

Description

I'm using Organizr which displays the Uptime Kuma data. Currently there is one service that appears on Organizer that i had setup and deleted from Uptime Kuma. It still shows on Organizr but always shows as "down".

I tried deleting the API all together and starting a new one to re-add to Organizr, but the same old container still shows up. It appears that although Uptime Kuma doesn't still display it, it must still be "available" via the API call.

👟 Reproduction steps

  1. Added many services to Uptime Kuma.
  2. Deleted, Edited and Re-added many services - some with the same name as before.
  3. Created API key.
  4. Added to Organizr
  5. Checked homepage to see an extra Deluge service showing as down, which was deleted.

👀 Expected behavior

This service should not appear anywhere, even through API calls. It does not appear on any Uptime Kuma pages though.

😓 Actual Behavior

This service appears on Organizr.

🐻 Uptime-Kuma Version

1.23.13

💻 Operating System and Arch

Ubuntu 24.04 LTS x64

🌐 Browser

Brave Version 1.68.134 Chromium: 127.0.6533.88

🖥️ Deployment Environment

  • Runtime: Docker version 27.0.3, build 7d4bcd8
  • Database: SQLlite
  • Filesystem used to store the database on: APPLE SSD SM256E (CXM09A1Q) FAT32 EFI System
  • number of monitors: 29

📝 Relevant log output

No response

@effree effree added the bug Something isn't working label Aug 8, 2024
@CommanderStorm
Copy link
Collaborator

We don't have a public API. See #118 for further details.

Lets try to debug this:

  • Is the monitor present in the user interface?
  • What is the API-Response?
  • What package are you using when you are talking about an "API"?
  • does the issue persist restarts (try this last)

It might be that either there is a race condition, Organizr has a bug or what you are using as an API is caching/faulty..

@CommanderStorm CommanderStorm added the area:api concearning the api or automation label Aug 8, 2024
@effree
Copy link
Author

effree commented Aug 9, 2024

The monitor is not present in the user interface.
I just went in a created an API key in Uptime Kuma under "settings >> API Keys" and input it into the Uptime Kuma plugin within Organizr.

This is the output when checking the response in Organizr

{
    "response": {
        "result": "success",
        "message": null,
        "data": {
            "data": [
                {
                    "name": "Overseerr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": null
                },
                {
                    "name": "NGINX Proxy Manager",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 14
                },
                {
                    "name": "Deluge",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 22
                },
                {
                    "name": "Flatnotes",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 133
                },
                {
                    "name": "Mealie",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 154
                },
                {
                    "name": "Organizr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 171
                },
                {
                    "name": "Pairdrop",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 162
                },
                {
                    "name": "Plex",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 316
                },
                {
                    "name": "Portainer",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": null
                },
                {
                    "name": "Prowlarr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "Radarr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "SabNZBd",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "Sonarr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 35
                },
                {
                    "name": "Speedtest Tracker",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": 51
                },
                {
                    "name": "Tautulli",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": null
                },
                {
                    "name": "Unpackerr",
                    "url": "https://",
                    "type": "docker",
                    "status": true,
                    "latency": null
                },
                {
                    "name": "Flatnotes",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 133
                },
                {
                    "name": "Deluge",
                    "url": "https://192.168.1.30:8112",
                    "type": "http",
                    "status": false,
                    "latency": 22
                },
                {
                    "name": "Mealie",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 154
                },
                {
                    "name": "Overseer",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 497
                },
                {
                    "name": "Plex",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 316
                },
                {
                    "name": "Pairdrop",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 162
                },
                {
                    "name": "Deluge",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 22
                },
                {
                    "name": "NGINX Proxy Manager",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 14
                },
                {
                    "name": "Organizr",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 171
                },
                {
                    "name": "Prowlarr",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "Radarr",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "SabNZBd",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 33
                },
                {
                    "name": "Sonarr",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 35
                },
                {
                    "name": "Speedtest Tracker",
                    "url": "[hidden for github]",
                    "type": "http",
                    "status": true,
                    "latency": 51
                }
            ],
            "options": {
                "title": "Uptime Kuma",
                "titleToggle": false,
                "compact": true,
                "showLatency": true
            }
        }
    }
}

The one that is still appearing but was only added to Uptime Kuma when i first set it up but then deleted it is

                 {
                    "name": "Deluge",
                    "url": "https://192.168.1.30:8112",
                    "type": "http",
                    "status": false,
                    "latency": 22
                },

And after all of that i went into Portainer and just did a restart of Uptime Kuma and then checked and it was removed from Organizr. It looks like it was somehow hungup in Uptime Kuma.

@CommanderStorm
Copy link
Collaborator

If something is not present in our UI after reloading the page, it is not returned via our API.
This must be a bug in Organizer. It is likely helpful to report this bug there.

@effree
Copy link
Author

effree commented Aug 9, 2024

I understand what you are saying and I can for sure report it there as well. But i did restart Organizr before this, and even removed the API Key from Uptime Kuma, removed the plugin from Organizr, re-added an API key to Kuma and then readded the plugin and new key in Organizr and it still had the issue.

Only after restarting the container for Uptime Kuma, not doing anything else on Organizr, fixed the issue immediately in Organizr, where it suddenly disappeared from the interface. That is why i assume it was hung up in Uptime Kuma and not Organizr.

@CommanderStorm
Copy link
Collaborator

Since what you reported above as our api does not match what we use, I think they build something around us. I don't know how they did what they did, but likely the bug is in there somewhere.
Resetting the uptime kuma instance might have given their code the nudge needed.

If you can reprduce this with a wrapper of our socketio api such as https://uptime-kuma-api.readthedocs.io/en/latest/, we can reopen. Otherwise I think the issue lies with Organizr or how they implemented an API.
That seems to fit the symtoms of the ghost not being displayed with us.
=> closing as an issue downstream. If new information comes to light, we can reopen.

@CommanderStorm CommanderStorm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api concearning the api or automation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants