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

attaching a docker monitor to a group fails on creation #8

Closed
jlewis92 opened this issue Mar 9, 2024 · 5 comments
Closed

attaching a docker monitor to a group fails on creation #8

jlewis92 opened this issue Mar 9, 2024 · 5 comments

Comments

@jlewis92
Copy link

jlewis92 commented Mar 9, 2024

These are the labels I have:

kuma.auth.group.name: "auth"
kuma.lldap.docker.parent_name: "auth"
kuma.lldap.docker.name: "lldap"
kuma.lldap.docker.docker_container: "lldap"
kuma.lldap.docker.docker_host: 1

running this causes an error to be thrown in the log:

2024-03-09 17:49:41  2024-03-09T17:49:41.599Z INFO  autokuma::sync > Creating new monitor: lldap
2024-03-09 17:49:41  2024-03-09T17:49:41.601Z WARN  autokuma::sync > Encountered error during sync: Server responded with an error: insert into `monitor` (`accepted_statuscodes_json`, `docker_container`, `docker_host`, `interval`, `kafka_producer_brokers`, `kafka_producer_sasl_options`, `name`, `parent`, `parent_name`, `retry_interval`, `type`, `user_id`) values ('["200-299"]', 'lldap', 1, 60, NULL, NULL, 'lldap', 22, 'auth', 60, 'docker', 1) - SQLITE_ERROR: table monitor has no column named parent_name

However, I did find a workaround, which is to create the monitor without the group and then attach after creation

i.e.:

kuma.auth.group.name: "auth"
# kuma.lldap.docker.parent_name: "auth"
kuma.lldap.docker.name: "lldap"
kuma.lldap.docker.docker_container: "lldap"
kuma.lldap.docker.docker_host: 1

docker compose up -d

then force an update:

kuma.auth.group.name: "auth"
kuma.lldap.docker.parent_name: "auth"
kuma.lldap.docker.name: "lldap"
kuma.lldap.docker.docker_container: "lldap"
kuma.lldap.docker.docker_host: 1

docker compose up -d

@BigBoot
Copy link
Owner

BigBoot commented Mar 10, 2024

Hi, looks like uptime kuma will just ignore the autokuma specific parent_name property on the monitors when updating but chokes on it when creating a new monitor... but I think this must be a recent change as I'm sure this did work at one point 🤔...
Nevertheless I've excluded this property when serializing the monitor for uptime kuma so this should work now as expected.

@BigBoot BigBoot closed this as completed Mar 10, 2024
@radokristof
Copy link

Hi! I'm observing the same issue. When are you planning to push a release to Docker?

Thanks for your work!

@jlewis92
Copy link
Author

@radokristof while it's not been released (and I've not tried it), you should be able to get this by using the master tag (or a specifc SHA - think sha-705556c is this fix) from the packages page - https://github.com/BigBoot/AutoKuma/pkgs/container/autokuma

@BigBoot
Copy link
Owner

BigBoot commented Mar 28, 2024

Thanks @jlewis92, this is correct, you can use master or a specific commit tag until a release is available.

@radokristof
Copy link

Thank you for both of you :) I did not check that there is a CI/CD on the master branch as well.
Anyway I see the new release as well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants