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

Uptime Kuma entities not available in HA #91

Closed
xelemorf opened this issue Feb 18, 2024 · 3 comments
Closed

Uptime Kuma entities not available in HA #91

xelemorf opened this issue Feb 18, 2024 · 3 comments
Labels
wontfix This will not be worked on

Comments

@xelemorf
Copy link

Related to the following:
hassio-addons/addon-uptime-kuma#156
louislam/uptime-kuma#4502

Problem/Motivation

UptimeKuma sensor entities dissapeared in HA, showing "Error in describing condition: can't access property "entity_id" of undefined"; manual check for entity availability shows no custom UptimeKuma monitors are populated into HA.

Expected behavior

Custom UptimeKuma monitors should be auto-populated after addon-start

Actual behavior

UptimeKuma sensor entities dissapeared in HA, only the below are available, none of the custom monitors are available

  • Uptime Kuma Running
  • uptimekuma ha local

Steps to reproduce

Let UptimeKuma run for over 90 days with 28 monitor entities, wait for the database to grow over 2GB (2397.6 GB) While settings are configured to keep only 1 day history.

Proposed changes

Vacuum function clearly not working: "Trigger database VACUUM for SQLite. If your database is created after 1.10.0, AUTO_VACUUM is already enabled and this action is not needed."
This is a re-occurring issue once the database grows above 2GB, having a setting to keep history for 1 days does not do anything.

Current workaround (reinstall UptimeKuma addon)

  1. Export all settings manually (since the backup feature does not work and you cannot access the data folder for UptimeKuma on HAOS)
  2. Completely uninstall UptimeKuma addon
  3. Reboot HAOS
  4. Reinstall Uptime Kuma Addon (HA integration can stay as it was), reboot HAOS
  5. Reconfigure everything from scratch using the same monitor names and settings
  6. Configure database to keep only 1 days of history, observe the second day that th setting is not respected
  7. Wait for some time to the database to grow above 2GB then rinse and repeat all the steps

System details:

HomeAssistant Addon version: 0.12.0
HAOS OVA (VMware) - The issue is independent from HAOS and HA versions.
Core 2024.2.2
Supervisor 2024.01.1
Operating System 11.5
Frontend 20240207.1
CPU: 2 vCPU (Intel Core i7-8700T @ 2.40GHz)
RAM: 4GB (DDR4)

@meichthys
Copy link
Owner

meichthys commented Feb 18, 2024

Looks like duplicate of #87 and #86 but I'll leave this open since it had more information.

I've never been able to reproduce this but in not using the HomeAssistant add-on either.

Are you using SSL? I've seen reports on the part similar to this but usually only when SSL was not being used.

@CommanderStorm
Copy link

This is not an issue with your addon. => you can close this issue

A lot of performance improvements (using aggregated vs non-aggregated tables to store heartbeats, enabling users to choose mariadb as a db-backend, pagination of important events) have been made in v2.0 (uptime-kuma's next release) resolving™️ this problem-area.

You can subscribe to our releases and get notified when a new release (such as v2.0-beta.0) gets made.
See louislam/uptime-kuma#4500 for the bugs that need addressing before that can happen.

Meanwhile (the issue is with SQLite not reading data fast enough to keep up):

  • limit how much retention you have configured
  • limit yourself to a reasonable amount of monitors (hardware-dependant, no good measure)
  • don't run on slow disks or disk with high latency like HDDs, SD-cards, USB-Stick attached to a router, ...

@meichthys
Copy link
Owner

@CommanderStorm thank you so much for the explanation. This has come up quite a few times and now I have an answer 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants