BigBoot / AutoKuma

AutoKuma is a utility that automates the creation of Uptime Kuma monitors based on Docker container labels. With AutoKuma, you can eliminate the need for manual monitor creation in the Uptime Kuma UI.
MIT License
309 stars 15 forks source link

What's the right value for bool's (i.e. how to make upside_down work) #71

Closed nathanpalmer closed 3 months ago

nathanpalmer commented 3 months ago

I've tried a few different ways of adding this label and it's not setting Upside Down mode. I'm setting this using nomad and all the values end up as strings (which may be the issue?)

"kuma.${NOMAD_JOB_NAME}.http.upside_down" = "true"
"kuma.${NOMAD_JOB_NAME}.http.upside_down" = true
"kuma.${NOMAD_JOB_NAME}.http.upside_down" = "1"
"kuma.${NOMAD_JOB_NAME}.http.upside_down" = "True"

None of these work. No errors in the console, it just updates the monitor and moves on. When I check the UI and see if Upside Down is checked.. it never is.

When inspecting the tags on the container, like I mentioned, it's always a string.

"kuma.(job).http.upside_down": "true",

I don't think there is a way for me to set it as a bool though through nomad. Since I already tried passing the value of true without quotes and I still get this on inspect

"kuma.(job).http.upside_down": "true",
BigBoot commented 3 months ago

Hi,

Docker labels are always strings, AutoKuma contains logic for handling this, so "true" should be correct. I'll have to check if setting upside down might require special handling on uptime kumas side or something.

BigBoot commented 3 months ago

Looks like I forgot to add a snake_case alias for upside_down, this should now work on master, you can either switch to the master tag or use the uptime kuma native casing (i.e. upsideDown) until a new stable version is released.

nathanpalmer commented 3 months ago

Thank you!! I changed it to upsideDown for now until the next release.